To allow the tsk CLI to access your calendar, you must create a Google Cloud Project and generate OAuth 2.0 credentials. This process produces the credentials.json file required by the adapter.
tsk requests the
calendar.readonlyandcalendar.eventsscopes. This allows tsk to read your calendars and events, and respond to invitations (accept/decline/tentative). It cannot delete calendars or modify events in other ways. No surprise meetings will be created on your behalf.
- Go to the Google Cloud Console.
- Click the project dropdown in the top-left header (next to the Google Cloud logo).
- Click New Project.
- Project Name:
tsk-cli(or any name you prefer). - Click Create.
- Important: Wait for the notification, then click Select Project to switch to your new project.
- Open the sidebar (☰) and go to APIs & Services > Library.
- Search for:
Google Calendar API. - Click on the result card.
- Click Enable.
This defines what the user sees when logging in. Since this is a personal tool, we will use "External" mode with "Testing" status.
- Go to APIs & Services > OAuth consent screen.
- User Type: Select External.
- Click Create.
- App Information:
- App Name:
tsk-cli - User support email: Select your email.
- Developer contact info: Enter your email.
- Click Save and Continue (skip "Scopes" for now, we request them in code).
- Test Users (Crucial Step):
- Click + Add Users.
- Enter the exact Google email address you intend to use with the tool.
- Note: While the app is in "Testing" mode, only emails added here can log in.
- Click Save and Continue until you finish.
- Go to APIs & Services > Credentials.
- Click + Create Credentials at the top.
- Select OAuth client ID.
- Application type: Select Desktop app.
- Note: If you don't see this, ensure you are in the specific project, not the aggregate view.
- Name:
tsk-desktop-client(default is fine). - Click Create.
- A popup will appear saying "OAuth client created".
- Click the Download JSON button (looks like a downward arrow ⬇️).
- Rename the downloaded file to
credentials.json. - Move it somewhere safe — you'll tell tsk where to find it.
Now for the fun part.
A common spot is ~/.config/tsk/:
mkdir -p ~/.config/tsk
mv ~/Downloads/credentials.json ~/.config/tsk/Create ~/.config/tsk/config.yaml:
default_profile: work
profiles:
work:
credentials_file: ~/.config/tsk/credentials.json
token_file: ~/.config/tsk/token.jsontsk authThis opens your browser for Google login. You'll see the "unverified app" warning — that's fine, it's your app. Click through to authorize.
Once done, tsk saves a token file and you won't need to do this again (unless the token expires or you revoke access).
tsk next # what's coming up
tsk calendars # see your calendars
tsk tui # the full interfaceWant a personal calendar too? Add another profile:
profiles:
work:
credentials_file: ~/.config/tsk/credentials.json
token_file: ~/.config/tsk/token.json
personal:
credentials_file: ~/.config/tsk/personal_credentials.json
token_file: ~/.config/tsk/personal_token.jsonThen authenticate and use it:
tsk auth --profile personal
tsk next --profile personalYou'll need separate credentials for each Google account (repeat the Cloud Console setup above).
- Error 403: Access_denied: This usually means you forgot to add your email to the Test Users list in Phase 3.
- "Google hasn't verified this app": This is normal. Since you wrote the app and it's in Testing mode, click Continue (or "Advanced" > "Go to tsk-cli (unsafe)") to proceed.