toggl-sync
A tiny cli command/daemon for syncing toggl time entries with Jira
Installation
Install the app via brew package manager.
brew tap timemate/tap
brew install toggl-sync
Configuration
Toggl
- Login to your toggl account
- Visit https://track.toggl.com/profile
- Find API token
Jira
- Login to your atlassian account
- Visit https://id.atlassian.com/manage-profile/security
- Create new API token with a name: toggl-sync
Config
Create a file in ~/.toggl-sync/config.yaml
tracker:
- type: toggl
token: "token-from-toggl"
# places to sync time entries with
sync:
- type: jira
url: https://customer-host.atlassian.net
login: [email protected]
token: "token-from-jira"
projects:
- DO
- DEV
projects
it's a list of project keys in Jira.
Run the app
Brew service
brew services start toggl-sync
The program will start on system start up.
Find logs in here tail -f $(brew --prefix)/var/log/toggl-sync/toggl-sync.log
One time run
toggl-sync sync -period 2w
Where -period
specifies the period of time from current moment to sync. In this example 2w
- 2 past weeks.
As a service
toggl-sync sync -period 1d --service
Where --service
allows program to work as a daemon, it will repeatedly sync time entries every 1 day (1d
).