Getting Things Done with Task Warrior

by
Tags:
Category: ,

Sometimes I need to keep a list to keep me on target. Since I spend most of my day on a command line I need to minimize death by alt-tab. That’s one of the things that stops me from using the various beautiful task apps on the desktop.
When I was introduced to the spectacular command line GTD/task manager Task Warrior and was instantly hooked. It has got a crazy amount of features to keep you organized. Lets get right into it with a quick tutorial of some of the nicest features. The scenario will be writing this blog post.

Installation

First we have to get it on our system. If you’re using OS X and brew (you are using brew, right?)

brew install task

On a Debian linux, thenhttps://taskwarrior.org/docs/30second.html

sudo apt-get install task

Adding tasks

Let’s begin by adding our main goal, writing this blog post.

$ task add "Write blog post on how awesome task warrior is" project:blog +taskwarrior

Task warrior responds with a request to make a config file:

A  configuration file could not be found in
Would you like a sample /Users/<username>/.taskrc created, so taskwarrior can proceed? (yes/no)

We’ll answer yes for the default location. Task warrior supports specifying a config file, but knows to look in this location.
After answering ‘yes’ task warrior tells us that the task is created:

Created task 1.
The project 'blog' has changed.  Project 'blog' is 0% complete (1 of 1 tasks remaining).

Now lets add the subtask that this main goal depends on.

$ task add "install task warrior on os x" project:blog +taskwarrior
Created task 2.
The project 'blog' has changed.  Project 'blog' is 0% complete (2 of 2 tasks remaining).

I’ve specified that this task belongs to the project “blog” and I’ve tagged it with “taskwarrior”. You can see task warrior will reply with the creation of the task and the task ID. Let’s add a few more.

$ task add "install task warrior on linux" project:blog +taskwarrior
$ task add "find and install markdown editor/viewer" project:blog +taskwarrior

Modifing tasks

OK so now we have 4 new tasks, but some of them are really subtasks, or blocking tasks. Lets look at that list:

$ task ls
ID Proj Age Description
 1 blog 9m  Write blog post on how awesome task warrior is
 2 blog 3m  install task wrrior on os x
 3 blog 25s install task warrior on linux
 4 blog 5s  find and install markdown editor/viewer
4 tasks

Tasks 1 depends on tasks 2-4, so I’m going to let task warrior know that.

$ task 1 modify depends:2-4
Modifying task 1 'Write blog post on how awesome task warrior is'.
Modified 1 task.
Project 'blog' is 0% complete (4 of 4 tasks remaining).

What did that do? Lets ask task warrior what information it has on that first task.

$ task 1 info
Name                 Value
ID                   1
Description          Write blog post on how awesome task warrior is
Status               Pending
Project              blog
This task blocked by 2 install task warrior on os x
                     3 install task warrior on linux
                     4 find and install markdown editor/viewer
Tags                 taskwarrior
UUID                 fd0c5165-c189-4616-a680-cc9599df0a8d
Entered              11/22/2013 22:32:13 (15 mins)
Urgency              -3.2
Last modified        11/22/2013 22:47:44 (4 secs)
Date                Modification
11/22/2013 22:47:44 Dependencies set to '2, 3, 4'.
                    Modified set to '11/22/2013 22:47:44'.

So right there in the middle, Task Warrior did what we asked and it knows task 1 is blocked by tasks 2, 3 and 4.
Lets give task warrior some more information about our tasks. Lets assign some priorities. Finding that markdown editor is pretty low on the food chain.

$ task 4 modify priority:L

Since any priority is greater than no priority lets say the rest are of Medium priority.

$ task 2,3 modify priority:M

Task selection

Lets say the blog post deadline is in 2 days.

$ task 1 modify due:2d

That means the other 3 tasks are due before that. Task warrior knows the relationship, we don’t need to tell it that these other tasks need to be done first. “But task list shows the main task first”, you say. Hold on to your hats…

$ task next
ID Proj Pri Due        Age Urg  Description
 2 blog M              29m 13.7 install task warrior on os x
 3 blog M              26m 13.7 install task warrior on linux
 4 blog L              26m 11.6 find and install markdown editor/viewer
 1 blog     11/24/2013 35m 4.96 Write blog post on how awesome task warrior is

Task warrior has taken everything we’ve told it and figured out what the urgency of our tasks are!

So looking at this the most urgent task is that I need to install task warrior on os x. OK, lets start that.

$ task 2 start

That’s easy so lets say that’s done. And lets say I started my VM and installed the linux client too.

$ task 2 done
$ task 3 done

Check out how Task warrior kindly lets us know how our project is going!

The project 'blog' has changed.  Project 'blog' is 50% complete (2 of 4 tasks remaining).

OK, so what’s next?

$ task next
ID Proj Pri Due        Age Urg  Description
 2 blog L              23h 11.6 find and install markdown editor/viewer
 1 blog     11/24/2013 23h 4.96 Write blog post on how awesome task warrior is

I don’t need that markdown editor anymore. Let’s get rid of that.

$ task 2 delete

Reporting

My memory’s not what it once was, I need a reminder of what I did so far.

$ task timesheet
11/17/2013 - 11/23/2013
  Completed (2 tasks)
    Project Due Description
    blog        install task warrior on os x
    blog        install task warrior on linux
  Started (0 tasks)

Nice. This is kinda useful for daily stand ups. Unfortunately it doesn’t show at a daily level but can serve as a reminder. This command can show multiple weeks by adding the number as a parameter. For instance 2 weeks could be shown with task timesheet 2.
But if Task Warrior knows what I need to do and when I’ve done it, can it give me an estimate of when I’ll be done? You bet it can. It can give you burndown charts at a daily, weekly and monthly level.

$ task burndown.daily
Add rate:         4/d      Estimated completion: No convergence
Done/Delete rate: 2/d

We can see that I’m creating tasks twice as fast as I’m completing them so I’m burning up. But you can imagine how estimated completion would come in over time as the Add rate fell before the Done rate. Here’s a more impressive chart from a project I’m currently working on.
Real Daily Burndown
Time Warrior has many more reporting commands and even supports custom reports. I suggest playing reading up and playing around with the following.

task ghistory
task history
task long
task calendar

Filtering

Every one of the commands I demonstrated can be filtered by the various metadata they were added with. Since I added all the tasks to the ‘blog’ project I could filter all command with project:blog if I had more varied tasks. This means you can have reporting as specific as you want!

task ghistory project:blog
task burndown.daily +taskwarrior

Clean up

I’ve only touched on the basics here, Task Warrior goes much deeper and I suggest reading through the few tutorials on the Task Warrior wiki.

And finally:

$ task 1 done
Completed task 1 'Write blog post on how awesome task warrior is'.
Completed 1 task.
The project 'blog' has changed.  Project 'blog' is 100% complete (0 of 3 tasks remaining).