devtodo(1)
devtodo(1) β the todo(1) glow-up π
Programming utility β¨ devtodo(1)
okay bestie, this is the manual for todo and friends, straight from the Programming utility section of your local man pages. sit down, grab a strawberry π, we're going through everything. no skips. no cap.
πΈ NAME πΈ
todo β a reminder/task program aimed at developers π
β¨ SYNOPSIS β¨
todo [<options>]
With no options, displays the items in the current directory.
tda [-p <priority>] [-g <index>] [<text>]
Add a new item, optionally grafting it as a child of the given
item.
tde <index>
Edit the given item.
tdr <indices>
Remove the given items.
tdd <indices>
Mark the specified items as being done.
tdl [-g <index>] <database>
Link the specified devtodo database into the current one,
optionally grafting it as a child of the specified index.
so yeah, there's a whole little squad of commands: todo, tda, tde, tdr, tdd, and tdl. they're giving β¨friend groupβ¨ energy, each with their own job. π«Ά
π¦ DESCRIPTION π¦
todo is a program aimed specifically at programmers (but usable by anybody at the terminal) to aid in day-to-day development. π
It maintains a list of items that have yet to be completed. This allows the programmer to track outstanding bugs or items that need to be completed with very little effort. literally the lowest-effort way to not forget your bug. π
Items can be prioritised and can also be displayed in a hierarchy, so that one item may depend on another. it's giving family tree but make it tasks. π³
With the use of some small shell scripts (scripts.* in the doc directory of the source distribution), todo can also display the outstanding items in a directory as you change into it. So, for example, if you cd into the source directory for todo itself you should see a list of outstanding items...unless all of the bugs have been fixed ;). π imagine. iconic behaviour.
π OPTIONS π
okay so options can have both a long and a short form. (iykyk β¨)
Short options can be combined into one argument by using a hyphen followed by a string of short options. Parameters of short options can also be appended to this string. so yes bestie you CAN smush them together, that's the whole vibe. π
-v,--verboseβ Display verbosely. π£οΈ-a,--add [<text>]β Add a note (will prompt for a note if one is not supplied). π-g,--graft <index>β In conjunction with--addor--link, graft the new item to the specified item. π±-l,--link <database>β Link the specified todo file into the body of this one. If the linked database has a title set, this will be used as the body of the linking item otherwise the directory name of the linked database will be used. Use--remove(ortdr) to remove linked databases β this does not remove the database itself, only the link. π-R,--reparent <index>[,<index>]β Change the parent of the first item index to the second item index. If no second index is given the item is reparented to the root of the tree. π²-p,--priority <priority>β In conjunction with--addor--edit, set the priority (default|veryhigh|high|medium|low|verylow). β-e,--edit <index>β Edit the note that is indexed by the given number. βοΈ--remove <indices>β Remove the note indexed by the given numbers, including any children. π-d,--done <indices>β Mark the specified notes (and their children) as done. β-D,--not-done <indices>β Mark the specified notes (and all children) as not done. π--global-database <file>β Specify the database to use if either the-Gor--globaloptions are specified. π-G,--globalβ Forcetodoto use the database specified with--global-database. If this is placed in your~/.todorcit will forcetodoto use that database to the exclusion of all others. π--database <file>β Change the database from whatever the default is (typically'.todo') to the file specified. ποΈ-T,--TODOβ Generate a typical TODO output text file from a Todo DB. π-A,--allβ Shortcut for the filter'+done,+children'to show all notes. π-f,--filter <filter>β Display only those notes that pass the filter. Please refer the section FILTERS for more information. π--colour <colours>β Override default colours of todo items. Please refer to the section COLOUR for more information. π¨--force-colourβ Force use of colour even when not outputting to a TTY. This is useful when piping toless(1) -R. πΊ--monoβ Remove all ANSI escape sequences from output - useful for colour impaired terminals. π€--helpβ Display this help. π«Ά--versionβ Display version of ToDo. π·οΈ--title [<text>]β Set the title of this directory's todo notes. π--date-format <format>β Format the display of time values. The format is that used bystrftime(3). The default format is'%c'. This option is best specified in the~/.todorc. π°οΈ--format <identifier>=<format>β Specify the formatting of output. Please refer to the section FORMATTING for more information. β¨--use-format <builtin>=<identifier>β Use the format string identified by<identifier>(defined with--format) as the format string to use when formatting with the builtin format<builtin>. π§--sort <expression>β Sort the database with the specified expression. Refer to the section SORTING for more detailed information. π€--paranoidβ Be paranoid about some settings, including permissions. π--database-loaders <loader list>β Try the database formats in the given order. Valid formats arexmlandbinary. eg.todo --database-loaders binary,xml. The default format is XML. π§³--backup [<n>]β Backup the database up to<n>times, just before it is written to. If<n>is not specified, one backup will be made. The filenames used to store the backups are the default database name with their revision appended like so:.todo.1,.todo.2, etc. To actually use one of these backups, you can eithermvit to.todoor use--database .todo.<n>to explicitly specify its use. πΎ-s,--summaryβ Toggle "summary" mode, where long items are truncated to one line. βοΈ-c,--commentβ Edit or show comments respectively. π¬--timeout [<time>]β If<time>is specified, the timeout between database displays is set to this number of seconds. If no<time>is specified, the behaviour is to display the database only if it has not been displayed for the number of seconds specified by--timeoutwith the<time>given. eg.todo --timeout 10 --timeoutwould only display the database at most once every 10 seconds. Putting atimeout 10in your~/.todorcis a good option, then the--timeoutin thedoc/scripts.*will mean that the database won't be displayed every time youcdinto a directory. β³--purge [<days-old>]β Purge all completed items older than<days-old>. If<days-old>is omitted, all completed records are purged. π§Ή
ngl bestie, that's a lot of flags. but they're all important, so we listed every single one. periodt. π
β PRIORITIES β
Priorities can be specified symbolically using the words default, veryhigh, high, medium, low and verylow. π
The default priority has special meaning in that it will use the default priority for any action. This means that when editing an existing item, its priority is preserved; when creating a new item, the priority will be set to medium; when grafting a new item, its priority will be that of its parent. DevTodo will not prompt for priority if this is specified, making it a handy feature for your todorc. As with all options, the priority can be overridden on the command line. π
so like, default is the chill one that just reads the room. π«Ά
π FILTERS π
Filters are comprised of a list of expressions used to define the notes that are displayed. β¨
The general format of a filter expression is:
([-|=|+](all|children|done|<index>|<priority>)) | (/<search expression>)
Generally, if a filter expression is prefixed with a '-' it will not display items that match the expression, if prefixed with a '+' it will display items that match this expression in addition to others, or if prefixed with a '=' (or no prefix at all) it will display only those items that match the expression. Note that this will only search items not excluded by other filters, so to search the entire database you will have to do something like: todo --filter all,/some-search-string. π
The second form of filter expression is used for searching for text in a database. <search expression> is a regular expression which is matched against the text body of each item. π§΅
Filter atoms are filtered in order by done state, priority, then search. So first items that do not match the "done" filter will be excluded, then those that do not match the priority filter, and so on. π
The expressions in detail:
allβ Forces all items to be displayed. The various prefixes have no effect on this expression. πchildrenβ Collapse or expand child items. If the'-'prefix is present children are collapsed, otherwise children are displayed. π§Έdoneβ Filter on whether an item is completed or not. β<index>β Note indices are specified as numbers. Ranges can be given ala'1.2.10-20'. π’<priority>β Priorities are specified as described in the PRIORITIES section. A prefix of'-'will display all items with priorities less than or equal to the given priority. With a'+'prefix, all items with priorities greater than or equal to the given priority are shown. If'='or no prefix is given, only items with the specified priority are displayed. β
π Examples π
todo --filter done,-children,+low
This will display only those items that are done and have a priority of low or higher. In addition, children will be collapsed. π
todo /[Tt]he
Display only those items with the word 'the' in them, where the first letter can be lower or upper case. It may be necessary to quote the search expression to ensure the shell does not interpret them. π the shell is always trying something. quote your regexes bestie.
π FORMATTING π
okay bestie so listen β you can totally change how todo spits out its output by writing your own format strings. They're like the ones you already know from printf(3) and strftime(3), so if you've met those, you're already fluent. iykyk.
These examples, which you can drop right into ~/.todorc, will give you the default behaviour back:
# Display in default format
format display=%i%[info]%f%2n.%[priority]%T
# Display in default format
format generated=%2i-%T%2i (added %d, priority %p)\n\n
There are four separate format options: display, generated, verbose-display and verbose-generated. The last two are the ones that format their respective text when you pass --verbose to todo. slay.
And bestie, it gets better β you can make your own format strings from scratch by just handing format a different identifier. Then you turn it on with --use-format. for example:
format full-report=%i%[info]%f%2n.%[priority]%+1T%+1i%[info]Added: %[normal]%c %[info]Completed: %[normal]%d\n%+1i%[info]Duration: %[normal]%D %[info]Priority: %[normal]%p\n\n
# Override the display format to use "full-report".
use-format display=full-report
Now the flags you've got available, one by one, no skips:
%<n>>β the>flag sets how many spaces<n>to use for all future indenting.%[+|-][<n>]iβ indent to the depth of the current item.<n>says which depth to indent to. Leave<n>out and it uses the current level. Relative values work too! eg.%+1Twould indent one level higher than the current indentation level.%[+|-][<n>]Tβ shows the text of the item, wrapped at 80 characters and indented to the level you picked.<n>means the same thing as with%i. Heads up: wrapped text automatically adds a'0at the end of the text, whereas%twill not.%tβ the unwrapped, unformatted text of the item.%sβ summary text (ie. one line only, equivalent to--summary).%pβ the priority level of the current item.%cβ the current item's creation date, formatted according to--date-format.%dβ the date when the item was marked as done, formatted according to--date-format.%Dβ the duration of the item, formatted according to--date-format.%[<n>]nβ the index number of the current item. That optional numeric<n>says how many characters the number should occupy, and it gets padded out with spaces to fill exactly that many.%fβ the state flag of the current item. Displayed values:+means children,-means done,*means done with children.%Fβ the human readable state flag of the current item. Displayed values:'children','done'means done,'done, children'and'open'.%[<colour>]β colours, babes! Valid values for<colour>are:verylow,low,medium,high,veryhigh,title,info, andpriority. Pretty self explanatory, exceptprioritychanges to the current item's priority colour. eg.%[priority]
π«Ά one thing though: when you're indenting, you'll typically want a prefix value of+1with%T. ie.%+1T. That forces the text to indent one level deeper than the current level, so it sits all pretty and away from whatever other formatting you've got going on.
π₯ SORTING π₯
The display of items in the database can be sorted on a variety of keys. Give todo a series of keys and it sorts on each successive one, only moving to the next if the previous comparison came out equal. like so:
todo --sort -done,text
This sorts first by whether an item is completed, and second by their text. Which effectively groups your items into two blocks β the complete ones and the not-complete ones. iconic.
The keys available are created, completed, text, priority, duration, none and done. Every key except none can be prefixed with a - to reverse its default order, and multiple keys must be separated with a ,.
If multiple --sort parameters show up, the last one wins. Which means a sort entry sitting in ~/.todorc will get overridden by anything on the command line. periodt.
π INDICES π
Indices get used as options to a bunch of command line arguments. Multiple note indices are separated with commas (spaces are not allowed, bestie, don't try it). Children are scoped using a ..
For example, given these notes:
1. Do man pages
1. Make them more beautiful.
2. Make HTML documentation as well.
The second sub-item would be represented like this: 1.2
The wildcard * represents all children of a node. eg. 1.*
Ranges of notes can be specified with <a>-<b>. For example, to mark notes 10.1.2, 10.1.3 and 10.3.4 as done, you could do:
todo --done 10.1.2-4
π COLOUR π
Various items can be colourised, and the ones that can are veryhigh, high, medium, low, verylow, title and info. (info is what shows item numbers and general information.)
These items can be set to one of eight colours. Those colours are black, red, green, yellow, blue, magenta, cyan, white and default. The colour default is used to specify the default foreground terminal colour.
Colours are specified like so:
<item>=[+]<colour>
If that optional + is in there, it makes the item bold.
For example, a line in your ~/.todorc might look like:
colour medium=+white
Which would make medium text bold white. π
π¦ TODORC π¦
todo can load options from a number of resource files. The order it parses them in is:
- The file specified in the environment variable
TODORCor, if that does not exist,/etc/todorc. ~/.todorc
Options are cumulative, meaning those loaded from $TODORC will be overridden or added to by those in ~/.todorc.
These options are specified as key/value pairs, one per line. The key is the long name of a command line argument and the value is the parameter to that argument, if any. And yes, environment variables get expanded. πΈ
For example, the --filter command line argument accepts a parameter that's a filter expression. A default filter could be added to ~/.todorc like so:
# Don't display child items by default
filter -children
The only difference between options in the rc file and options on the command line is that rc file options are not prefixed by --.
Plus, there are two commands available in the RC file that you can't use on the command line:
The first command, on, is used to conditionally add specific commands. Its format is: on <event> <command> [<arguments>]. Valid events are add, remove, view, edit, generate, done, notdone, title, reparent, load, save, link, create and purge. You can pass multiple commands to on by enclosing them in braces (whitespace is required between tokens). Full example below. π
The second command is exec <shell command>. This will execute the argument it's given in a shell. The environment variable $TODODB contains the filename of the current database. eg. exec chmod 600 $TODODB
There's an example rc file in the doc subdirectory of the source distribution. go look, bestie.
β¨ EXAMPLES β¨
Wanna see any outstanding items in the current directory? simply type:
todo
To remove notes 1, 2 and 4:
todo --remove 1,2,4
To display ALL items:
todo all
To display only the top-level items and not their children:
todo -children
(even though -children is not a valid argument, this works because todo interprets any command line arguments it doesn't recognise as being part of a filter expression. sneaky but it ate.)
A more complex example. This adds a new item, with the text of the item specified on the command line, with a priority of high, as a child of the third child of the second item (if that makes any sense):
todo -a "Fix the man page" -p high -g 2.3
This next one is how you use the TODO feature of todo. It makes todo generate a new TODO file from the information stored in the database. This particular example outputs all items to the TODO file, even those marked as done:
todo --filter all --TODO
And this one is a nice use of the event triggers. When a new database is created it'll force its permissions to 0600:
on create {
verbose
exec chmod 600 .todo
}
π FILES π
.todoβ Items are stored as XML in this file./etc/todorcβ Default options can be specified in this file. Please refer to the sectionTODORCfor more information.~/.todorcβ User-specific options are specified in this file. Please refer to the sectionTODORCfor more information.
π AUTHORS π
Alec Thomas <alec@swapoff.org>
π SEE ALSO π
phpsat <http://sourceforge.net/projects/phpsat>
and that's the whole page, bestie!! π«Ά this one's from Alec Thomas, version 0.1.20, and it's the devtodo(1) man page β read it, love it, live it. no cap. πβ¨
π¦ where this page comes from
- debian bookworm: devtodo 0.1.20+git20200830.0ad52b0-2 Β· GPL-2.0-only
- debian trixie: devtodo 0.1.20+git20200830.0ad52b0-3 Β· GPL-2.0-only
- ubuntu jammy: devtodo 0.1.20+git20200830.0ad52b0-1 Β· GPL-2.0-only
- ubuntu noble: devtodo 0.1.20+git20200830.0ad52b0-3 Β· GPL-2.0-only
- ubuntu resolute: devtodo 0.1.20+git20200830.0ad52b0-3build1 Β· GPL-2.0-only
- ubuntu stonking: devtodo 0.1.20+git20200830.0ad52b0-5 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms