DEV Community

Cover image for Tracking my working time using timetrace
DB
DB

Posted on

Tracking my working time using timetrace

In my new job, I'm not required to track my working time anymore. This feels great, but since I'm getting paid for working 40 hours a week, I decided to track it myself and built a simple and friendly CLI tool: timetrace.

Alt Text

Installing timetrace

timetrace is available for many platforms. Since I'm on macOS, I'll simply use Homebrew:

brew tap dominikbraun/timetrace
brew install timetrace
Enter fullscreen mode Exit fullscreen mode

For other installation methods, check out the installation instructions.

Creating a project

timetrace uses projects to store what you are currently working on. For example, creating a project called make-coffee is pretty simple:

timetrace create project make-coffee
Enter fullscreen mode Exit fullscreen mode

Tracking time

To start tracking time for a project, run the start command and provide the project name:

timetrace start make-coffee
Enter fullscreen mode Exit fullscreen mode

You'll see the following output:

✔️ Started tracking time
Enter fullscreen mode Exit fullscreen mode

Current tracking status

What project are you currently working on? And how long have you been working on it? The status command answers such questions.

timetrace status
+-----------------+--------------------+--------------+
| CURRENT PROJECT | WORKED SINCE START | WORKED TODAY |
+-----------------+--------------------+--------------+
| make-coffee     | 0h 5min            | 4h 20min     |
+-----------------+--------------------+--------------+
Enter fullscreen mode Exit fullscreen mode

Stop tracking time

Once you've finished your work, stop tracking time.

timetrace stop
Enter fullscreen mode Exit fullscreen mode

List today's records

Tracked time is stored as a record. To list all records, use the list records command and provide the current date. On our example, this is only one record:

timetrace list records 2021-05-18
+---+-------------+-------+-----+----------+
| # |   PROJECT   | START | END | BILLABLE |
+---+-------------+-------+-----+----------+
| 1 | make-coffee | 14:44 | --- | no       |
+---+-------------+-------+-----+----------+
Enter fullscreen mode Exit fullscreen mode

This overview is useful for running other commands like get record, edit record or delete record, since you'll have to provide the record's start time for them.

To get a complete list of available commands, run timetrace -h or check out the command reference

Planned features

This was a quick usage example including the most important commands I'm using every day. But there are more advanced features planned. Some of them are:

  • Lengthen and shorten existing records
  • Generating reports of tracked time
  • Reverting changes done with edit or delete
  • Project modules for managing sub-modules

If you'd like to contribute or have some suggestions, check out timetrace's open issues!

Top comments (0)