AI
gogcli: The Google Workspace CLI I Wish Every Agent Had
A fast, JSON-first Google Workspace CLI that turns Gmail/Calendar/Drive/Docs into automatable agent tools.

đ¤ Curiosity: The Question
Most âagent toolingâ fails because it canât touch the tools we actually use.
Gmail. Calendar. Drive. Docs. Tasks.
So when I saw gogcli â a fast, JSON-first Google Workspace CLI built for agents â I asked:
What happens when your agent can actually operate your workspace, not just read it?
đ Retrieve: The Knowledge
What gogcli is
gogcli is a lightweight, agentâfriendly CLI that controls Google Workspace from the terminal:
- Gmail, Calendar, Drive, Docs, Sheets, Slides, Chat, Contacts, Tasks, Forms, Classroom, Apps Script
- JSONâfirst output for automation
- Multiple accounts and OAuth clients
The âwhy this mattersâ feature list
Gmail
- Search threads/messages, send mail, labels/filters, delegates, OOO settings
- Attachment views + Cloudflare Worker email open tracking
Calendar
- Create/edit events, manage invites, free/busy
- Supports focusâtime, outâofâoffice, workingâlocation
Drive + Docs/Sheets/Slides
- Search/upload/download, permissions, comments
- Export Docs/Slides/Sheets to PDF/DOCX/PPTX
- Markdown-based doc editing (sedmat)
- Spreadsheet automation (cell styles, row/col ops, comments)
People/Groups
- Directory access + contact CRUD
Tasks / Forms / Apps Script / Classroom
- Recurring tasks, form creation/response reads
- Apps Script execution and project management
Automation & security design
- OAuth2 + domainâwide delegation support
- Keychain or encrypted keyring storage
- Auto token refresh + readonly scopes
--jsonand--plainoutput modesallowlistsandboxing + stderr separation for stable parsing
Minimal agent loop example
flowchart LR
A[Agent task] --> B[gogcli --json]
B --> C[Parse output]
C --> D[Decide + act]
D --> B
đĄ Innovation: The Insight
Why I think this is a missing piece
Agentic workflows usually stall at âaccess.â
gogcli turns Workspace APIs into a deterministic CLI surface â exactly what agents need.
This means:
- No brittle UI scraping for email or calendar
- No custom glue code for Drive/Docs
- Real pipeline automation with stable JSON outputs
What Iâd build with it (game/production angle)
1) Playtest ops bot
Autoâschedule sessions â send invites â collect feedback â generate reports.
2) Liveâops incident responder
Search incident threads + create calendar war room + push docs timeline.
3) Producer inbox triage
Classify, label, summarize, and autoâfollowâup using deterministic CLI output.
Key Takeaways
| Insight | Implication | Next Step |
|---|---|---|
| CLI surface beats UI scraping | Reliability â | Build jsonâfirst flows |
| Workspace is the real agent arena | More impact than model swaps | Automate real workflows |
| Security matters at scale | Leastâprivilege by default | Use readonly scopes |
New Questions This Raises
- Whatâs the best agent task taxonomy for Workspace automation?
- How far can we go with domainâwide delegation safely?
- What should the default audit trail look like for agents?
References
- Hada news: https://news.hada.io/topic?id=27179