|
1 | | -# gogcli |
| 1 | +# gog — Google Workspace from the terminal |
2 | 2 |
|
3 | 3 |  |
4 | 4 |
|
5 | | -`gog` is a script-friendly Google CLI for Gmail, Calendar, Drive, Docs, Sheets, |
6 | | -Sites, Slides, Forms, Meet, Apps Script, Analytics, Search Console, Contacts, |
7 | | -Tasks, People, Classroom, Chat, YouTube, and Workspace admin flows. |
8 | | - |
9 | | -It is built for terminals, shell scripts, CI, and coding agents: |
10 | | - |
11 | | -- predictable `--json` and `--plain` output on stdout |
12 | | -- human hints and progress on stderr |
13 | | -- multiple Google accounts and OAuth clients |
14 | | -- OAuth, direct access tokens, ADC, and Workspace service accounts |
15 | | -- runtime command allowlists/denylists and baked safety-profile binaries |
16 | | -- typed [MCP server](docs/mcp.md) for agent clients, read-only by default and |
17 | | - without a generic command runner |
18 | | -- read-only audit/reporting commands for risky surfaces like Drive and Contacts |
19 | | -- [generated docs](docs/commands/README.md) for every command |
20 | | - |
21 | | -Rendered docs: <https://gogcli.sh/> |
22 | | - |
23 | | -Start here: |
24 | | - |
25 | | -- [Install](docs/install.md) |
26 | | -- [Quickstart](docs/quickstart.md) |
27 | | -- [Auth clients and service accounts](docs/auth-clients.md) |
28 | | -- [MCP server](docs/mcp.md) |
29 | | -- [Agent skills](docs/agent-skills.md) |
30 | | -- [Command index](docs/commands/README.md) |
31 | | -- [Gmail watch / Pub/Sub push](docs/watch.md) (<https://gogcli.sh/watch.html>) |
| 5 | +One binary. Task-first commands. Predictable automation. |
| 6 | + |
| 7 | +`gog` gives people, scripts, CI, and coding agents one CLI for Gmail, Calendar, |
| 8 | +Drive, Docs, Sheets, Slides, Forms, Meet, Apps Script, Analytics, Search |
| 9 | +Console, Contacts, Tasks, Classroom, Chat, YouTube, and Workspace admin. |
| 10 | + |
| 11 | +```bash |
| 12 | +# Find mail, inspect today's calendar, and audit a Drive folder. |
| 13 | +gog --account [email protected] --readonly gmail search 'is:unread newer_than:7d' --max 10 |
| 14 | +gog --account [email protected] --readonly calendar events --today |
| 15 | +gog --account [email protected] --readonly drive audit sharing --parent <folderId > --json |
| 16 | + |
| 17 | +# Make automation parseable, non-interactive, read-only, and unable to send Gmail. |
| 18 | +gog --readonly --gmail-no-send --no-input --json gmail search 'label:inbox' |
| 19 | +``` |
| 20 | + |
| 21 | +## Why gog |
| 22 | + |
| 23 | +Google APIs expose resources and methods. Real work crosses them. `gog` keeps |
| 24 | +the raw capability, then adds the workflow and operational contracts a durable |
| 25 | +CLI needs: |
| 26 | + |
| 27 | +- **Task-first workflows:** search and sanitize mail, resolve calendar names, |
| 28 | + audit Drive sharing, edit Docs, append Sheet tables, build Slides, manage |
| 29 | + Workspace users, and back up accounts. |
| 30 | +- **Automation that composes:** stable `--json` and `--plain` stdout; prompts, |
| 31 | + progress, and warnings on stderr; documented exit codes; `--no-input` for CI. |
| 32 | +- **Many identities, one install:** account aliases, named OAuth clients, direct |
| 33 | + access tokens, ADC, OS/encrypted-file keyrings, and Workspace service accounts. |
| 34 | +- **Agent safety with explicit boundaries:** runtime `--readonly`, command |
| 35 | + allow/deny rules, `--gmail-no-send`, untrusted-content wrapping, dry-run plans, |
| 36 | + baked safety-profile binaries, and a typed MCP server that is read-only by default. |
| 37 | +- **A discoverable contract:** `gog schema --json`, generated reference pages |
| 38 | + for every command, and schema-generated service skills for agent workflows. |
| 39 | + |
| 40 | +Read [Why gog](docs/why-gog.md) for the design tradeoffs, or go straight to: |
| 41 | +[Install](docs/install.md) · [Quickstart](docs/quickstart.md) · [Auth](docs/auth-clients.md) · |
| 42 | +[Command index](docs/commands/README.md) · [Automation](docs/automation.md) · |
| 43 | +[Agent skills](docs/agent-skills.md) · [MCP](docs/mcp.md). |
| 44 | + |
| 45 | +Rendered docs: <https://gogcli.sh/>. `gog` is open source and not affiliated |
| 46 | +with Google. |
32 | 47 |
|
33 | 48 | ## Install |
34 | 49 |
|
|
0 commit comments