| name | google-cli |
| description | Use the gog CLI to interact with Google Workspace services (Calendar, Gmail, Tasks, Drive, Docs, Slides, Sheets). This skill is for coding agents that have Bash access and prefer CLI tools over MCP tools. Use when asked to check calendar, send emails, manage tasks, or access Google services from the terminal. |
| requires | ["google-oauth"] |
Google CLI (gog)
The gog CLI provides access to Google Workspace services from the terminal. Use this instead of MCP tools when you have Bash access (coding agents in Cursor/Claude Code).
Prerequisites
gog CLI installed (which gog should return /usr/local/bin/gog)
- Authenticated via
gog auth login
Quick Reference
gog auth status
gog auth list
Calendar Operations
List Upcoming Events
gog calendar events
gog calendar events --from="2026-01-15" --to="2026-01-20"
gog calendar events primary
gog calendar events --json
gog calendar search "standup"
Create Events
gog calendar create primary --title="Team Meeting" --start="2026-01-15T14:00:00" --end="2026-01-15T15:00:00"
gog calendar create primary \
--title="Sprint Planning" \
--start="2026-01-20T10:00:00" \
--end="2026-01-20T11:30:00" \
--location="Conference Room A" \
--description="Q1 sprint planning meeting"
gog calendar create primary \
--title="1:1 Meeting" \
--start="2026-01-16T09:00:00" \
--end="2026-01-16T09:30:00" \
--attendees="colleague@company.com"
Manage Events
gog calendar event <calendarId> <eventId>
gog calendar update primary <eventId> --title="Updated Title"
gog calendar delete primary <eventId>
gog calendar respond primary <eventId> --response=accepted
Advanced Calendar
gog calendar freebusy "email1@company.com,email2@company.com" --from="2026-01-15" --to="2026-01-16"
gog calendar conflicts --days=7
gog calendar focus-time --from="2026-01-15T09:00:00" --to="2026-01-15T12:00:00"
gog calendar out-of-office --from="2026-01-20" --to="2026-01-24"
Gmail Operations
Read Emails
gog gmail search "is:unread"
gog gmail search "from:ceo@company.com"
gog gmail search "subject:urgent after:2026/01/01"
gog gmail search "has:attachment"
gog gmail search "is:unread" --json
gog gmail get <messageId>
gog gmail get <messageId> --format=metadata
Send Emails
gog gmail send \
--to="recipient@company.com" \
--subject="Meeting Follow-up" \
--body="Thank you for the meeting today."
gog gmail send \
--to="main@company.com" \
--cc="manager@company.com" \
--subject="Project Update" \
--body="Here's the weekly update..."
gog gmail send \
--to="team@company.com" \
--subject="Report" \
--body="Please find attached." \
--attach="/path/to/report.pdf"
Organize Emails
gog gmail labels list
gog gmail thread modify <threadId> --add-labels="IMPORTANT" --remove-labels="INBOX"
Tasks Operations
List Tasks
gog tasks lists list
gog tasks list <tasklistId>
gog tasks list <tasklistId> --show-completed
gog tasks list <tasklistId> --json
Manage Tasks
gog tasks add <tasklistId> --title="Review PR #123"
gog tasks add <tasklistId> --title="Submit report" --due="2026-01-20"
gog tasks add <tasklistId> --title="Prepare slides" --notes="For the Q1 review meeting"
gog tasks done <tasklistId> <taskId>
gog tasks update <tasklistId> <taskId> --title="Updated title"
gog tasks delete <tasklistId> <taskId>
Drive Operations
gog drive list
gog drive list <folderId>
gog drive search "name contains 'report'"
gog drive download <fileId> --output="/path/to/save"
gog drive upload /path/to/file --parent=<folderId>
Docs/Slides/Sheets
gog docs export <docId> --format=pdf --output="document.pdf"
gog docs export <docId> --format=docx --output="document.docx"
gog slides info <presentationId>
gog sheets get <spreadsheetId> <range>
Common Patterns for Agents
Check Today's Schedule
gog calendar events --from="$(date +%Y-%m-%d)" --to="$(date -v+1d +%Y-%m-%d)" --json
Check Unread Emails
gog gmail search "is:unread newer_than:1d" --json | jq '.threads | length'
Quick Task Creation from Issue
gog tasks add "@default" --title="PROJ-123: Implement feature X" --due="2026-01-20"
Find Available Meeting Time
gog calendar freebusy "tom@company.com,alice@company.com" \
--from="$(date +%Y-%m-%d)" \
--to="$(date -v+5d +%Y-%m-%d)" \
--json
Output Formats
| Flag | Description | Use Case |
|---|
--json | JSON output | Parsing in scripts |
--plain | TSV output | Simple parsing |
| (default) | Colored human-readable | Interactive use |
When to Use CLI vs MCP Tools
| Task | Use CLI | Use MCP |
|---|
| Quick calendar check | gog calendar events | - |
| Send email | gog gmail send | - |
| Complex slides manipulation | - | ai_first_slides_* |
| Presentation updates | - | ai_first_slides_* |
| WhatsApp integration | - | whatsapp_* |
| Slack integration | - | ai_first_slack_* |
Rule of thumb: Use CLI for simple read/write operations. Use MCP tools for complex operations that need the assistant's context or don't have CLI equivalents.