Taskwarrior – An Easy Way to Manage TODO List From The Command Line

Adding Tasks with priority: If you have important tasks We can add that as a priority tasks. Supported priority parameters are : H (high), M (medium), and L (low).

$ task add priority:H Reconfigure Easyapache4 in cPanel server
Created task 5.

Sample Output:

$ task list

ID Age  P Due        Description                                                                           Urg 
 3 4min   2017-04-06 Call to Bank                                                                           8.6
 4 1min   2017-04-12 Pay the rent                                                                          5.86
 5 5s   H            Reconfigure Easyapache4 in cPanel server                                                 6
 1 8min              Want to speak with mum                                                                   0
 2 7min              I have a meeting at 7.00 pm                                                              0
                     I have a training session at 7.30 pm
                     Dinner at 9.00 pm

5 tasks

Adding Tasks with project: We can group related tasks as a project to handle the tasks more efficiently. In my scenario, i’m reconfiguring Easyapache4 & Multiple PHP in server, so we can group them for better handling.

$ task add project:Server Reconfigure Easyapache4
Created task 6.
The project 'Server' has changed.  Project 'Server' is 0% complete (1 task remaining).

$ task add project:Server Reconfigure Multiple PHP
Created task 7.
The project 'Server' has changed.  Project 'Server' is 0% complete (2 of 2 tasks remaining).

Print project based Tasks: Use the following command to print project based Tasks

$ task list pro:Server

ID Age  Project Description                       Urg 
 6 2min Server  Reconfigure Easyapache4              1
 7 1min Server  Reconfigure Multiple PHP             1

2 tasks

Adding Tag to tasks: If you want to add a tag to tasks for more clarity. Use the following format.

$ task add +Linux +Server Reconfigure Easyapache4
Created task 8.

Print tasks based on tag: Use the following command to print tasks based on tag.

$ task list +Linux

ID Age  Tags         Description                 Urg 
 8 1min Linux Server Reconfigure Easyapache4      0.9

1 task

Adding Recurrence Tasks: If you have recurrence tasks, use the following format to create.

$ task add due:eom recur:monthly Pay Mobile bills
Created task 9 (recurrence template).

Sample Output:

$ task list

ID Age   P Project Tags         R Due        Description                                                                           Urg 
 3 26min                          2017-04-06 Call to Bank                                                                          8.61
 4 23min                          2017-04-12 Pay the rent                                                                          5.87
10 -                            R 2017-04-30 Pay Mobile bills                                                                       2.4
 5 22min H                                   Reconfigure Easyapache4 in cPanel server                                                 6
 8 2min            Linux Server              Reconfigure Easyapache4                                                                0.9
 1 31min                                     Want to speak with mum                                                                   0
 2 29min                                     I have a meeting at 7.00 pm                                                              0
                                             I have a training session at 7.30 pm
                                             Dinner at 9.00 pm
 6 20min   Server                            Reconfigure Easyapache4                                                                  1
 7 19min   Server                            Reconfigure Multiple PHP                                                                 1

9 tasks
Creating recurring task instance 'Pay Mobile bills'

Close the Recurrence Tasks: Additionally if you want to specify the end of the recurrence period, use the following format to create.

$ task add due:eom recur:monthly until:eoy Renew 2daygeek Cloud Server
Created task 11 (recurrence template).

Sample Output:

$ task list

ID Age   P Project Tags         R Due        Until Description                                                                           Urg 
 3 28min                          2017-04-06       Call to Bank                                                                          8.61
 4 26min                          2017-04-12       Pay the rent                                                                          5.87
10 2min                         R 2017-04-30       Pay Mobile bills                                                                       2.4
12 1min                         R 2017-04-30   9mo Renew 2daygeek Cloud Server                                                            2.4
 5 24min H                                         Reconfigure Easyapache4 in cPanel server                                                 6
 8 5min            Linux Server                    Reconfigure Easyapache4                                                                0.9
 1 33min                                           Want to speak with mum                                                                   0
 2 32min                                           I have a meeting at 7.00 pm                                                              0
                                                   I have a training session at 7.30 pm                                                     
                                                   Dinner at 9.00 pm                                                                         
 6 23min   Server                                  Reconfigure Easyapache4                                                                  1
 7 22min   Server                                  Reconfigure Multiple PHP                                                                 1

10 tasks
Creating recurring task instance 'Renew 2daygeek Cloud Server'

Modify/Edit Tasks

If you forget to add something in tasks, don’t worry we can use modify to include the missed things. For example, i have missed to include due date for Server Setup project, now i’m going to insert the details. Make sure you should have a tasks ID to modify it.

$ task 5 modify due:eom
Modifying task 5 'Reconfigure Easyapache4 in cPanel server'.
Modified 1 task.

Sample Output:

$ task list

ID Age   P Project Tags         R Due        Until Description                                                                           Urg 
 3 30min                          2017-04-06       Call to Bank                                                                          8.61
 4 28min                          2017-04-12       Pay the rent                                                                          5.87
 5 26min H                        2017-04-30       Reconfigure Easyapache4 in cPanel server                                               8.4
10 4min                         R 2017-04-30       Pay Mobile bills                                                                       2.4
12 2min                         R 2017-04-30   9mo Renew 2daygeek Cloud Server                                                            2.4
 8 6min            Linux Server                    Reconfigure Easyapache4                                                                0.9
 1 35min                                           Want to speak with mum                                                                   0
 2 33min                                           I have a meeting at 7.00 pm                                                              0
                                                   I have a training session at 7.30 pm                                                     
                                                   Dinner at 9.00 pm                                                                         
 6 25min   Server                                  Reconfigure Easyapache4                                                                  1
 7 23min   Server                                  Reconfigure Multiple PHP                                                                 1

10 tasks

Also you can remove anything from the tasks with help of modify. For example, we are going to remove tag from task 8.

$ task 8 modify -Server
Modifying task 8 'Reconfigure Easyapache4'.
Modified 1 task.

Sample Output:

$ task list

ID Age   P Project Tags  R Due        Until Description                                                                           Urg 
 3 38min                   2017-04-06       Call to Bank                                                                          8.61
 4 35min                   2017-04-12       Pay the rent                                                                          5.87
 5 34min H                 2017-04-30       Reconfigure Easyapache4 in cPanel server                                               8.4
10 11min                 R 2017-04-30       Pay Mobile bills                                                                       2.4
12 10min                 R 2017-04-30   9mo Renew 2daygeek Cloud Server                                                            2.4
 8 14min           Linux                    Reconfigure Easyapache4                                                                0.8
 1 43min                                    Want to speak with mum                                                                   0
 2 41min                                    I have a meeting at 7.00 pm                                                              0
                                            I have a training session at 7.30 pm                                                     
                                            Dinner at 9.00 pm                                                                         
 6 32min   Server                           Reconfigure Easyapache4                                                                  1
 7 31min   Server                           Reconfigure Multiple PHP                                                                 1

10 tasks

Print the tasks based on Priority

By default taskwarrior print the output based on the task modification time and date. So, you might have miss the priority tasks to complete on time. If you want to figure it out the priority tasks, just Use next option which used to print the output based on the tasks priority.

$ task next

ID Age   P Project Tag   Recur Due Until Description                                                                       Urg 
 3 41min H                     3w        Reconfigure Easyapache4 in cPanel server                                           8.4
 2 43min                       6d        Pay the rent                                                                      5.87
 8 19min                  P30D 3w        Pay Mobile bills                                                                   2.4
10 17min                  P30D 3w    9mo Renew 2daygeek Cloud Server                                                        2.4
 4 40min   Server                        Reconfigure Easyapache4                                                              1
 5 38min   Server                        Reconfigure Multiple PHP                                                             1
 6 21min           Linux                 Reconfigure Easyapache4                                                            0.8
 1 48min                                 I have a meeting at 7.00 pm                                                          0
                                         I have a training session at 7.30 pm                                                 
                                         Dinner at 9.00 pm                                                                     

8 tasks

How to use Filter

Use filters to print the tasks list which you want to see exactly.

Show tasks which I added in the last 4 days.

$ task entry.after:today-4days list

ID Age   P Project Tags  R Due        Until Description                                                                           Urg 
 2 45min                   2017-04-12       Pay the rent                                                                          5.87
 3 43min H                 2017-04-30       Reconfigure Easyapache4 in cPanel server                                               8.4
 8 21min                 R 2017-04-30       Pay Mobile bills                                                                       2.4
10 19min                 R 2017-04-30   9mo Renew 2daygeek Cloud Server                                                            2.4
 6 23min           Linux                    Reconfigure Easyapache4                                                                0.8
 1 50min                                    I have a meeting at 7.00 pm                                                              0
                                            I have a training session at 7.30 pm                                                     
                                            Dinner at 9.00 pm                                                                         
 4 42min   Server                           Reconfigure Easyapache4                                                                  1
 5 40min   Server                           Reconfigure Multiple PHP                                                                 1

8 tasks

Show tasks which I added by today.

$ task entry:today list

How to use Search

When we have more tasks, we can use search to print particular tasks. We can search tasks based on patterns, keywords & Regular Expressions.

Search with keyword

$ task /Renew/ list

ID Age   R Due        Until Description                     Urg 
10 23min R 2017-04-30   9mo Renew 2daygeek Cloud Server      2.4

1 task

Search with pattern

$ task description~Renew list

ID Age   R Due        Until Description                     Urg 
10 23min R 2017-04-30   9mo Renew 2daygeek Cloud Server      2.4

1 task

Search with Regular Expressions

$ task '/.* cPanel/' list

ID Age   P Due        Description                                  Urg 
 3 49min H 2017-04-30 Reconfigure Easyapache4 in cPanel server      8.4

1 task

Print Graph Reports

Taskwarrier has built in graph reports. We can get the reports based on daily, weekly, monthly, and anual.

Shows a graphical burndown chart, by day.

$ task burndown.daily
$ task burndown.daily
                               Daily Burndown ()
12 |
   |
   |
   |                                                               
   |                                                               
   |                                                               
   |                                                                     Done
   |                                                                     Started
 6 |                                                                     Pending
   |                                                               
   |                                                               
   |                                                               
   |                                                               
   |                                                               
   |                                                               
   |                                                               
 0 +----------------------------------------------------------------
     16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 01 02 03 04 05
     Mar                                             Apr

   Net Fix Rate:         -
   Estimated completion: No convergence

Shows a graphical burndown chart, by week.

$ task burndown.weekly

Shows a graphical burndown chart, by month.

$ task burndown.monthly

Start a task

When you are going to work on a particular task, i would advise you to kick start the task for easy identification.

$ task 3 start
Starting task 3 'Call to Bank'.
Started 1 task.

Stop the task

Once you done the active task, just run stop.

$ task 3 stop
Stopping task 3 'Call to Bank'.
Stopped 1 task.

Complete the task

If you successfully completed the task, just run done to make the task completed.

$ task 3 done
Completed task 3 'Want to speak with mum'.
Completed 3 task.
You have more urgent tasks.

Print Completed tasks

Run completed report to get the list of tasks which i completed as of now.

$ task completed

ID UUID     Created    Completed  Age   Due        Description           
 - 24154727 2017-04-05 2017-04-05 54min            Want to speak with mum
 - acbabff4 2017-04-05 2017-04-05 49min 2017-04-06 Call to Bank          

2 tasks

Delete the task

If you don’t want the task anymore, just run delete to remove the task from Taskwarrier.

$ task 6 delete
Delete task 6 'Reconfigure Easyapache4'? (yes/no) yes
Deleting task 6 'Reconfigure Easyapache4'.
Deleted 1 task.

Also we can remove the completed task by passing UUID values.

$ task 6 delete
Delete task 6 'Reconfigure Easyapache4'? (yes/no) yes
Deleting task 6 'Reconfigure Easyapache4'.
Deleted 1 task.

Read more about Taskwarrier

If you want to know more option which is available for Taskwarrier, simply navigate to man page.

# man task

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...