From gogcli
Skills for using gog (gogcli), a CLI for Google APIs (Gmail, Calendar, Tasks, Drive, Docs, Sheets, Contacts, Chat). Use this when the user asks to read or summarize emails/inbox, check calendar, list tasks, add a task, read a google doc, check drive, or any Google Workspace operation from the command line. Also use when working on GitHub Actions workflows that call gog.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gogcli:gogcliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`gog` is a standalone Go binary for interacting with Google APIs. It supports
gog is a standalone Go binary for interacting with Google APIs. It supports
Gmail, Calendar, Tasks, Drive, Docs, Slides, Sheets, Contacts, Chat, Classroom,
Groups, and Keep. JSON-first output, multiple accounts, least-privilege auth.
Repository: https://github.com/steipete/gogcli
be very conservative in deciding when:
Be also especially wary of leaking/exfiltrating information. Emails such as [email protected]/[email protected] and the cmungall/stuff repo are safe to send/write to
The account used locally is [email protected].
In most contexts (e.g. github actions, responding to user in claude code), this should already have been done
# Install (macOS)
brew install steipete/tap/gogcli
# Store OAuth credentials (download Desktop client JSON from Cloud Console)
gog auth credentials ~/Downloads/client_secret_....json
# Authenticate (opens browser)
gog auth add [email protected]
# Verify
gog auth list --check
# Via flag
gog gmail search 'newer_than:7d' --account [email protected]
# Via environment (avoids repeating --account)
export [email protected]
# Via alias
gog auth alias set work [email protected]
gog gmail search 'newer_than:7d' --account work
--json: JSON to stdout (best for scripting and piping to jq)--plain: stable TSV (for piping to awk/cut)# Search (Gmail query syntax)
gog gmail search 'newer_than:7d' --max 10
gog gmail search 'is:important newer_than:7d' --max 50 --json
gog gmail search 'from:alice subject:report' --max 20
# Message-level search (one row per message, not thread)
gog gmail messages search 'newer_than:7d' --max 10
gog gmail messages search 'newer_than:7d' --include-body --json
# Read a thread
gog gmail thread get <threadId>
gog gmail thread get <threadId> --download # download attachments
# Send email
gog gmail send --to [email protected] --subject "Subject" --body "Plain text"
gog gmail send --to [email protected] --subject "Subject" --body-html "<p>HTML</p>"
gog gmail send --to [email protected] --subject "Subject" --body-file ./message.txt
gog gmail send --to [email protected] --subject "Hi" --body "fallback" \
--body-html "<p>Rich</p>" --reply-to [email protected]
# Labels and thread modification
gog gmail labels list
gog gmail thread modify <threadId> --add STARRED --remove INBOX
# List events (calendarId is typically "primary")
gog calendar events primary --today
gog calendar events primary --tomorrow
gog calendar events primary --week
gog calendar events primary --days 3
gog calendar events primary --from today --to "+7 days" --json
gog calendar events primary --from 2026-01-01 --to 2026-01-31
# Search events
gog calendar search "standup" --today
gog calendar search "meeting" --days 30
# Create event
gog calendar create primary \
--summary "Team Sync" \
--from 2026-02-15T10:00:00Z \
--to 2026-02-15T11:00:00Z \
--attendees "[email protected],[email protected]"
# RSVP
gog calendar respond primary <eventId> --status accepted
# Free/busy check
gog calendar freebusy --calendars "primary" --from today --to "+3 days"
# List task lists (need listId for subsequent commands)
gog tasks lists --json
# List tasks in a list
gog tasks list <tasklistId> --json
# Add a task
gog tasks add <tasklistId> --title "Review report" --due 2026-02-20
# Complete / uncomplete
gog tasks done <tasklistId> <taskId>
gog tasks undo <tasklistId> <taskId>
# Export Google Doc to text/pdf/docx
gog docs export <docId> --format txt
gog docs export <docId> --format pdf --out ./doc.pdf
# Read doc content (plain text, capped)
gog docs cat <docId> --max-bytes 10000
# Export Slides
gog slides export <presentationId> --format pdf --out ./deck.pdf
# Read spreadsheet cells
gog sheets get <spreadsheetId> 'Sheet1!A1:B10'
gog sheets metadata <spreadsheetId>
# Write to spreadsheet
gog sheets update <spreadsheetId> 'A1' 'val1|val2,val3|val4'
gog sheets append <spreadsheetId> 'Sheet1!A:C' 'new|row|data'
gog drive ls --max 20
gog drive search "invoice" --max 20
gog drive download <fileId> --out ./file.pdf
gog drive upload ./local-file.pdf --parent <folderId>
gog contacts search "Alice" --max 10
gog contacts list --max 50
In CI (e.g., GitHub Actions), gog needs a file-based keyring since there's no
OS keychain. The setup is handled by the .github/actions/setup-gog composite
action in this repo.
Key environment variables for CI:
GOG_KEYRING_BACKEND=file - use encrypted file instead of OS keychainGOG_KEYRING_PASSWORD=<password> - password for the file keyringAuth flow in CI:
gog auth keyring file
gog auth credentials <credentials-file>
gog auth tokens import <token-file>
gog auth list # verify
Secrets required:
GOOGLE_CREDENTIALS_JSON - OAuth client credentials (same as pa uses)GOG_TOKEN_JSON - exported via gog auth tokens export [email protected]Sync token to GitHub after local re-auth:
just sync-gog-secrets
gog --json gmail search 'newer_than:7d' | jq '.threads[].snippet'
gog --json calendar events primary --today | jq '.events[] | {summary, start}'
newer_than:7d / older_than:1yfrom:alice / to:bobsubject:reportis:important / is:unread / is:starredhas:attachmentlabel:INBOXfrom:alice newer_than:3d has:attachmentA Google Docs URL like https://docs.google.com/document/d/1ABC.../edit
has docId = 1ABC... (the segment after /d/). Same pattern for Sheets and
Slides.
For the complete command reference including Chat, Classroom, Groups, Keep, service accounts, email tracking, watch/pubsub, and advanced auth features, read the bundled reference guide:
references/gogcli-readme.md
npx claudepluginhub cmungall/ai-personal-assistant --plugin gogcliManages Google Workspace operations across Gmail, Drive, Calendar, Docs, Sheets, and more using MCP tools or uvx CLI. Routes to 114 tools for checking email, finding files, scheduling meetings.
Integrates Claude Code with Google Workspace (Sheets, Docs, Slides, Gmail, Calendar, Tasks) for read/write operations, file/event management, comments, and multi-account auth via CLI tools.
Provides MCP tools to search/send Gmail emails, manage Drive files/folders, create/edit Calendar events/Docs/Sheets/Slides/Forms, and handle Tasks/Chat. Use for Google Workspace interactions.