Best commandline time tracking application? [closed]

I'm looking for something that runs in a terminal and allows me to track time. I'd like it to be open source but that isn't necessary.

Most time tracking apps I've found are either web or gui based and there for take longer to enter data then I'd like.


Solution 1:

TimeTrap. It's simple and lightweight, and somewhat intuitive to use.

$ t switch World Domination Plan
$ t in --at "5 minutes ago" Research Volcano Islands
$ t out
$ t display
Timesheet World Domination Plan:
Day            Start      End        Duration   Notes
Mar 14, 2009   19:53:30 - 20:06:15   0:12:45    Research Volcano Islands
Total                                0:12:45

It's written in ruby an available as a gem on gemcutter or on github: http://github.com/samg/timetrap

A similar tool written in python is called TimeBook and available on bitbucket.

Solution 2:

a real basic one would be

$ echo `date`": what I'm doing now" >> timelog.txt

If you want to process it later, it's easier if you make that date +%s or date +%F%T.

You could wrap that as a shell script:

#!/usr/bin/bash -
echo `date +%s` $* >> ~/timelog.txt

Some hint of what you really want to do might help.

Solution 3:

I recently discovered TaskWarrior, which is purely CLI but quite feature-rich.

EDIT June 2015: Since I wrote this answer years ago, taskwarrior has developed in an awesome project with lots of features and integrations. Among my favourite there are:

  • https://inthe.am/about (web interface)
  • http://mirakel.azapps.de/index.html (android app)

More taskwarrior tools here.

Solution 4:

You could use wtime:

wtime [ -t task ] [ <action> ]

-t  task
    Specify the name of the task. It has to be  a  valid  file-
    name.  Only the first 32 characters are taken into account.
    The default value is "default".

action is one of the following:

-h  Display help.

-a  Start counting.

-s  Stop counting.

-c  Display current elapsed time in seconds.

-r  [ start [ end ]]
    Display time spent on the task during the  specified
    period.  The  parametres start and end represent the
    begginning and end of the reporting  period  respec-
    tively.  The  format  of start and end is '%d-%m-%Y'
    (see strptime (1)).  The default values are the cur-
    rent  time for end and the begginning of the current
    month for the start parameter.