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.
Some software launches do not make headlines on day one and still change how serious developers work. The Google Workspace CLI, gws, is one of those.
At its core, this is one command-line tool that wraps the Google Workspace API surface: Gmail, Drive, Calendar, Docs, Sheets, Slides, Chat. One binary. One auth flow. Every resource reachable with a structured command and a JSON response.
That might sound like a convenience. In practice, it changes what you can automate.
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 any custom tooling in the middle. You authenticate once, and every Workspace resource becomes a terminal command. Your AI agent runs those commands the same way it runs git or npm. No browser in the loop.
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
It is worth being precise here because there is a real difference.
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.
AI agents cannot reliably navigate a browser. They can reliably execute a terminal command and parse the output. This is the surface they were designed to operate on, and gws meets them there.
What You Get Out of the Box
The quick-start is honest about the surface area:
# 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
The --dry-run flag is worth calling out. Before any write operation executes, you can preview exactly what gets sent. For an AI agent that might touch your inbox or calendar, that safety primitive 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
The Timing
The timing of this release is interesting. Terminal-based AI agents have matured enough that raw capability is no longer the bottleneck. Access is. The agent can reason, plan, and execute. It has not been able to reach the data that actually drives day-to-day work.
Email threads, calendar context, and shared documents are where decisions get made and work gets communicated. Giving an AI agent terminal-level access to that layer is a meaningful shift in what teams can automate.
The companies building useful AI integrations right now are making the same move. They build a surface the agent can operate on natively instead of one that requires simulating a human. gws is Google making that move for its own product suite.
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 "this is interesting" and "this is running in my workflow" is pretty small.
Three commands and you have a Workspace-aware terminal. From there, every follow-up question about what to do with it is just a matter of which workflows are worth building.
That is the kind of low-friction primitive worth paying attention to.