Get the highlights in your inbox every week.
'Getting to Done' on the Linux command line
'Getting to Done' on the Linux command line
Learn how to get yourself organized with these ways to track your to-dos from the command line.

There is a lot of talk about getting things done at the command line. How many articles are there about using obscure flags with ls
, nifty regular expressions with Sed and Awk, and how to parse out lots of text with Perl? That isn't what this is about.
This is about Getting to Done, making sure that the stuff we have to do actually gets tracked and done using tools that don't require a graphical desktop, a web browser, or an internet connection. To do this, we'll look at four ways of tracking your to-do list: plaintext files, Todo.txt, TaskWarrior, and Org-mode.
Plain (and simple) text
plain-text.png

I like to use Vim, but you can use Nano too.
The most straightforward way to manage your to-do list is using a plaintext file in your editor of choice. Just open an empty file and add tasks, one per line. When you are done, delete the line. Simple, effective, and it doesn't matter what you use to do it. There are a couple of drawbacks to this method, though. Once you delete a line and save the file, it is gone forever. That can be a problem if you have to report on what you have done this week or last week. And while using a simple file is flexible, it can also get cluttered really easily.
Todo.txt: Plaintext leveled up
todo-txt.png

Neat, organized, and easy to use
That leads us to the Todo.txt file format and application. Installation is simple—download the latest release from GitHub and run sudo make install
from the unpacked archive.
todo-txt-install.png

It works from a Git clone as well.
Todo.txt makes it very easy to add tasks, list tasks, and mark them as done:
todo.sh add "Some Task" |
add "Some Task" to my todo list |
todo.sh ls |
list all my tasks |
todo.sh ls due:2018-02-15 |
list all tasks due on February 15, 2018 |
todo.sh do 3 |
mark task number 3 as "done" |
The actual list is still in plaintext, and you can edit it with your favorite text editor as long as you follow the correct format.
There is also a very robust help built into the application.
todo-txt-vim.png

You can even get syntax highlighting.
There is also a large selection of add-ons, as well as specifications for writing your own. There are even browser extensions, mobile apps, and desktop apps that support the Todo.txt format.
tod-txt-gnome.png

Even GNOME extensions.
The biggest drawback to Todo.txt is the lack of an automatic or built-in synchronization mechanism. Most (if not all) of the browser extensions and mobile apps require Dropbox to perform synchronization between the app and the copy on your desktop. If you would like something with sync built-in, we have...
Taskwarrior: Now we're cooking with Python
taskwarrior.png

Isn't it fancy?
Taskwarrior is a Python application with many of the same features as Todo.txt. However, it stores the data in a database and has built-in synchronization capabilities. It also keeps track of what is next, notes how old tasks are, and will warn you if you have something more important to do than what you just did.
taskwarrior-complains.png

It's not wrong.
Installation of Taskwarrior can be done either with your distribution's package manager, through Python's pip
utility, or built from source. Using it is also pretty straightforward, with commands similar to Todo.txt:
task add "Some Task" |
Add "Some Task" to the list |
task list |
List all tasks |
task list due :today |
List all tasks due on today's date |
task do 3 |
Complete task number 3 |
Taskwarrior also has some pretty nice text user interfaces.
taskwarrior-vit.png

I like Vit, which was inspired by Vim.
Unlike Todo.txt, Taskwarrior can synchronize with a local or remote server. A very basic synchronization server called taskd
is available if you wish to run your own, and there are several services available if you do not.
Taskwarrior also has a thriving and extensive ecosystem of add-ons and extensions, as well as mobile and desktop apps.
taskwarrior-gnome.png

Taskwarrior looks really nice on GNOME.
The only disadvantage to Taskwarrior is that, unlike the other programs listed here, you cannot directly modify the to-do list itself. You can export the task list to various formats, modify the export, and then re-import the files, but it is a lot clunkier than just opening the file directly in a text editor.
Which brings us to the most powerful of them all...
Emacs Org-mode: Hulk smash tasks
emacs-org-mode.png

Emacs has everything.
Org-mode will run anywhere Emacs runs, and there are a few mobile applications that can interact with it as well. Unfortunately, there are no desktop apps or browser extensions that support Org. Despite all that, Org-mode is still one of the best applications for tracking your to-do list, since it is so very powerful.
Choose your tool
In the end, the goal of all these programs is to help you track what you need to do and make sure you don't forget to do something. While they all have the same basic functions, choosing which one is right for you depends on a lot of factors. Do you want synchronization built-in or not? Do you need a mobile app? Do any of the add-ons include a "must have" feature? Whatever your choice, remember that the program alone cannot make you more organized, but it can help.
7 Comments, Register or Log in to post a comment.
Hi.
time ago I wrote about Yokadi, a tool for GNU/Linux command line
https://victorhckinthefreeworld.com/2017/01/10/yokadi-maneja-listas-de-t...
And also Todolist, with a text and also web UI
https://victorhckinthefreeworld.com/2017/01/12/gestor-de-tareas-para-la-...
Happy hacking!
I've never been much of a fan of to-do lists. I have things I need to do, but they're in different categories, and levels of concern. I need to go buy food, I need to wash my car, I need to write some Python script, or write some article... Not very useful to lump these together.
I find the command line program remind, and remind-gui more suitable to what needs I have. You can access it on the command line with 'tkremind'. It has a default file it accesses, called .reminders, but you can create others, like .pythontasks, so instead you would type 'tkremind .pythontasks' It works on a calendar structure, but you can have things repeat daily for a period or forever until they're deleted. I've also set up aliases to type something like 'next4w', and have it show me in the terminal the next 4 weeks of this collection of information.
Tip of the hat for highlighting the use of the plain text file (which is my preferred way of doing things). It's simple, quick, and doesn't require any software you don't already have installed on your computer.
Sorry, I need to correct you. Taskwarrior is a C++ program and not written in Python. Even though there are extensions in several programming languages.
Adding to that there is a "task edit" command which allows you to edit tasks with the text editor of choice or modify existing tasks with "task modify".
Simplest of all and I have been using for over a decade:
SUMMARY:
$ touch ~/.db.txt
$ vi .bashrc
function edittext { vi ~/.db.txt; }
function findtext { grep -i $1 ~/.db.txt; }
function lesstext { less ~/.db.txt;}
$ source .bashrc
DETAIL: avoid if possible.
Other considerations:
- use your own names & locations
- use gedit, nano, emacs etc instead of vi
- for multiple servers allow edits on one server only, with comments
- use rsync and cron to sync .db.txt daily between servers
Use a category word on the left of each line and number the ones you want to organize - than write anything you want right of the catagory.
Use pipes to narrow your searches:
$ findtext perl | grep hash | grep reference
$ findtext network | grep 192.168
$ findtext recover | grep data |grep tools
I used TuDu for a long time (I eventually switched to Wunderlist). It handles sub-tasks really well and stores everything in a XML file.
I use Todo.sh and I like it very much.