Source: gogcli.sh. Distilled and processed for Signal; not original content.

TL;DR

gog is a single binary that exposes every Google Workspace API (Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Apps Script, Contacts, People, Tasks, Classroom, Chat, Groups, Keep, Admin) with machine-stable output. It treats stdout as an API so humans, scripts, CI, and agents all use the same commands, with layered safety and an MCP server for agent clients. MIT licensed, not affiliated with Google.

Why it matters (for agents and automation)

  • One binary, every API. No per-service SDK wiring.
  • stdout as an API. --json gives a stable JSON envelope, --plain gives TSV for awk; human progress, prompts, and warnings always go to stderr so pipes stay parseable.
  • Runtime discovery. gog schema --json exposes command shape, stable exit codes, output modes, and effective safety state, so agents can introspect the contract live.
  • Multi-account, multi-client. OAuth, direct access tokens, ADC, and Workspace service accounts (with domain-wide delegation) in one config.
  • Layered safety. Runtime read-only enforcement, untrusted-content wrapping, command guards, and baked safety profiles. Preview-first audits: Drive tree/du and Contacts dedupe preview by default and require explicit --apply to mutate.
  • MCP server. Exposes typed, allowlisted tools for agent clients instead of a generic command bridge, and service-level agent skills are generated from the same schema contract.

Example one-liners

gog gmail search 'newer_than:7d' --max 10
gog gmail get <messageId> --sanitize-content --json
gog calendar events --today
gog drive tree --parent <folderId> --depth 2
gog sheets table append <spreadsheetId> Tasks 'Ship README|done'
gog slides create-from-markdown "Weekly update" --content-file slides.md

Key quotes

One binary, every API.

Humans, scripts, CI, and agents use the same commands, with JSON/TSV output, non-interactive operation, stable exit codes, runtime read-only enforcement, untrusted-content wrapping, command guards, and baked safety profiles.

claude-workflows-that-run-unattended