Drives Google Workspace from the terminal: Gmail, Calendar, Drive, Docs, Sheets, Slides, Chat, Tasks, Contacts, Admin, and more via the `gog` CLI. JSON-first, multi-account, OAuth/service-account auth.
Ships in gogcli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
gogcli (binary name: gog) is a single Go CLI that covers Gmail, Calendar, Drive, Docs, Slides, Sheets, Chat, Tasks, Contacts, People, Classroom, Forms, Apps Script, Keep, Admin (Directory), and Cloud Identity Groups. It is JSON-first, multi-account, and designed for agents as well as humans.
Binary: gog (not gogcli). Repo: github.com/steipete/gogcli. Latest release at time of writing: 0.12.0.
Trigger this skill whenever the user asks to do any of the following from the terminal or a script/agent:
from:, newer_than:7d, is:unread); manage labels, filters, vacation responder, send-as, delegates, or forwarding.gog binary# macOS / Linux (Homebrew Core)
brew install gogcli
# Arch Linux (AUR)
yay -S gogcli
# From source (Go 1.25+)
git clone https://github.com/steipete/gogcli.git
cd gogcli
make # outputs ./bin/gog
command -v gog && gog --version
Each service group calls a different API. Enable the APIs you need on the Google Cloud project that owns your OAuth client (or service account):
chat (Workspace only).admin and groups (DWD service account).The upstream README lists the enable URLs for each. gog auth services prints the full scope list needed when registering DWD.
# 1. Store a Desktop OAuth client JSON once.
gog auth credentials /path/to/client_secret.json
# 2. Launch browser OAuth and persist a refresh token in the OS keyring.
gog auth add [email protected]
# 3. Verify status and stored accounts.
gog auth status
gog auth list --check
For headless/CI, ADC, service-account (DWD), --manual, --remote, --access-token, custom redirect URIs, least-privilege scope flags (--services, --readonly, --drive-scope, --gmail-scope, --extra-scopes), multiple OAuth clients, and keyring backends (keychain / file / auto), see references/auth.md.
| Flag / Env | Effect |
|---|---|
--json (alias --machine, -j) | Emit JSON on stdout. |
--plain (alias --tsv, -p) | Stable TSV on stdout; disables colors. |
GOG_AUTO_JSON=1 | Auto-switch to JSON when stdout is not a TTY. Opt-in agent mode. |
GOG_JSON=1 / GOG_PLAIN=1 | Force mode (overridden by explicit flags). |
--select/--fields/--pick/--project <a,b,c> | Project only these dot-paths from JSON output. |
--results-only | Strip envelope (nextPageToken, etc.); emit only the primary result. |
NO_COLOR=1 | Disable ANSI colors. |
Gotcha: --fields is silently rewritten to --select everywhere except calendar events|ls|list, where fields is the Calendar API selector. Use --select to be unambiguous.
| Flag | Effect |
|---|---|
--dry-run (aliases -n, --noop, --preview, --dryrun) | Print intended actions, succeed. Honored by destructive commands (`gmail archive |
--force (aliases -y, --yes, --assume-yes) | Skip confirmations. |
--no-input / --non-interactive | Never prompt; fail instead. Public Drive shares, Gmail forwarding filters, and delegate grants still require --force. |
--verbose | Extra diagnostic output on stderr. |
gog schema # Full CLI JSON schema (aliases: help-json, helpjson).
gog schema calendar create # Scope to a sub-tree.
gog agent exit-codes # Stable exit-code table (also `gog exit-codes`).
gog completion zsh # Generate shell completion (bash|zsh|fish|pwsh).
GOG_HELP=full gog --help # Expanded help with all commands.
Stable exit codes:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Generic failure |
| 2 | Usage / parse error |
| 3 | Empty result set (paging) |
| 4 | Auth required (401, keyring miss, auth errors) |
| 5 | Not found (404) |
| 6 | Permission denied (403 non-quota) |
| 7 | Rate limited (403 quota, 429) |
| 8 | Retryable (5xx, timeouts, deadline exceeded) |
| 10 | Config error (e.g. missing OAuth credentials) |
| 130 | Cancelled (SIGINT / context canceled) |
# Only these top-level groups are callable; everything else errors out.
gog --enable-commands calendar,tasks events --today
GOG_ENABLE_COMMANDS=calendar,tasks gog events --today
gog --account [email protected] events --today
GOG_ACCOUNT=work-alias gog drive ls --max 20
# Set a friendly alias once.
gog auth alias set work [email protected]
Reserved alias words: auto, default. --account auto resolves to the default or sole stored account.
gog gmail drafts create --to [email protected] \
--subject "Re: Status" --body "See below." \
--reply-to-message-id 193a... --quote --json
gog events --today --json --select "summary,startLocal,endLocal,attendees[].email"
gog drive upload ./spec.md --replace 1A2b3C... --convert-to doc --json
gog sheets get <spreadsheetId> "Roster" --json --results-only
# Preview first.
gog gmail search "label:inbox older_than:30d" --max 200 --json --select "id" \
| jq -r '.[].id' \
| xargs -n1 -I{} gog gmail thread modify {} --add Archive --dry-run
# Then apply.
... (drop --dry-run)
gog --account work --no-input \
calendar create primary \
--summary "Focus block" --from "2026-04-17T09:00:00-07:00" \
--to "2026-04-17T11:00:00-07:00" --event-type focus-time \
--dry-run --json --results-only
Top-level groups (aliases in parentheses):
| Group | One-liner |
|---|---|
gmail (mail, email) | Search/read/send, labels, drafts, filters, delegates, vacation, send-as, forwarding, watch, track. |
calendar (cal) | Events, calendars, ACL, free/busy, focus-time/OOO/working-location, recurrence, team calendars, respond. |
drive (drv) | List/search/upload/download/replace/convert, shares, permissions, shared drives, folders. |
docs (doc) | Create/copy/export, tab-aware edit/write/insert/find-replace, Markdown import/export, sed-style regex, comments. |
slides (slide) | Create/copy/export, add/delete/replace/read slides, speaker notes, Markdown/template-driven decks. |
sheets (sheet) | Metadata, get/update/append/clear, find-replace, named ranges, tab management, formatting, merge, freeze. |
contacts (contact) | People CRUD with custom fields; other-contacts; Workspace directory. |
tasks (task) | Tasklists + tasks; add/done/undo/delete/clear; client-materialized recurrence. |
chat | Workspace only. Spaces, messages, threads, DMs, reactions. |
classroom (class) | Workspace-for-Education. Courses, rosters, coursework, submissions, topics. |
forms (form) | Create/update forms and questions, list responses, Pub/Sub watches. |
appscript (script, apps-script) | Apps Script projects: get/content/create/bind; run <function>. |
people (person) | OIDC profile (me), directory search, relations. |
keep | Workspace + DWD service account. Notes and attachments. |
admin | Workspace + DWD. Directory users and groups. |
groups (group) | Cloud Identity: groups you belong to, group members. |
time | Local/UTC time helpers for scripts and agents. |
auth / config / agent / schema / completion / version | CLI meta. |
These rewrite to the full path:
| Shortcut | Expands to |
|---|---|
send | gmail send |
ls / list | drive ls |
search / find | drive search |
download / dl | drive download |
upload / up / put | drive upload |
open / browse | open (best-effort web URL for a Google ID, offline) |
login | auth add |
logout | auth remove |
status / st | auth status |
me / whoami / who-am-i | people me |
2026-04-17T09:00:00-07:00). Timezone offset is required.YYYY-MM-DD) is accepted for all-day events, Tasks --due, and Contacts --birthday.--from/--to: now, today, tomorrow, yesterday, weekday names (monday, next friday).--since): Go time.ParseDuration format (15m, 24h).GOG_TIMEZONE=<IANA> (or local/UTC) or default_timezone in config.json controls Calendar/Gmail display TZ. IANA DB is embedded, so Windows works.startDayOfWeek, endDayOfWeek, timezone, eventTimezone, startLocal, endLocal.Per-surface details, the full command inventory, and agent recipes live in the references/ directory:
autoreply, email-open tracking.--format, sharing, permissions, shared drives.sed-style edits; Slides creation from Markdown/templates.exit 4 (auth required). Run gog auth status; re-run gog auth add <email> if the keyring entry is missing. For scope errors, append --force-consent.go run rebuilds, ./bin/gog vs $(brew --prefix)/bin/gog) look like different apps to Keychain. Use one stable binary path, or switch backend: gog auth keyring file + GOG_KEYRING_PASSWORD=<pw>.--no-input + file keyring backend. You must set GOG_KEYRING_PASSWORD, otherwise the backend fails to unlock.gog auth add <email> --force-consent.gog auth add <email> --services groups --force-consent.drive ls --all with --parent. These flags are mutually exclusive.drive download --format returns error. --format is Workspace-only (Docs/Sheets/Slides/etc.). Binary user files have no export formats.drive delete didn't remove the file. It trashes by default. Pass --permanent to hard-delete (irreversible).--no-input. Public/domain shares and Gmail forwarding filters always confirm; pass --force to skip.watch serve --exclude-labels.--track failing. Requires exactly 1 recipient (no cc/bcc) and an HTML body (--body-html or --quote). Also requires gog gmail track setup first.--from/--to parse errors. RFC3339 needs a timezone offset. Or use date-only / relative words (today, next monday).--tab-id, not a tab name. Discover IDs with gog docs list-tabs <docId>.@gmail.com doesn't work.exit_code in {0,3}.--fields on calendar events|ls|list forwards to the Calendar API fields= partial-response param, not the local --select projection. Use --select for JSON projection there.GOG_AUTO_JSON=1 off a TTY only. If you redirect stderr-only (2>log), stdout is still a TTY in most shells; set --json explicitly when uncertain.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/gogcli:gogclifrom gogcli
npx claudepluginhub dashed/claude-marketplace --plugin gogcliOther plugins' skills for the same job