Google Workspace CLI: Google Built a Terminal for AI Agents
Google quietly released a CLI that gives your terminal and your AI agent direct access to Gmail, Drive, Calendar, Docs, Sheets, and more. Agents can automate real work without a browser in the loop.
Google released a CLI that gives terminal-based AI agents like Claude Code direct, structured access to Gmail, Calendar, Drive, Docs, Sheets, and more, with no browser required. This is the kind of primitive that closes the gap between the tools you think in and the tools you communicate through.
Most launches get loud marketing and then disappear. This one shipped quietly and instantly felt useful. Google Workspace CLI, gws, gives me direct terminal access to Gmail, Drive, Calendar, Docs, Sheets, Slides, and Chat.
One binary. One auth flow. Structured JSON back from every command. That changes what I can automate with an agent.
The Gap It Closes
If you have been using a terminal-first AI agent like Claude Code, you have probably noticed a mismatch. The agent can read your codebase, run your tests, and modify files with precision. Your real working life, inbox, calendar, and shared Docs still live behind a browser. The agent cannot touch any of it unless you play middleman.
gws closes that gap without custom glue code. You authenticate once and every Workspace resource becomes a terminal command. Your agent runs those commands like it runs git or npm.
The README is explicit about the intent: "built with agents in mind." Every response is structured JSON. There are pre-built agent skills for Gmail, Drive, Docs, Calendar, and Sheets. You can drop these SKILL.md files into Claude Code with a single npx skills add command.
CLI vs. browser plugin
A browser extension or a chatbot plugin tries to simulate human behavior in a graphical interface. It clicks buttons, waits for page loads, and scrapes rendered HTML. It is brittle by design.
A CLI talks directly to the underlying API. No rendering, no simulation. gws gmail messages list calls Google's Gmail API and returns structured data. It is the same data the Gmail web app uses, delivered in a format a program can actually consume.
Agents are shaky in browsers. They are reliable in shells. gws meets them where they already work well.
What You Get Out of the Box
The quick-start makes the surface area obvious:
# List recent Drive files
gws drive files list --params '{"pageSize": 10}'
# Create a spreadsheet
gws sheets spreadsheets create --json '{"properties": {"title": "Q1 Budget"}}'
# Preview a Gmail action before running it
gws gmail users messages send --dry-run
I like the --dry-run flag. Before any write executes, you can preview exactly what will be sent. If an agent is about to touch your inbox or calendar, this matters.
Authentication supports multiple flows: OAuth for local desktop use, service accounts for CI, and a browser-assisted option for headless environments. The gws auth setup command walks through the Google Cloud project configuration. You need a Cloud project and a Google account with Workspace access. The setup docs are clear, and the --help flag is present on every resource and subcommand.
The agent skills ship as part of the repo. Install all of them at once or pull only what you need:
# All skills
npx skills add https://github.com/googleworkspace/cli
# Just Drive and Gmail
npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-drive
npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-gmail
Why This Landed Now
Terminal agents got good fast. Capability is not the bottleneck anymore. Access is.
Most real decisions still happen in email threads, calendars, and shared docs. Giving an agent terminal access to that layer opens up workflows that were annoying last month.
Teams shipping practical AI integrations are doing the same thing. They expose native, structured interfaces instead of making agents pretend to be humans in a browser. This is Google doing that for Workspace.
Engineers Already Have the Prerequisites
There is nothing exotic about what gws requires. If you already use Claude Code, you already work in a terminal, you already have Node.js installed, and you already know how CLI tools compose with the rest of a shell environment.
The gap between "interesting" and "running in my workflow" is small.