Skip to content


Switch branches/tags
This branch is 35 commits ahead, 15 commits behind mos3abof:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Toggl Target

At work, they track their working hours on Toggl (, so @mos3abof and @mtayseer created this small project to calculate how many hours they should work to achieve their monthly goals.

Installation on Linux

If you are using linux, you most probably have Python already installed on your machine. If not, use your distro's package management system to install Python 2.7

  • using a virtualenv is recommended. eg. mkvirtualenv togglcli

  • clone the source from this repository and cd to the source directory

  • run pip install . to install in your current environment (using the -e switch you can install using the source where it is cloned)

  • create a new/empty configuration file: ~/.togglcli/

  • get your Toggl API token from your Toggl account's settings and set API_TOKEN = "<the token>" in

  • you may override additional default settings in (find the defaults in togglcli/ in the source package)

    Do NOT copy togglcli/ to ~/.togglcli/, just create a new file there and override the default settings if necessary!

Installation on Windows

Install Python and pip, then follow the Linux instructions. Put the .togglcli directory in your user's home directory.


The script uses the Toggle reports API to read (surprise!) report data. It supports all three report types (weekly, details and summary). The output is somewhat formatted printed. See the script itself to customize the output.

Run it with the --help switch for instructions.

$ --help
usage: [-h] {weekly,details,summary} ...

positional arguments:

optional arguments:
  -h, --help            show this help message and exit

All commands accept a workspace id as argument. Get it by finding the "workspace_id" parameter in the url, when looking at the workspace you want.

If you omit the workspace ID, will use a WORKSPACE_ID value defined in, or fall back to using the first (often the only) workspace in your toggl account. So in many simple cases, you can just omit the workspace ID from the command line and the right thing will happen.

$ weekly --help
usage: weekly [-h] [workspace-id]

positional arguments:
  workspace-id  workspace id (default: None)

optional arguments:
  -h, --help    show this help message and exit

To use the target script run the following command :


The output will be something like :

Checking Internet connectivity...
Internet seems fine!

Trying to connect to Toggl, hang on!

So far you have tracked 120.00 hours

Business days left till deadline : 7
Total days left till deadline : 10

Required working hours for this month : 170

To achieve the minimum :
    you should log 4.00 hours every business day
    or log 3.00 hours every day

To achieve the required :
    you should log 7.00 hours every business day
    or log 5.0 hours every day

So far you have achieved:

70.59% [=================================================--------------|------]



Please submit any issues or feature requests to the github tracker. Pull requests welcome!


see LICENSE.txt


No releases published


No packages published


  • Python 100.0%