Debdeep Bhattacharya

View My GitHub Profile

A quick guide to managing tasks using taskwarrior

14 Sep 2019

Taskwarrior is a command-line based productivity software. You can use it to maintain a simple shopping list, but it is capable of much more. It is lightweight, open-source and most importantly, terminal-based. This makes it much more powerful than other TODO lists such as Trello.

It is easy to run a Taskwarrior server locally and manage tasks over a group of people.

Install

Run

Then run it using task. You’ll be prompted to create the config file. Say yes. Modify the .taskrc file to use the light-256 theme, which works best with white terminal background. If you ever consider shifting to a darker terminal, consider exploring other themes. I recommended dark-256, obviously.

git add the files: .taskrc, and the directory .task so that you can have them forever.

Basic commands

Best practices for a functional workflow

This part is taken from best practices suggested by the author.

Adding due dates:

The rules for date and time format can be changed from rc.dateformat setting, but the default setting prints the date in the British format.

Example:

task add Open the store due:2015-01-31T08:30:00
task add Pay the rent due:eom

Here the synonym eom means ‘end of the month’. Synonyms are a useful shortcut to entering lengthy dates. Here is the full set:

now today sod eod yesterday tomorrow monday january later someday soy eoy soq eoq som socm eom eoc

Here, eo=end of, so=starting of (the next), soc=starting of the current, d=day, w= week, m=month, y=year, q=quarter etc. See here for more details.

The rc.dateformat setting in taskrc allows you to specify other formats for date input. It supports standard date and time formats (without the %).

Recurring task

A recurring task is a task with a due date that keeps coming back as a reminder. Here is an example:

task add Pay the rent due:1st recur:monthly until:2015-03-31

Formatting the report

To get rid of unnecessary info that is displayed, this page can be a lifesaver. Here is what I found most useful.

Adding the line verbose=no to the file .taskrc will help you get rid of the footnote and header.

Here is an example of a custom report called “verybasic” which contains very specific columns that we want, in our desired order. Either add the following lines to .taskrc or add task to the beginning of every line and run individually in terminal (both have the same effect):

report.verybasic.description='A list with very basic information, created by me.'
report.verybasic.columns=id,project,tags,description.count,due
report.verybasic.sort=start-,urgency-
report.verybasic.filter=status:pending

To make this report your default output report, add to your .taskrc:

default.command=verybasic

or, issue this command in terminal: task config default.command 'verybasic'

To see this custom report in action, just run task verybasic. Detailed documentation found here.

Other useful commands

Syncing your tasks through a remote server and access it on Android

The website freecinc provides a service to host your tasks so that you do not need to set up your own server. To use this, simply log in to the website and follow their instruction. After you are done, in order to sync manually, run task sync in your client and done. To automate it, add this to your crontab -e:

# Syncing task warrior
3 */2 * * * task sync && notify-send "Syncing Tasks"

which sends out a little notification every time syncing is performed.

Mirakel (Caution: Outdated. Use Task Warrior for Android instead)

On Android, the app Mirakel (Caution: outdated) gives you a way to upload a specially created config file so that you can sync with your server (freecinc, in this case). Format of this config file:

username: foo
org: bar
user key: <your key here> 
server: localhost:6544
client.cert:
-----BEGIN CERTIFICATE-----
…
-----END CERTIFICATE-----
Client.key:
-----BEGIN RSA PRIVATE KEY-----
…
-----END RSA PRIVATE KEY-----
ca.cert:
-----BEGIN CERTIFICATE-----
…
-----END CERTIFICATE-----

Get your username, org and server from the line starting with taskd.credentials= in the file ~/.taskrc. The format of that line is

	taskd.credentials=org\/username\/user_key

Note that the org comes before the username. Get your server from the line staring with taskd.server=. Finally, insert the contents of the file *.cert.pem, *.key.pem, *.ca.key. Save it with any name and send it to the mobile phone so that you cam import it into Mirakel.

Tips: Use arithmetic operations in attributes:

 	task add newtask due:2days scheduled:due-1day

inthe.AM

My new favourite is inthe.AM. This one has a web front-end as well as a nice server. Works similarly. You have to login with your email.

To use Mirakel effectively, I use several UDAs which are defined in my taskrc.

Another Andriod App

Task Warrior for Andriod is the most functional development so far, although it is a bit buggy at times.

Process Management

It is easy to set up Kanban or GTD with Taskwarrior. There are many extensions. Here is a whole list of tools developed around it. Here are a few.