all repos — todo.txt-go @ 71a843b7ebb8ec905f319aa7c32410554cb70473

CLI tool for todo.txt files written in Go

Add doc
Tim Izzo tim@octree.ch
Sun, 13 Apr 2025 20:50:18 +0200
commit

71a843b7ebb8ec905f319aa7c32410554cb70473

parent

ecc9536e6199c2e91e6f6f1e6316afcc915f7bbf

4 files changed, 102 insertions(+), 2 deletions(-)

jump to
M README.mdREADME.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/). + +![todo-txt demo](./demo.gif) + +## 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.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"
M go.modgo.mod

@@ -1,4 +1,4 @@

-module 5ika.ch/todo-txt +module 5ika.ch/todo.txt-go go 1.24.1