Install using pip::
pip install taskwarrior-hook-time-tracking
And add it to your Taskwarrior hooks::
mkdir -p ~/.task/hooks ln -s `which taskwarrior_timetracking` ~/.task/hooks/on-modify.timetracking
task <TASK ID> start and
task <TASK ID> stop to record when you have
started and stopped working on tasks.
Tracked time is stored in a task attribute named
the total number of seconds that the task was active.