gogcli
$ gog Community High Riskgogcli (gog) is an open-source Go CLI by OpenClaw providing fast terminal and agent access to Gmail, Google Calendar, Drive, Docs, Sheets, and Workspace Admin. Built specifically for scripts and AI agents with --json, --plain TSV output, --dry-run, gog schema --json, -a/--account switching, and encrypted file keyring support for headless servers.
brew install gogcli gog packs Gmail, Calendar, Drive, Docs, Sheets, and Admin into one local binary with --json, --dry-run, and --plain TSV output at zero MCP context-bloat cost.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Offers --json, --plain TSV, --color=never, --dry-run, -a/--account, and gog schema --json built for agent workflows.
--json,--plain, andgog schema --jsonexpose clean machine contractsGOG_KEYRING_BACKEND=filesupports headless server automation
Supports --dry-run on mutations and encrypted keyring storage, though OAuth scopes span sensitive Workspace data (email, Drive, Admin).
--dry-runprevents unintended email sends or Drive mutations- Tokens encrypted in OS keychain or
GOG_KEYRING_BACKEND=file
Single Go binary via Homebrew (brew install gogcli), go install, and GitHub releases across macOS, Linux, and Windows.
- Available via
brew install gogcliand release binaries
Consolidates six Google Workspace services into one fast, consistent CLI.
- Covers Gmail, Calendar, Drive, Docs, Sheets, and Admin
Active community project (openclaw/gogcli) under MIT license, though not an official Google binary.
- MIT open-source CLI maintained by OpenClaw
Clear documentation at gogcli.sh, detailed README, and machine-readable gog schema --json.
- Official site
gogcli.shplus built-ingog schema --json
Security, Auth & Guardrails
Stores OAuth client credentials and refresh tokens in the OS keychain by default, or in an encrypted file backend via GOG_KEYRING_BACKEND=file and GOG_KEYRING_PASSWORD for headless Linux/containers.
MIT open-source CLI; uses your Google account or paid Google Workspace OAuth credentials.
# gogcli (gog) Agent Rules - Always pass `--json` (or `--plain`) and explicit `-a <account>` on multi-account setups. - Pass `--dry-run` before sending Gmail messages, modifying Calendar events, or deleting Drive files. - On headless Linux hosts, configure `GOG_KEYRING_BACKEND=file` and `GOG_KEYRING_PASSWORD` instead of interactive GUI keyrings.
Agent-Ready Command Recipes
Safe Read-Only Queries
gog gmail search 'is:unread' --json -a [email protected]
Queries unread Gmail threads for a specific account and returns structured JSON.
gog schema --json
Outputs the full command tree, parameters, and exit codes for programmatic agent discovery.
Controlled Writes & Previews
gog gmail send --to [email protected] --subject "Status" --body "Ready" --dry-run --json -a [email protected]
Validates and prints the intended Gmail send payload without dispatching an actual email.
Strengths for Agents
- + Consistent
--json,--plain,--dry-run, andgog schema --jsonacross Google Workspace services. - + Encrypted file keyring backend (
GOG_KEYRING_BACKEND=file) avoids GUI keyring hangs on servers.
Caveats & Pitfalls
- ! Initial setup requires registering your own Google Cloud OAuth client JSON and completing a browser consent flow.
- ! Third-party community CLI (
openclaw/gogcli), not first-party Google software.