all repos — blog @ 47d08ca936a8c426183d6500a348d6f254b703f9

Code and content for 5ika.ch

content/dev/todo.txt-go.md (view raw)

 1---
 2Title: todo.txt-go
 3---
 4
 5**todo.txt-go** is a TUI program for [todo.txt](http://todotxt.org/) written in Go.
 6It provides a minimalistic and efficient interface in the terminal to handle todo list following [todo-txt format rules](https://github.com/todotxt/todo.txt) stored in a plain text file.
 7
 8![Demo](/todo.txt-go.gif)
 9
10## Installation
11
12Ensure that you have a supported version of Go properly installed and setup.
13
14You can then install the latest release globally by running:
15
16```bash
17git clone https://5ika.ch/todo.txt-go.git
18cd todo-txt
19go install
20```
21
22`todo-txt` is now available in your terminal.
23
24## Configuration
25
26Tasks are stored in a `todo.txt` file in the `TODO_DIR` directory.
27By default, the `TODO_DIR` is `$HOME/.todo` but you can change it
28with two ways:
29
30- By setting `TODO_DIR` environment variable
31
32  ```bash
33  export TODO_DIR=~/tasks
34  todo-txt
35  ```
36
37- By using `-dir` flag
38
39  ```bash
40  todo-txt -dir ~/tasks
41  ```
42
43## Use
44
45### Keymaps
46
47- `Up` or `Down`: Move cursor
48- `Shift+Up` or `Shift+Down`: Move focused task
49- `A` or `+`: Add a new task
50- `Enter`: Edit focused task
51- `Space`: Check/Uncheck focused task
52- `a`, `b`, `c`, `d`: Set priority level for focused task
53- `z`: Clear priority of focused task
54- `p`: Sort task by priority
55- `s`: Sort task by date
56- `u`: Clear done tasks (move them to *done.txt*)
57- `q`: Quit
58
59### Due date
60
61Additionnaly, it handles due dates as a [custom *key:value* metadata](https://github.com/todotxt/todo.txt?tab=readme-ov-file#additional-file-format-definitions).
62Example:
63
64```
65(B) Review pull request #123 @work +code due:2025-09-05
66```
67
68### Clear tasks history
69
70Done tasks are archived to *done.txt* file when `u` is entered.
71
72## Contribution
73
74Intrested by this project ? [Contact me](https://5ika.ch)
75
76Code is available here: https://git.5ika.ch/todo.txt-go.git