{ claus.conrad }

Toggl command line on Windows

đź“… Jan 25, 2015
⌛ 1 minute

How to run toggl-cli on Windows (using Git bash):

  1. Make a directory for user binaries:

    mkdir -p ~/bin
    
    Shell
  2. …and change to it:

    cd ~/bin
    
    Shell
  3. Clone the repository into the subdirectory “toggl-cli”:

    git clone https://github.com/drobertadams/toggl-cli.git
    
    Shell
  4. Install prerequisites (“requests” was not mentioned in the README, but did need to be installed on my system with ActiveState Python 2.7):

    pip install iso8601 pytz requests
    
    Shelll
  5. Run the program once, don’t be afraid when it crashes, this is expected because of the missing configuration file (which it creates during this run):

    python ~/bin/toggl-cli/toggl.py
    
    Shell
  6. Edit the configuration file:

    vim ~/.togglrc
    
    Shell
  7. Update the line “username” with the “E-mail” and the line “apitoken” with the API token from your Toggl profile, e.g.:

    Screenshot of a text editor with the file '~/.togglrc' opened and the sections 'auth' and 'options' visible

  8. Save and close the configuration file.

toggl-cli is now ready for use (you might want to add it to your PATH and change the shebang line to your Python interpreter for ease of use). Some usage examples:

  • Start working on a task:

    python ~/bin/toggl-cli/toggl.py start Blogging
    
    Shell
  • Stop working on a task:

    python ~/bin/toggl-cli/toggl.py stop
    
    Shell
  • Continue working on a task:

    python ~/bin/toggl-cli/toggl.py continue Blogging
    
    Shell
  • View more advanced syntax examples:

    python ~/bin/toggl-cli/toggl.py -h
    
    Shell