Managing Your Tasks with Todo.txt

In all the time I've been publishing the Plain Text Project, there's one plain text tool that I haven't taken a dive into. That's strange, because it's a tool that I've used quite extensively in the past (and may again in the future). And it's a tool that I think is very useful.

That tool? Todo.txt. So why don't we (finally!) take a closer look at Todo.txt?

A Quick Intro

Todo.txt is a shell script. To use it, you'll need a bash shell. That's not a problem if you use Linux or Mac OS 014 they both come with one built in. Windows users, on the other hand, are out of luck. Unless, of course, they use something called Cygwin (tools that add a Linux-like environment to Windows).

Todo.txt is easy to use. If you're a command-line tyro, you'll quickly get the hang of it — especially if you use the online help — just type -h.

As a test, I got my wife (who lives in the GUI world and never touches the command line) to take Todo.txt for a spin. After spending a minute or three to get oriented, she was comfortably using Todo.txt.

Getting Going

Download Todo.txt. It comes in an archive that contains two files:

Extract the files to a folder in your path — on my Linux-powered laptop, I put the files into the folder /home/bin. Then, open the file todo.cfg in a text editor and change the entry EXPORT TODO_DIR= to point to where you want to store the file that contains your list of tasks.

For example, I like to make my todo list available across all of my devices. So, I point the script to the folder /home/scott/Nextcloud/todotxt/ which syncs my tasks using Nextcloud.

Using Todo.txt

With that out of the way, it's time to get to work. That means adding tasks to your list.

To add a task, open a terminal window and type this: add "[your task]"

Where [your task] (and remember to enclose it in quotes) is a description of what you need to do — for example, "Finish hanging the shelves in the cupboard". In case you're wondering, that's one of my many outstanding tasks. Todo.txt writes the task to a text file called ... wait for it: todo.txt.

Keep doing that until you've entered all of your tasks.

Viewing Your Tasks

So you've got a list of tasks. Now what? To know what you need to do, you need to see those tasks.

To view your tasks, type: list

You'll notice that each task has a line number. That helps you when you're marking a task as done or adding a priority to an existing task.

Marking a Task as Done

Knocking an item off your task list always feels good, doesn't it? To do that, type: do line_number

Where line_number is the number of the line in the file todo.txt on which the task resides. When you use the do option, the task moves out of the your task file and into a file called done.txt.

Getting Your Priorities Straight

Of course, not every item in your task list has the same importance. Some are more important than others.

You can prioritize tasks using letters of the alphabet. You can, for example, mark you most important tasks with an A. Mark tasks of lesser importance with a B, and right on down the alphabet.

To prioritize an existing task, type: pri line_number letter


The drawback to this is that you need to know the number of the line in todo.txt that contains the task (specified by line_number). Use the list option to find the task's line number.

When you view you list of task, the one to which you've added priorities are colour coded.

Final Thoughts

You can do more with Todo.txt, including adding tags and GTD-like contexts to your tasks, and adding due dates and times. I'll be looking at all of that that in a future article.

Using a text file is a simple solution to the problem of keeping track of your tasks. Of course, it only works if you use it. Todo.txt makes it easier to work with your tasks in a text file, while also offering a few features that you'll find useful.