Google Calendar CLI configuration
Set up your own Google client and choose which Calendar changes each profile may make.
Settings live in one file, config.json, in the folder gcal doctor shows. Each profile has its own part,
and defaults apply to every profile. This page lists how to see and change them.
gcal personal config show
gcal personal config set limit 50
gcal personal config unset limitconfig show lists each setting and where it came from: the file, a variable or the default.
Your own Google client
session start signs in through WireCat's Google app unless you name one of your own. The first of these wins:
--client-file <file>, your Desktop app client file, or--client-id <id>, its client ID;GCAL_GOOGLE_CLIENT_ID;- the
google_client_idsetting of the profile, then of the defaults:gcal config set --defaults google_client_id 1234-abc.apps.googleusercontent.com; - WireCat's app.
With 1 to 3, the secret comes from GCAL_GOOGLE_CLIENT_SECRET, never from the settings file. Google refuses a
Desktop app without its secret, so session start warns before the browser opens when it has none. Only you change
google_client_id: config set refuses it to an agent. gcal doctor shows the app a profile without its own setting
would use as oauth_client, with source flag, env, config or constants.
gcal refuses a client file other users of the computer can read. The client is needed only at sign-in: gcal keeps
it with the sign-in, so later commands and refreshes use the same app, even after you change the setting.
Make your own Google app walks through Google Cloud Console step by step.
Permissions
permissions decides what a command may do for this profile: allow, ask, readonly or deny, per permission
key. Each Google Calendar method has its own key, api.<method>, such as api.calendar.events.insert; api and
api.calendar.events name every method under them. The same key covers api call <method> and the method's own
command, api calendar-events-insert.
gcal personal config set permissions.api readonly # reads only, every method
gcal personal config set permissions.api.calendar.events.insert ask # be asked before each new eventWithout a setting of yours:
- A method that changes Calendar and is easy to undo, such as
calendar.events.insertorcalendar.events.patch, isallow, asevents createandevents updateare. - A method that deletes, such as
calendar.events.deleteorcalendar.calendarList.delete, isask. At a terminalgcalasks before it calls Google; in a script, add--yes. Over MCP there is no one to ask, soasklets the command run. - Sharing a calendar (
calendar.acl.insert,patch,update,delete) isask. Over MCP that means an agent can share your calendar with anyone without a question. Setpermissions.api.calendar.acl denyto stop it. - Deleting a whole calendar (
calendar.calendars.delete) and giving it to another account (calendar.calendars.transferOwnership) aredeny: neither can be undone. Set the key toaskorallowto let them run. sharing.notify, letting Google mail the person a calendar is shared with, isdeny. Google sends that mail unlesssendNotificationsisfalse, so while the key isdenya share must say--send-notifications false.- Emptying a calendar (
calendar.calendars.clear, every event of the main calendar) isdeny, and never offered over MCP. - The event writes that are easy to undo go ahead without a question:
events create,update,moveandrespondareallow, each under its own key, such asevents.create.events delete,--followingincluded, isask. events.notify, letting Google mail the other attendees (--notify), isdeny. Over MCPasklets a command run, so an agent could otherwise mail people.events.delete.series, deleting every occurrence of a repeating event (events delete --series), isdeny. A series update whose new--repeatrule ends it sooner (a newCOUNTor an earlierUNTIL) needs it too.
An event write also answers to the key of the Google method it calls, once you set that key: api.calendar.events.insert
for create, api.calendar.events.patch for respond, api.calendar.events.patch and api.calendar.events.update
for update (a switch between timed and all-day sends the whole event), api.calendar.events.delete for delete,
api.calendar.events.move for move. So permissions.api readonly stops the event writes too, and
permissions.api.calendar.events.insert ask makes events create ask. The built-in ask of
api.calendar.events.delete holds for the api commands only: events delete asks under its own key. One question
covers every key of one write.
The api commands answer to the same keys. An events method also needs the key of the events command that does
the same work, reads too: events.list for calendar.events.list and instances, events.show for get,
events.create for insert and quickAdd, events.import for import (so it asks, as events import does),
events.update for patch and update, events.delete for delete and for a patch to cancelled, events.move
for move. gcal api show <method> lists them under also_checks. A method that has Google mail the attendees (--send-updates other than
none, or --send-notifications true) also needs events.notify. Deleting an event, or patching it to cancelled,
also needs events.delete.series when the event repeats: gcal reads the event from Google first to find out.
Sharing a calendar (calendar.acl.insert, patch, update) also needs sharing.notify unless the call passes
--send-notifications false ("sendNotifications": false in api call --params); gcal never adds it for you.
Removing access (calendar.acl.delete) mails nobody, so it needs no extra key.
--dry-run lists every key a call checks, with its level, and calls nothing.
gcal personal config set permissions.events.notify allow # let --notify mail attendees
gcal personal config set permissions.sharing.notify allow # let a share mail the person it is shared with
gcal personal config set permissions.events.create ask # be asked before each new eventThese defaults only become stricter against a broader key: permissions.api allow keeps both the question and the
deny. To change one, set that method's own key, such as permissions.api.calendar.calendars.clear ask. A key that
names no method is refused, and gcal doctor lists any in the file. GCAL_READ_ONLY=1, or --read-only for one
run, refuses every write, whatever the permissions say. gcal <profile> mcp serve --permission api=readonly makes a
key stricter for that server only.
Run records
A command that fails is kept as a run, for gcal runs list and runs show. record_input decides whether a run
keeps the words you typed; it is true unless you set it to false. Secrets are masked either way; see
Security.