summaryrefslogtreecommitdiff
path: root/README.md
blob: ebd97bf7db23b2f63d526f71625bd9feddaa70b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# timr

`timr` is a terminal time-tracking tool that combines:

- a stopwatch timer,
- worktime-style work log tracking,
- weekly reporting,
- and a Bubble Tea TUI.

Current version: `v0.4.0`.

## Installation

Requirements:

- Go (current project targets Go 1.24+)
- [Mage](https://magefile.org/) (optional, recommended)

Build with Mage:

```bash
go install github.com/magefile/mage@latest
mage build
```

Or build directly:

```bash
go build -o timr ./cmd/timr
```

## CLI Overview

`timr` now uses Cobra and supports global flags:

```bash
timr --version
timr --config /path/to/config.json
```

Top-level command groups:

- `timr timer ...`
- `timr work ...`
- `timr tui`

### `timer` Commands

```bash
timr timer start
timr timer stop
timr timer continue
timr timer reset
timr timer status [--raw|--raw-minutes]
timr timer prompt
timr timer track <description>
timr timer live [-f|--font <font>]
```

### `work` Commands

```bash
timr work login [-c|--category <cat>] [--at <time>] [-d|--descr <text>] [--start-timer]
timr work logout [-c|--category <cat>] [--at <time>] [-d|--descr <text>] [--stop-timer]
timr work add <duration> [-c|--category <cat>] [--at <time>] [-d|--descr <text>]
timr work sub <duration> [-c|--category <cat>] [--at <time>] [-d|--descr <text>]
timr work use-buffer <duration> [--at <time>] [-d|--descr <text>]
timr work status
timr work report [--verbose] [--no-color]
timr work edit
timr work import <file>
```

## TUI

Launch the TUI:

```bash
timr tui
```

The scaffold currently includes:

- tab-based navigation (`Entries`, `Report`, `Timer`),
- vi-style global keys (`Tab`, `gt`, `gT`, `1/2/3`, `?`, `q`, `ZQ`),
- entries browsing/editing flows,
- report browsing,
- timer screen with work login/logout toggle (`l`).

## TUI Screenshots

Screenshots section (`v0.4.0` baseline):

- Entries screen: _to be captured_
- Report screen: _to be captured_
- Timer screen: _to be captured_

## Fish Shell Integration

Install fish prompt helper:

```bash
./install-fish-integration.fish
```

Then add `timr_prompt` to your `fish_prompt` or `fish_right_prompt`.