Toggl Extension for VSCode
Track your working hours in Toggl directly in your VS Code. :watch:
Features and Commands
toggl.startEntry: starts a new entry on toggl.com with the provided input
toggl.startExistingEntry starts an existing entry on toggl
toggl.stopEntry: stops the current entry
toggl.openToggl: opens toggl.com in the browser
- status bar shows current task and opens toggl.com when clicked
- Polling: fetches data periodically from toggl to show the current task in the
Currently the extension does provide the following settings:
toggl.apiKey: your private API key
toggl.defaultProjectId: all created tasks will use this as assigned project.
You can get the id from the projects overview.
Simply select the project and obtain the id from the url. Example: the id of
https://www.toggl.com/app/projects/xxxxx/edit/12345678 would be
toggl.pollingTimeout (Default: 3): timeout between polling intervals, when the extension
fetchs the latest current task from toggl. In order to not hit toggl's rate limit
you cannot set it below 3 seconds.
Development & Contribution
How to develop
In order to run the VS Code in debugger mode execute the
View: Show Debug
command and start the
Extension task (see configuration in
A new VS Code Window in debugger mode will open. When you changed something in
the code, you have to execute
Reload Window to see the changes.
A guide about "Creating a VS Code Extension" can be found here.
How to test
Either open the debug tab in your VS Code and start the
Extension Test task,
npm t in the terminal. When you run it in the terminal, make sure no
other VS Code instance is running.
Jest is used for testing, and the implementation is
inspired by the Unibeautify/vscode package.
Configuration and API
I have not yet tested these tools, but I'll keep them here for the future.
Todos and Ideas
There are some further ideas and tasks left to make this extension better. You
can take a look at the projects
tab to see what I have in mind, planned and what is still left. Feel free to
This extension is not affiliated, associated, authorized, endorsed by or in any
way officially connected to Toggl (toggl.com).