tally-todo 0.7.0

Make TODO management a little more automatic
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# tally

**tally** is a lightweight, Git-friendly task manager for projects that live in a `TODO.md` file.

It lets you track tasks, mark them complete, associate them with git commits or releases, and automatically generate changelogs — all from the command line, without a database or daemon.

---

## Table of Contents

1. [Features]#features
2. [Installation]#installation
   - [Install via Cargo]#install-via-cargo
   - [Build from Source]#build-from-source
3. [Getting Started]#getting-started
4. [Usage]#usage
   - [Initialize]#initialize
   - [Add Tasks]#add-tasks
   - [List Tasks]#list-tasks
   - [Complete Tasks]#complete-tasks
   - [Release Management]#release-management
   - [Changelog Generation]#changelog-generation
   - [Task Cleanup]#task-cleanup
   - [Git Integration]#git-integration
   - [Editing Tasks]#editing-tasks
   - [Cross-Project Commands]#cross-project-commands
5. [Configuration]#configuration
6. [Storage Format]#storage-format

---

## Features

- Uses a plain `TODO.md` file as storage
- Fuzzy-matching to find tasks by description
- Tags and priorities for better organization
- Automatic changelog generation from completed tasks
- Associate tasks with git commits or release versions
- Prune or archive old completed tasks
- Scan git history to detect completed tasks
- Global project registry with cross-project status

---

## Installation

### Install via Cargo

`tally` is written in Rust and can be installed with Cargo:

```bash
cargo install tally-todo
```

To update:

```bash
cargo install --force tally
```

---

### Build from Source

```bash
git clone https://github.com/what386/tally.git
cd tally
cargo build --release
```

Binary location:

```text
target/release/tally
```

---

## Getting Started

Initialize `tally` in your project directory:

```bash
tally init
```

This creates:

- `TODO.md` — your task list
- `.tally/` — configuration and history files

It also registers the project in `~/.config/tally/projects.json`.
Running `tally init` again is safe and will re-register existing projects.

---

## Usage

### Git Commit Integration

`tally` can automatically detect completed tasks by scanning git commit messages.

This works by looking for a special **`done:` section** in commit messages and fuzzy-matching the listed items against tasks in `TODO.md`.

#### Commit Message Format

Add a `done:` section anywhere in your commit message:

```text
do thing

done:
fix parsing issue
```

Each line under `done:` is treated as a potential completed task.

#### Lists Are Supported

You can use plain lines, dash lists, or bullet lists:

```text
refactor parser

done:
- fix parsing issue
- handle edge cases
```

```text
cleanup

done:
* update docs
* remove unused code
```

`tally` strips common list markers (`-`, `*`) before matching.

#### Fuzzy Matching

Task names do **not** need to match exactly.

For example, this task in `TODO.md`:

```text
- Fix parsing error in format.rs
```

Will match any of the following commit entries:

```text
fix parsing issue
parsing error
fix parser
```

#### Scanning Commits

To scan git history for completed tasks:

```bash
tally scan
```

Preview matches without making changes:

```bash
tally scan --dry-run
```

Automatically mark all detected matches as done:

```bash
tally scan --auto
```

When a task is marked complete via a commit scan, the commit hash is automatically associated with the task.

---

### Initialize

```bash
tally init
```

Initializes `tally` in the current directory.

---

### Add Tasks

```bash
tally add "Fix parsing error"
```

With priority and tags:

```bash
tally add "Implement feature" --priority high --tags feature,backend
```

Preview without writing:

```bash
tally add "Update docs" --dry-run
```

---

### List Tasks

```bash
tally list
```

Filter by tags and priority:

```bash
tally list --tags bug,parser --priority high
```

Show only completed tasks:

```bash
tally list --done
```

Filter completed tasks by exact semver:

```bash
tally list --semver v0.6.0
```

Output as JSON:

```bash
tally list --json
```

---

### Complete Tasks

Mark a task as completed using fuzzy matching:

```bash
tally done "Fix parsing error"
```

Associate a git commit:

```bash
tally done "Fix parsing error" --commit abc123f
```

Associate a release version:

```bash
tally done "Fix parsing error" --version v0.2.3
```

Preview changes:

```bash
tally done "Fix parsing error" --dry-run
```

---

### Version Management

Assign a version to all completed, unversioned tasks:

```bash
tally semver v0.2.3
```

Show a summary:

```bash
tally semver v1.0.0 --summary
```

Automatically make a git tag, too:

```bash
tally tag v0.2.4
```

---

### Changelog Generation

Generate a changelog from completed tasks:

```bash
tally changelog
```

From a specific version:

```bash
tally changelog --from v0.2.2
```

Between versions:

```bash
tally changelog --from v0.2.2 --to v0.2.3
```

---

### Task Cleanup

Remove a task entirely:

```bash
tally remove "Old task"
```

Completed tasks are archived to `history.json` before removal.

Prune completed tasks older than a threshold:

```bash
tally prune            # default: 30 days
tally prune --days 7
tally prune --days 1 --hours 12
tally prune --dry-run
```

---

### Git Integration

Scan git commit messages for completed tasks:

```bash
tally scan
```

Automatically mark matches as done:

```bash
tally scan --auto
```

Preview matches:

```bash
tally scan --dry-run
```

---

### Editing Tasks

Open `TODO.md` in your editor:

```bash
tally edit
```

Uses:

1. `preferences.editor` from `tally config`
2. `$EDITOR`
3. Common fallbacks (vim, nano, etc.)

---

### Cross-Project Commands

List registered projects:

```bash
tally projects list
```

Show an aggregated status across all registered projects:

```bash
tally projects status
```

Remove missing entries from the global registry:

```bash
tally projects prune
```

---

## Configuration

Configuration is stored in:

```text
./.tally/config.toml (optional, per-project)
~/.config/tally/config.toml (fallback)
```

Manage configuration via:

```bash
tally config <action>
```

Available actions:

| Action | Description                    |
| ------ | ------------------------------ |
| `set`  | Set a configuration value      |
| `get`  | Retrieve a configuration value |
| `list` | List all configuration keys    |

Examples:

```bash
tally config set preferences.editor vim
tally config get preferences.editor
tally config list
```

---

## Storage Format

- **`TODO.md`** — active tasks
- **`.tally/history.json`** — archived completed tasks
- **`.tally/config.toml`** or **`~/.config/tally/config.toml`** — user preferences
- **`~/.config/tally/projects.json`** — registry of initialized projects

All data is human-readable and git-friendly.

---

## Philosophy

`tally` is designed to:

- Stay out of your way
- Work naturally with git
- Avoid lock-in and opaque formats
- Make changelogs easy