GCal CLI
for cmdhub.
Calendars, events, freebusy, and slots from the terminal.
cmdhub get gcal
data_object Agent Contract
Agents should start with auth/status and discovery commands, inspect schemas before composition, and treat commands marked as mutating as state-changing operations.
Output
Use human output for normal reads, `--json` for scripting or complete structured fields, and `--jsonl` for upstream pipe inputs.
Auth
Google OAuth. Used for calendars, events, and availability.
Refs
Prefer list/search, then short refs or piped JSONL. Use `resolve` to inspect cached refs.
Schemas
Use `gcal schema` and `catalog.json` to inspect fields, flags, examples, and side effects.
Auth scopes
openidemailhttps://www.googleapis.com/auth/calendar.eventshttps://www.googleapis.com/auth/calendar.calendarlist.readonlyhttps://www.googleapis.com/auth/calendar.calendars.readonlyhttps://www.googleapis.com/auth/calendar.freebusyterminal Command Reference
Generated from source. Global flags apply to all commands.
Global Flags
--json
bool
Emit JSON machine output--jsonl
bool
Emit JSONL records for piping--output, -o
string
Compatibility output mode: json|jsonl. Prefer --json or --jsonl--view
string = summary
View mode: summary|full--profile
string = default
Config/auth profile--config
string
Config path override--quiet, -q
bool
Suppress non-essential diagnostics--debug
bool
Enable debug diagnostics--limit
int = 50
Maximum items to emit--page-size
int = 50
Requested upstream page size--cursor
string
Continuation cursor--no-paginate
bool
Fetch only one page--version, -v
bool
Print version informationgcal auth
Manage Google Calendar authenticationgcal auth login
Authenticate with a Google loopback OAuth grantgcal auth logout
Remove the stored Google loopback OAuth grantgcal auth refresh
Refresh the stored Google loopback OAuth grantgcal auth status
Show Google loopback OAuth grant statusgcal auth whoami
Show the current Google Calendar identitygcal calendar
Manage calendarsgcal calendar get
Get a calendargcal calendar list
List calendarsgcal calendar search
Search calendars by summary--query
string
Search textgcal capabilities
Describe capabilities--section
string
Show one capability section: scopes, schemas, or commandsgcal config
Inspect local configurationgcal config explain
Explain resolved configurationgcal doctor
Run gcal diagnosticsgcal event
Manage calendar eventsgcal event create
Create an event--all-day
bool
All-day event--attendee
stringArray = []
Attendee email; repeatable--calendar
string = primary
Calendar selector--description
string
Description--duration
string
Duration--end
string
Event end--location
string
Location--optional-attendee
stringArray = []
Optional attendee email; repeatable--resource
stringArray = []
Room/resource attendee email; repeatable--send-updates
string
Guest notification policy: all, externalOnly, or none--start
string
Event start--title
string
Event title--yes, -y
bool
Accepted for compatibility; this command is already non-interactivegcal event delete
Delete an event--all
bool
Confirm batch event delete--calendar
string
Optional calendar selector--dry-run
bool
Preview event delete without deleting--yes, -y
bool
Confirm destructive event deletegcal event get
Get an event--calendar
string
Optional calendar selectorgcal event list
List events--calendar
string = primary
Calendar selector--from
string
Start time--to
string
End time--today
bool
Today window--tomorrow
bool
Tomorrow window--week
bool
Week windowgcal event quick-add
Create an event from natural text--calendar
string = primary
Calendar selector--send-updates
string
Guest notification policy: all, externalOnly, or none--text
string
Quick-add text--yes, -y
bool
Accepted for compatibility; this command is already non-interactivegcal event search
Search events--calendar
string = primary
Calendar selector--from
string
Start time--query
string
Search query--to
string
End timegcal event update
Update an event--add-attendee
stringArray = []
Add attendee email; repeatable--all-day
bool
All-day event--attendee
stringArray = []
Compatibility alias for --add-attendee; repeatable--calendar
string
Optional calendar selector--description
string
Description--duration
string
Duration--end
string
Event end--location
string
Location--remove-attendee
stringArray = []
Remove attendee email; repeatable--send-updates
string
Guest notification policy: all, externalOnly, or none--set-optional-attendee
stringArray = []
Replace attendees with optional attendee email; repeatable--set-required-attendee
stringArray = []
Replace attendees with required attendee email; repeatable--start
string
Event start--title
string
Event title--yes, -y
bool
Accepted for compatibility; this command is already non-interactivegcal freebusy
Inspect busy windowsgcal freebusy get
Get busy windows for calendars--calendar
stringSlice = [primary]
Calendar selectors--from
string
Start time--to
string
End timegcal mcp
Run the MCP serverRun a stdio Model Context Protocol server for this adapter.
The server exposes read-only resource commands by default. Mutating commands are listed only when explicitly allowed with –allow and remain gated by the command contract safety class.
--allow
stringArray = []
Allow mutating command keys such as gmail.message.archive or gmail.message.label.*--allow-dangerous
bool
Allow --allow wildcards to include destructive or sends_external commands--concurrency
int
Maximum concurrent MCP subprocesses--max-output
int64 = 0
Maximum stdout/stderr bytes captured per MCP command--print-config
bool
Print MCP tool configuration and exit--timeout
duration = 0s
Per-command MCP subprocess timeout, for example 45s or 2mgcal profile
Manage provider profilesgcal profile create
Create an unauthenticated provider profilegcal profile delete
Delete a local provider profilegcal profile list
List provider profilesgcal profile rename
Rename a local provider profilegcal profile use
Set the default provider profilegcal resolve
Resolve a marker or short idgcal schema
Emit gcal schema hints--in
bool
Show input schema--input
bool
Show input schema--out
bool
Show output schemagcal slot
Find open slotsgcal slot find
Find open slots across calendars--calendar
stringSlice = [primary]
Calendar selectors--duration
string = 30m
Minimum slot duration--from
string
Start time--to
string
End timegcal version
Show gcal version informationplay_circle Live Examples
Output captured from a real workspace. Regenerate with
scripts/gen-docs.sh --update.
auth
Authenticated as kestrelphilip@gmail.com
Profile: cmdhub-ci
Next steps:
- Calendars: gcal calendar list
- Events: gcal event list --{day}
- Capabilities: gcal capabilitiesAuthenticated as kestrelphilip@gmail.com
Next steps:
- Calendars: gcal calendar list
- Events: gcal event list --{day}
- Capabilities: gcal capabilitiesgcal doctor: WARN Account: kestrelphilip@gmail.com Checks: credential_backend ok, credential_security warn, profiles ok, google_oauth ok, token ok, scopes ok, gcal_api ok, local_timezone ok CHECK STATUS DETAIL credential_backend OK using file credential_security WARN credential backend stores local plaintext secrets profiles OK active profile "cmdhub-ci" google_oauth OK built-in Google loopback OAuth client is configured token OK token expires at 2026-07-06T09:49:35Z scopes OK stored Google loopback OAuth grant covers required Google Cal... gcal_api OK calendar API reachable local_timezone OK Local Next steps: - Status: gcal auth whoami - Capabilities: gcal capabilities
calendars
Calendars (1 total)
REF TITLE HANDLE TIME_ZONE STATUS ROLE
c1 kestrelphilip@gmail.com primary UTC primary, selected owner
Next steps:
- Open: gcal calendar get c1
- Search: gcal calendar search --query "work"
- Calendars: gcal calendar list
- Events: gcal event list --{day}c1 kestrelphilip@gmail.com
Field Value
------ -----
Ref c1
Type calendar
Title kestrelphilip@gmail.com
Status primary, selected
Next steps:
- List: gcal calendar list
- Events: gcal event list --{day}
- Capabilities: gcal capabilitiesevents
No event found. Next steps: - Search: gcal event search --query "planning" - Create help: gcal event create --help - Status: gcal auth status - Calendars: gcal calendar list
Alias: gcal event ls --{day} --limit 5 -> canonical command: gcal event list --{day} --limit 5
No event found.
Next steps:
- Search: gcal event search --query "planning"
- Create help: gcal event create --help
- Status: gcal auth status
- Calendars: gcal calendar listNo event found. Next steps: - List: gcal event list - Create help: gcal event create --help - Status: gcal auth status - Calendars: gcal calendar list
Create an event from natural text
Usage:
gcal event quick-add [flags]
Examples:
gcal event quick-add --calendar c1 --text "Planning review {day} 3pm"
gcal event quick-add --help
gcal event quick-add --text "Lunch with Sam {day} 12pm"
Flags:
--calendar string Calendar selector (default "primary")
-h, --help help for quick-add
--send-updates string Guest notification policy: all, externalOnly, or none
--text string Quick-add text
-y, --yes Accepted for compatibility; this command is already non-interactive
Global Flags:
--config string Config path override
--cursor string Continuation cursor
--debug Enable debug diagnostics
--json Emit JSON machine output
--jsonl Emit JSONL records for piping
--limit int Maximum items to emit (default 50)
--no-paginate Fetch only one page
-o, --output string Compatibility output mode: json|jsonl. Prefer --json or --jsonl
--page-size int Requested upstream page size (default 50)
--profile string Config/auth profile (default "default")
-q, --quiet Suppress non-essential diagnostics
-v, --version Print version information
--view string View mode: summary|full (default "summary")Update an event
Usage:
gcal event update [event] [flags]
Examples:
gcal event search --query review --jsonl | gcal event update --location "Room 4"
gcal event update --help
gcal event update e1 --add-attendee alex@example.com --send-updates none
gcal event update e1 --start "{day} 15:00" --duration 30m
gcal event update e1 --title "Updated title"
Flags:
--add-attendee stringArray Add attendee email; repeatable
--all-day All-day event
--attendee stringArray Compatibility alias for --add-attendee; repeatable
--calendar string Optional calendar selector
--description string Description
--duration string Duration
--end string Event end
-h, --help help for update
--location string Location
--remove-attendee stringArray Remove attendee email; repeatable
--send-updates string Guest notification policy: all, externalOnly, or none
--set-optional-attendee stringArray Replace attendees with optional attendee email; repeatable
--set-required-attendee stringArray Replace attendees with required attendee email; repeatable
--start string Event start
--title string Event title
-y, --yes Accepted for compatibility; this command is already non-interactive
Global Flags:
--config string Config path override
--cursor string Continuation cursor
--debug Enable debug diagnostics
--json Emit JSON machine output
--jsonl Emit JSONL records for piping
--limit int Maximum items to emit (default 50)
--no-paginate Fetch only one page
-o, --output string Compatibility output mode: json|jsonl. Prefer --json or --jsonl
--page-size int Requested upstream page size (default 50)
--profile string Config/auth profile (default "default")
-q, --quiet Suppress non-essential diagnostics
-v, --version Print version information
--view string View mode: summary|full (default "summary")freebusy
description: Time zone: Local
resource: freebusy
status: free
title: Busy windows
type: freebusy
when: Mon 06 Jul 09:00-17:00 SAST (UTC+02:00) (UTC 07:00-15:00)
Next steps:
- Calendars: gcal calendar list
- Events: gcal event list --{day}
- Capabilities: gcal capabilities
- Check: gcal freebusy get --calendar primary --from now --to +4hSlots (1 total)
WHEN DURATION_MINS CALENDAR
Mon 06 Jul 09:00-17:00 SAST (UTC+02:00) (UTC 07:00-15:00) 480 primary
Next steps:
- Calendars: gcal calendar list
- Events: gcal event list --{day}
- Capabilities: gcal capabilities
- Find: gcal slot find --calendar primary --from now --to +4h --duration 30malt_route Composition Patterns
Bridge your ecosystem with zero middleware.
# Turn a transformed email into a calendar event
gmail message list --label INBOX --limit 1 --jsonl \
| agent adapt --to "gcal event create"
