Simple CLI for tracking work hours into Google calendar.
- Clone this repo
git clone https://github.com/LeanderGangso/goc.git - Build the executable
go build cmd/goc.go - Make sure
gocis executable, if not run:chmod +x goc - Move the
gocfile into/usr/local/binor any other folder that is in your$PATH - Run
goc setupto configure google app and calendar - Run
gocto see help and usage, andgoc help COMMANDto see command info
You can use this both for Mac and Windwos, but tweaks may be needed. Just follow the steps above and make changes where applicable.
Note that, unless you put your google app in production, the refresh token only lasts for 7 days.
If the refresh token expires the token.json will be deleted and you will be prompted to reauthenticate on he next command.
You can set your application in production mode without a review, but will show a warning when you or other users authenticate with your app.
See help:
# show help
goc
# show command help
goc s -hBasic usage:
# start task at the current time
goc s 'task name'
# see status of current task
goc st
# end current task at the current time
goc eCustom times (format: HHMM):
# start task at a different time
goc s -t 0800 'task name'
# start new task that will end the previous task
goc s -t 1000 'new task'
# end current task at a different time
goc e -t 1600Alias usage:
# list aliases
goc l
# new alias
goc a 'alias name' 'task name'
# use alias
goc s 'alias name' 'optional description'
# remove alias
goc r 'alias name'