Task management with Taskwarrior

I wanted a simple easy to use application for managing my todo list that was free and open source software (FOSS) which I could install on Linux systems, but which might also be available for other operating systems as well. There are online, commercial alternatives, but I wanted something I could put on my own systems with no fear that my data might disappear should a commercial entity not remain commercially viable. I found Taskwarrior, an open-source, cross platform time and task management tool with a command-line interface (CLI). The command line interface is helpful to me since I'm often working on systems via a Secure Shell (SSH) connection and would like to be able to add to my task list on those systems without using a graphical user interface (GUI).

I wanted to first install it on a CentOS Linux system. It isn't in the default software repositories for CentOS, but if you configure a CentOS system to use the EPEL repository, you can easily install the Taskwarrior package using yum with yum install task.



# yum install task
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * epel: mirror.cogentco.com
 * extras: mirror.umd.edu
 * updates: centos.mirror.constant.com
Resolving Dependencies
--> Running transaction check
---> Package task.x86_64 0:2.5.1-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch              Version                Repository       Size
================================================================================
Installing:
 task            x86_64            2.5.1-1.el7            epel            855 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 855 k
Installed size: 2.4 M
Is this ok [y/d/N]: y
Downloading packages:
task-2.5.1-1.el7.x86_64.rpm                                | 855 kB   00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : task-2.5.1-1.el7.x86_64                                      1/1 
  Verifying  : task-2.5.1-1.el7.x86_64                                      1/1 

Installed:
  task.x86_64 0:2.5.1-1.el7                                                     

Complete!
# rpm -qi task
Name        : task
Version     : 2.5.1
Release     : 1.el7
Architecture: x86_64
Install Date: Sat 02 Sep 2017 10:40:35 AM EDT
Group       : Applications/Productivity
Size        : 2504797
License     : MIT
Signature   : RSA/SHA256, Fri 26 Feb 2016 10:05:33 AM EST, Key ID 6a2faea2352c64e5
Source RPM  : task-2.5.1-1.el7.src.rpm
Build Date  : Wed 24 Feb 2016 10:19:34 PM EST
Build Host  : buildhw-09-nfs.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://taskwarrior.org
Summary     : Taskwarrior - a command-line TODO list manager
Description :
Taskwarrior is a command-line TODO list manager. It is flexible, fast,
efficient, unobtrusive, does its job then gets out of your way.

Taskwarrior scales to fit your workflow. Use it as a simple app that captures
tasks, shows you the list, and removes tasks from that list. Leverage its
capabilities though, and it becomes a sophisticated data query tool that can
help you stay organized, and get through your work.
#

Once it is installed, you can get help on using the program from the task man page by typing man task. You can add a new task by simply typing task add Task Description where Task Description is whatever text you wish to use to describe the task to be completed. The first time you use the program from an account you will be asked about the creation of a .taskrc file in the home directory for the account as shown below.

$ task add Locate Anaheim backup drive
A configuration file could not be found in 

Would you like a sample /home/jim/.taskrc created, so Taskwarrior can proceed? (yes/no) y
Created task 1.
$

You can see your list of tasks by simply typing tasks or task list.

$ task
[task next]

ID Age  Description                  Urg 
 1 6min Locate Anaheim backup drive    0

1 task
$

You can specify a due date for a task by putting due:day after the task description where day can be a day of the week or a calendar date, e.g., 2017-09-15. E.g., if today is Saturday September 2 and I want to complete a task by next Saturday, September 9, I could use due:Saturday as shown below. You can delete tasks by ID number.

$ task add Resolve problem with SORBS blocking AOL email due:Saturday
Created task 2.
$ task list

ID Age   Due        Description                                       Urg 
 2 3s    2017-09-09 Resolve problem with SORBS blocking AOL email      5.9
 1 10min            Locate Anaheim backup drive                         0


2 tasks
$ task delete 2
Delete task 2 'Resolve problem with SORBS blocking AOL email'? (yes/no) y
Deleting task 2 'Resolve problem with SORBS blocking AOL email'.
Deleted 1 task.
$ task list

ID Age   Description                      Urg 
 1 12min Locate Anaheim backup drive        0

1 task
$

If a task is due tomorrow, you can specify "tomorrow" after "due:" and the program will translate that into the calendar date. You can also specify a priority for a task. E.g., I could use priority:H if I wanted to indicate a task has a high priority. So, for the original example, I could have used the following command, instead of the one above.

$ task add Locate Anaheim backup drive due:tomorrow priority:H
Created task 2.
$ task list

ID Age P Due        Description                      Urg 
 1 9s  H 2017-09-03 Locate Anaheim backup drive     14.7

1 task
$

Instead of zero listed under the urgency column, I now see the urgency set to 14.7 and see "H" in the "P" column. The text color is changed as well. You can use "H", "M", or "L" for priority to indicate a task has either "high", "medium", or "low" priority. Options for dates related to a task include the following:

Save on a Computer: Run Windows, Mac, and Linux with VirtualBox
Save on a Computer: Run Windows,
Mac, and Linux with VirtualBox
1x1 px

  due:<due-date>
         Specifies the due-date of a task.

  recur:<frequency>
         Specifies the frequency of a recurrence of a task.

  scheduled:<ready-date>
         Specifies the date after which a task can be accomplished.

  until:<expiration date of task>
         Specifies  the expiration date of a task, after which it will be
         deleted.

With any todo list program, it is beneficial to be able to categorize items. Taskwarrior allows you to do so by specifying a project with project:ProjectName where ProjectName is the name of the project.

$ task add Schedule appointment with eye doctor due:2017-09-08 project:Personal
Created task 2.
The project 'Personal' has changed.  Project 'Personal' is 0% complete (1 task remaining).
$ task list

ID Age   P Project  Due        Description                              Urg 
 1 51min H          2017-09-03 Locate Anaheim backup drive             14.7
 2 10s     Personal 2017-09-08 Schedule appointment with eye doctor     7.38

2 tasks
$

If you have a lot of tasks, a means of filtering the list of displayed tasks is important. With taskwarrior, you can apply a filter to the list of tasks displayed as shown below.

$ task list

ID Age   P Project  Due        Description                              Urg 
 1 1h    H          2017-09-03 Locate Vanaheim backup drive             14.7
 2 21min   Personal 2017-09-08 Schedule appointment with eye doctor     7.39

2 tasks
$ task project:Personal
[task next ( project:Personal )]

ID Age   Project  Due Description                          Urg 
 2 21min Personal 5d  Schedule appointment with eye doctor 7.39

1 task
$ task due:tomorrow
[task next ( due:tomorrow )]

ID Age P Due Description                  Urg 
 1 1h  H 6h  Locate Vanaheim backup drive 14.7

1 task
$

Related articles:

  1. Installing support for the EPEL repository on CentOS
  2. Using the EPEL repository for a CentOS 7 system
  3. ToDoList