Use this skill whenever the user wants to operate Google Workspace from the command line with gog/gogcli, including Gmail, Calendar, Drive, Docs, Sheets, Sli…
Pins this version in aipm.package.json and aipm-lock.json.
aipm add @intellectronica/gog-cli@1.0.0
Without project tracking
Writes the skill files only. Add --no-init to skip aipm.package.json and the lockfile.
aipm add @intellectronica/gog-cli@1.0.0 --no-init
How to use
Install the skill above, then run this in your AI tool:
/gog-cli <your description>
About
`gog` is a fast, script-friendly CLI for Google services. It is JSON-first, supports multiple accounts/OAuth clients, and has explicit guardrails for agent and CI usage.
Source
What gets added to your project
Preview every file this package writes on install before you run the command above.
Summary
Use this skill whenever the user wants to operate Google Workspace from the command line with gog/gogcli, including Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Apps Script, Chat, Classroom, Contacts, Tasks, People, Groups, Admin...
Skill instructions
gogcli (gog)
gog is a fast, script-friendly CLI for Google services. It is JSON-first, supports multiple accounts/OAuth clients, and has explicit guardrails for agent and CI usage.
This skill was refreshed against upstream gog v0.13.0 (2026-04-20). When exact syntax matters, run gog <command> --help or gog schema --json; the command surface moves quickly, rather inconveniently for anyone fond of stale notes.
Operating rules
Prefer gog --json ... | jq ... for inspection and scripting.
Use --plain only when stable TSV is more convenient than JSON.
Use --dry-run for supported mutating operations when preparing a change or when user intent is ambiguous.
Use --no-input in automation so commands fail instead of prompting.
Use --force only when the user asked for the destructive/public/send/admin operation or after you have clearly explained the effect.
Do not repair OAuth, consent, keyring, or Workspace delegation problems silently. Show the exact command the user should run.
Do not export tokens, print secrets, open public shares, add delegates/forwarding, send mail, suspend users, or permanently delete data unless the user explicitly requested that action.
For agent runs that must not send mail, add --gmail-no-send, set GOG_GMAIL_NO_SEND=1, or configure gog config no-send set <account>.
Install and auth
bash
brew install gogcli
gog auth credentials set ~/Downloads/client_secret_....json
gog auth add you@example.com --services gmail,calendar,drive
gog auth list --check
Notes:
Homebrew now uses brew install gogcli; old tap examples are obsolete.
gog auth add defaults to --services user. Request the services needed for the task.
--services all is accepted only as a backwards-compatible alias for user; do not use it when you need every API.
Use --readonly, --drive-scope readonly|file|full, and --gmail-scope readonly|full for least privilege.
Keep and Admin require Workspace service-account/domain-wide delegation. Google Chat, Groups, directory, and Classroom also have Workspace restrictions.
For headless/CI, consider --manual, --remote, --access-token, or GOG_AUTH_MODE=adc.
Read references/authentication.md for full auth patterns.
Global flags
bash
--account, -a <email|alias|auto> # account selection
--client <name> # named OAuth client/token bucket
--access-token <token> # direct short-lived token; also GOG_ACCESS_TOKEN
--json, -j # machine-readable JSON
--plain, -p # stable TSV
--results-only # JSON primary result only
--select <fields> # best-effort JSON projection
--dry-run, -n # preview supported writes
--force, -y # skip confirmations
--no-input # never prompt
--enable-commands <csv> # allowlist top-level or dotted commands
--disable-commands <csv> # denylist top-level or dotted commands
--gmail-no-send # block Gmail send operations
--verbose, -v # debug logging
Useful command aliases:
bash
gog send ... # alias for gog gmail send
gog ls# alias for gog drive ls
gog search "budget"# alias for gog drive search
gog download <fileId> # alias for gog drive download
gog upload ./file.pdf # alias for gog drive upload
gog me # alias for gog people me
gog status # alias for gog auth status
gog open <id-or-url> # best-effort Google web URL, offline
High-value workflows
Account selection
bash
gog auth aliasset work you@company.com
gog --account work gmail search 'is:unread newer_than:2d'
GOG_ACCOUNT=work gog calendar events primary --today
gog --client work auth credentials set ~/Downloads/work-client.json
gog --client work auth add you@company.com --services gmail,calendar
Use RFC3339 with timezone offsets for generated datetimes. Read references/calendar.md for aliases, subscriptions, secondary calendars, extended properties, Focus Time, OOO, working locations, team calendars, and conflict detection.
Add this badge to a GitHub README so readers can open the package page and install the same version.
[](https://www.aipm-registry.com/skills/intellectronica/gog-cli/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)
This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.
AI assistant context
What this skill is for
@intellectronica/gog-cli@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: Use this skill whenever the user wants to operate Google Workspace from the command line with gog/gogcli, including Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Apps Script, Chat, Classroom, Contacts, Tasks, People, Groups, Admin...
Run aipm add @intellectronica/gog-cli@1.0.0 in a project that has AIPM initialized.
Supported tools
@intellectronica/gog-cli@1.0.0 supports All tools.
Before installing
AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.