Skip to content

Commit fc13b41

Browse files
authored
docs: sharpen gog launch story (#869)
1 parent 4ddec67 commit fc13b41

4 files changed

Lines changed: 148 additions & 31 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- API: add Discovery-backed `api list`, `api describe`, and scoped `api call` access for Google methods outside the first-class command surface, with dry-run plans and explicit write opt-in.
99
- Safety: add global `--readonly` / `GOG_READONLY=1` runtime enforcement that blocks mutating Google and Zoom API requests before dispatch while preserving read-only query POSTs and least-privilege OAuth setup.
1010
- Add schema-generated service skills and curated agent workflows for inbox triage, meeting prep, attachment archival, Drive audits, weekly digests, and contact cleanup.
11+
- Docs: sharpen the README and overview around task-first workflows, predictable automation, identity routing, layered agent safety, and honest product boundaries.
1112

1213
## 0.30.0 - 2026-06-21
1314

README.md

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,49 @@
1-
# gogcli
1+
# gog — Google Workspace from the terminal
22

33
![gogcli banner](docs/assets/readme-banner.jpg)
44

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.
3247

3348
## Install
3449

docs/index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ gog slides create-from-markdown "Weekly update" --content-file slides.md
3939
- **Stable output.** `--json` for scripts, `--plain` TSV for `awk`, human output on stderr.
4040
- **Runtime discovery.** `gog schema --json` exposes command shape, stable exit codes, output modes, and effective safety state.
4141
- **Multi-account, multi-client.** Many Google accounts and OAuth client projects in one config; OAuth, direct access tokens, ADC, and Workspace service accounts all supported.
42-
- **One automation contract.** Humans, scripts, CI, and agents use the same commands, with JSON/TSV output, non-interactive operation, stable exit codes, untrusted-content wrapping, runtime command guards, and baked safety profiles.
42+
- **One automation contract.** 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.
4343
- **Preview-first audits.** Drive `tree`, `du`, `inventory`; Contacts `dedupe` previews by default and requires explicit `--apply` for guarded merges; raw API JSON dumps never mutate remote state.
44-
- **Generated reference.** Every command has a docs page produced from `gog schema --json`.
44+
- **Generated reference.** Every command has a docs page, and service-level agent skills are generated from the same `gog schema --json` contract.
45+
46+
The short version is in [Why gog](why-gog.md): workflow-first commands, stdout
47+
as an API, identity routing, layered safety, and a contract generated from the
48+
live binary.
4549

4650
## Pick your path
4751

4852
- **Trying it.** [Install](install.md)[Quickstart](quickstart.md). Five minutes from `brew install` to your first authenticated query.
49-
- **Wiring up automation.** [Automation](automation.md), [Safety Profiles](safety-profiles.md), and the bundled [`gog` skill](https://github.com/openclaw/gogcli/blob/main/.agents/skills/gog/SKILL.md). Discover the active contract and lock the binary down before handing it to an untrusted caller.
53+
- **Understanding the design.** [Why gog](why-gog.md) explains what the project optimizes for and where its boundaries are.
54+
- **Wiring up automation.** [Automation](automation.md), [Safety Profiles](safety-profiles.md), and [Agent skills](agent-skills.md). Discover the active contract and lock the binary down before handing it to an untrusted caller.
5055
- **Serving MCP tools.** [MCP server](mcp.md) exposes typed, allowlisted tools for agent clients without a generic command bridge.
5156
- **Discovering runtime contracts.** [Automation](automation.md) explains root help, schema metadata, safety controls, and stable exit codes.
5257
- **Polling local events.** [Drive and Docs polling](polling.md) persists cursors and optionally invokes trusted shell hooks.

docs/why-gog.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: Why gog
3+
description: "Why gog combines task-first Google Workspace workflows with stable automation and explicit agent safety."
4+
---
5+
6+
# Why gog
7+
8+
Google Workspace automation usually starts simple: list messages, fetch an
9+
event, update a cell. It becomes operational software as soon as it must choose
10+
an account, preserve machine-readable output, recover from expired auth, avoid
11+
an accidental send, or hand fetched content to an agent.
12+
13+
`gog` is built for that second stage.
14+
15+
## The product idea
16+
17+
Use one command surface everywhere:
18+
19+
```text
20+
person at a terminal → shell script / CI → coding agent / MCP client
21+
same gog commands
22+
```
23+
24+
The interface does not fork into a human CLI and an agent API. Commands expose
25+
the same arguments and behavior; global contracts make them safe to compose.
26+
27+
## Five design choices
28+
29+
### 1. Workflows before endpoint spelling
30+
31+
First-class commands encode the parts that raw API calls leave to every user:
32+
calendar-name resolution, pagination, time parsing, Gmail content sanitation,
33+
Drive audit projections, Docs revision controls, dry-run plans, and stable
34+
output shapes.
35+
36+
### 2. Stdout is an API
37+
38+
`--json` and `--plain` keep stdout parseable. Human guidance, warnings,
39+
prompts, and progress use stderr. Stable exit codes let automation branch on
40+
auth, permission, quota, empty-result, not-found, and retryable failures without
41+
matching prose.
42+
43+
### 3. Auth is a routing problem
44+
45+
One installation can hold several Google accounts and several OAuth client
46+
projects. Aliases, domain mappings, direct access tokens, ADC, and Workspace
47+
service accounts all resolve through the same command layer.
48+
49+
### 4. Safety is layered
50+
51+
No single switch covers every caller. gog combines:
52+
53+
- preview/dry-run behavior for mutations;
54+
- confirmation for destructive operations;
55+
- runtime `--readonly` enforcement before API requests are dispatched;
56+
- Gmail no-send policy at flag, config, and account level;
57+
- runtime command allowlists and denylists;
58+
- baked binaries whose blocked commands disappear from help and schema;
59+
- untrusted-content markers for fetched Google text;
60+
- a typed MCP tool surface with writes disabled by default.
61+
62+
### 5. The live CLI generates its contract
63+
64+
`gog schema --json` is the source for the command reference and generated agent
65+
skills. Documentation, agent discovery, and runtime policy inspection therefore
66+
describe the binary that is actually running, including build-time safety
67+
filtering.
68+
69+
## Who it is for
70+
71+
- People who manage more than one Google account from a terminal.
72+
- Teams that need auditable Workspace automation in shell or CI.
73+
- Maintainers who want high-level workflows without hiding the underlying IDs,
74+
scopes, and API errors.
75+
- Agent builders who need constrained tools and machine-readable contracts.
76+
77+
It is not a hosted integration platform, a replacement for Google Cloud Console
78+
administration, or a promise that every Google API feature has a curated command.
79+
The [command index](commands/) is the exact current surface.
80+
81+
## A useful first proof
82+
83+
After [Quickstart](quickstart.md), run a read-only loop before enabling any
84+
mutation workflow:
85+
86+
```bash
87+
gog auth doctor --check
88+
gog --account [email protected] --readonly gmail search 'newer_than:7d' --max 5 --json
89+
gog --account [email protected] --readonly calendar events --today --json
90+
gog --account [email protected] --readonly drive audit sharing --parent <folderId> --json
91+
gog schema gmail search --json
92+
```
93+
94+
Then choose the narrowest next boundary: keep runtime read-only enforcement,
95+
add an exact command allowlist or no-send policy, use a dedicated OAuth client
96+
or service account, or bake a safety profile into the binary.

0 commit comments

Comments
 (0)