Discover, install, and configure shell plugins with Fig Plugin Store →

Toggl Zsh Plugin

A oh-my-zsh plugin, printing the working hours of the current week tracked in (for OSX).

5 stars
0 forks

Toggl Plugin for zsh


:watch: get the total working hours of the current week with the toggl-week command:

$ toggl-week
$ You've worked 38 hours, 55 minutes and 46 seconds this week.


in your ~/.zshrc

git clone
  • source the script at the end of ~/.zshrc:
source /path/to/toggl-zsh-plugin/toggl.plugin.zsh
  • source ~/.zshrc to take changes into account:
source ~/.zshrc

with oh-my-zsh

git clone ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/toggl
  • Activate the plugin in ~/.zshrc by adding toggl to the plugins section:
plugins=( [plugins...] toggl)
  • source ~/.zshrc to take changes into account:
source ~/.zshrc

With antigen

Having antigen properly installed, just run:

antigen natterstefan/toggl-zsh-plugin


Add the following environment variables to your ~/.zshrc:

# open Select the workspace you want to use,
# click on the three dots and open "Settings". Get the id from the URL in your
# browser. Eg.
export TOGGL_WORKSPACE_ID="12345678"

# open and select the project(s) you want to
# use in the report. Again copy the id from the url. In this case
# the id would be 98765.
# This value can look like: "98765" or "98765,43210" for multiple project ids.
export TOGGL_PROJECT_IDS="98765"

# open and get the API token from the bottom of
# the page
export TOGGL_API_TOKEN="eNw1y5uVyYfW3aSVhHDZCcyAZGDfvezi1DmxjVXo"


git clone
mkdir ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/toggl
ls -s toggl.plugin.zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/toggl/toggl.plugin.zsh

You are now ready to develop. After changing your code, you need to restart the terminal or source ~/.zshrc again. Don't forget to remove the symlink, in case you start from Installation again.

If this does not work, I recommend to create tmp/ and make it executable. Then copy and paste the code from toggl.plugin.zsh into the file. Now, make changes and test it with ./tmp/ Once you are done, copy the code back into toggl.plugin.zsh.


Apache 2.0

This extension is not affiliated, associated, authorized, endorsed by or in any way officially connected to Toggl (


Stefan Natter