Add doc
Tim Izzo tim@octree.ch
Sun, 13 Apr 2025 20:50:18 +0200
M
README.md
→
README.md
@@ -1,4 +1,69 @@
-# TODO.txt in Go +# todo.txt in Go + +`todo.txt-go` is a CLI tool written in Go for [todo.txt](https://todotxt.org/). +It provides an interactive TUI developped with [Bubble Tea](https://github.com/charmbracelet/bubbletea/). + + + +## Install + +Ensure that you have a supported version of Go properly installed and setup. +You can find the minimum required version of Go in the [go.mod](./go.mod) file. + +You can then install the latest release globally by running: + +```bash +go install 5ika.ch/todo-txt.git@latest +``` + +`todo-txt` is now available in your CLI. + +## Config + +Tasks are stored in a `todo.txt` file in the `TODO_DIR` directory. +By default, the `TODO_DIR` is `$HOME/.todo` but you can change it +with two ways: + +- By setting `TODO_DIR` environment variable + +```bash +export TODO_DIR=~/tasks +todo-txt +``` + +- By using `-dir` flag + +```bash +todo-txt -dir ~/tasks +``` + +## Keymaps + +- `A` or `+`: Add a new task +- `Enter`: Edit focused task +- `Space`: Check/Uncheck focused task +- `a`, `b`, `c`: Set priority level for focused task +- `z`: Clear priority of focused task +- `p`: Sort task by priority +- `s`: Sort task by date +- `u`: Clear done tasks (move theme to *done.txt*) + +## Features + +`todo-txt` is a TUI to manage todo list with [todo-txt format rules](https://github.com/todotxt/todo.txt) +stored in a plain text file. + +### Due date +Additionnaly, it handles due dates as a [custom *key:value* metadata](https://github.com/todotxt/todo.txt?tab=readme-ov-file#additional-file-format-definitions). +Example: + +``` +(B) Review pull request #123 @work +code due:2025-09-05 +``` + +### Clear tasks history + +Done tasks are archived to *done.txt* file when `u` is entered. ## TODO
A
demo.gif
A
demo.tape
@@ -0,0 +1,35 @@
+Output demo.gif + +Require todo-txt + +Set Shell "bash" +Set FontSize 14 +Set Width 900 +Set Height 600 +Set Theme "Catppuccin Mocha" +Set Padding 10 + +Env TODO_DIR ./examples/ + +Sleep 500ms +Type "todo-txt" Sleep 1s Enter +Sleep 1s +Down Sleep 500ms +Down Sleep 500ms +Down Sleep 500ms +Space Sleep 1s +Type "+" Sleep 1s +Type@50ms "Start new project +LearnGo @perso" Sleep 2s Enter +Down Sleep 500ms +Down Sleep 500ms +Down Sleep 500ms +Down Sleep 500ms +Down Sleep 500ms +Down Sleep 500ms +Down Sleep 500ms +Down Sleep 500ms +Type "a" Sleep 1s +Type "p" Sleep 500ms + +Sleep 3s +Type "q"