Google Calendar CLI app extending the Go quickstart for Google calendar.
- Go minimum version 1.19
- Clone this repository
- Follow the environment instructions here to obtain the API credentials required.
- Rename your generated credentials as
myCalAppCredentials.json
. Rename.env.sample
as.env
and replace the value ofMYCAL_CREDENTIALS_DIRECTORY
with the path to the parent directory of your generated credentials file.
Note
MYCAL_CREDENTIALS_DIRECTORY
is also where the generated token will be stored. If this env is not set the current working directory will be used; this will have the side effect of needing to generate new tokens in each new directory where the myCal command is run for the first time.
go run .
-
Build the app
go build
-
Confirm the directory where the go app will be installed
go list -f '{{.Target}}' // Example output: /Users/oredavids/go/bin/myCal
-
Install the app
go install
-
Update your shell config file (e.g bashrc, .zshrc, etc)
export PATH=$PATH:/Users/oredavids/go // Add directory, confirmed earlier, to your PATH variable export MYCAL_CREDENTIALS_DIRECTORY=/Users/path/to/credentials/directory // Where installed app can find your API credentials & store your token myCal // OPTIONAL - Run myCal automatically when new terminal window is opened
Now that the app has been installed and configured you can run the executable anywhere, manually with:
myCal