Todo.rb is a simple command-line tool for managing todos. It's minimal, straightforward, and you can use it with your favorite text editor.
Todo.rb doesn't require any third-party gems so you can copy the file anywhere and use it as long as it's executable:
$ chmod +x todo.rb
You may also create an alias to save keystrokes
alias todo='~/todo.rb'
Todo.rb can work with multiple todo files too. You can maintain one todo list (default: '~/.todos') for project-specific todo files.
We don't have to use quotes :-)
$ todo add Check out rubyrags.com
Add: (1) Check out rubyrags.com
# Create a todo with context
$ todo add Buy Duck Typing shirt from rubyrags.com @work
Add: (2) Buy Duck Typing shirt from rubyrags.com @work
$ todo add Buy Ruby Nerd shirt from rubyrags.com
Add: (3) Buy Ruby Nerd shirt from rubyrags.com
Prints the todos is a nice, tabbed format.
$ todo list
1. Check out rubyrags.com
2: Buy Ruby Nerd shirt from rubyrags.com @work
3: Buy Duck Typing shirt from rubyrags.com @work
$ todo list @work
1: Buy Ruby Nerd shirt from rubyrags.com @work
2: Buy Duck Typing shirt from rubyrags.com @work
Use the todo number to delete
it. del
also works.
$ todo delete 1
Deleted: (1) Check out rubyrags.com
# Todo delete all the todos:
$ todo clear
All 3 todos cleared!
Use the todo number to complete the todo. This will simple archive the todo
$ todo done 2
Done: (2) Buy Duck Typing shirt from rubyrags.com @work
To bump a todo higher on the list:
$todo bump 2
Bump: (2) Buy Duck Typing shirt from rubyrags.com @work
Help is just a command away.
$ todo help
If you want to edit the underlying todo file directly, make sure your $EDITOR environment variable is set, and run:
$ todo edit
Then you can see your todo list in a beautifully formated yaml file!
Since it's the command line we have all the goodies available to use
$ todo list | grep Nerd
2: Buy Ruby Nerd shirt from rubyrags.com @work