Control Google Workspace from the command line — manage Gmail, Calendar, Drive, and more
A fast, script-friendly CLI for Google Workspace services with JSON-first output and multi-account support.
Repository: https://github.com/steipete/gogcli
This skill assumes gog is installed and authorised. If commands fail with authentication errors, inform the user they need to:
brew install steipete/tap/gogcligog auth credentials <path-to-credentials.json>gog auth add user@gmail.com --services allDo not attempt to resolve authentication issues automatically. Provide the user with the relevant command and let them handle it.
Gmail, Calendar, Drive, Docs, Sheets, Slides, Chat (Workspace), Classroom, Contacts, Tasks, People, Groups (Workspace), Keep (Workspace, service account only).
--account <email> # Select account
--client <name> # Select OAuth client
--json # JSON output
--plain # TSV output (for scripting)
--force # Skip confirmations
--no-input # Fail instead of prompting
gog --account work@example.com gmail search "is:unread" # Use specific account
gog gmail search "is:unread" --json | jq '.threads[].id' # JSON for parsing
gog gmail search "is:unread" --plain | cut -f1 # Plain for shell
gog gmail search "is:unread" --max 10 --page <token> # Pagination
gog gmail search "is:unread from:boss@example.com newer_than:7d"
gog gmail messages search "is:unread" --include-body
gog gmail thread get <threadId>
gog gmail get <messageId> --format full
# Basic send
gog gmail send --to user@example.com --subject "Hello" --body "Message"
# With HTML and attachments
gog gmail send --to user@example.com --subject "Report" \
--body-html "<h1>Report</h1>" --attach ~/report.pdf
# Reply
gog gmail send --t...