BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google Workspace CLI: Unified Command-Line Tool Built for Humans and AI Agents

Google Workspace CLI: Unified Command-Line Tool Built for Humans and AI Agents

Listen to this article -  0:00

A new Google Workspace CLI has been released that provides a single interface to Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin and every other Google Workspace API. Written in Rust and licensed under Apache 2.0, the CLI is designed to serve both human operators and AI agent workflows, shipping with structured JSON output and over 100 bundled agent skills.

Unlike traditional CLI tools that ship with a static list of commands, gws reads Google's own Discovery Service at runtime and builds its entire command surface dynamically. When Google adds or updates an API endpoint, the CLI picks up the change automatically without requiring a new release. The tool also includes a set of helper commands, prefixed with +, for common workflows such as sending emails, triaging inboxes and generating standup reports.

Getting started requires Node.js 18 or later (or a pre-built binary from GitHub Releases), a Google Cloud project for OAuth credentials and a Google account with Workspace access. Installation can be handled via npm, Homebrew, Cargo or Nix:

npm install -g @googleworkspace/cli

Once installed, initial setup and authentication are handled through two commands:

gws auth setup
gws auth login

From there, interacting with Workspace services follows a consistent pattern. Listing recent Drive files, for example, is a single call:

gws drive files list --params '{"pageSize": 10}'

The agent skills ecosystem is a core offering. Skills are packaged as SKILL.md files covering every supported API, and the CLI also includes an MCP server option for connecting to tools such as Claude Code and Gemini CLI. Google Cloud director Addy Osmani introduced the CLI as "built for humans and agents". The repository has since gathered over 26,500 stars on GitHub.

Community response has been mixed. On Hacker News, several users praised the dynamic command generation and the broader shift toward CLI-first tooling.

One commenter observed that:

Companies are finally putting APIs in front of things that should have had APIs for years

Another warned:

This is not an officially supported Google product.

Which is specified as a note on the GitHub Readme, along with a warning that the project is in active development and breaking changes are expected.

A Hacker News user reported spending 45 minutes following the default setup flow, only to hit scope limits and verification errors:

Multiple errors and issues along the way, now I'm on gws auth login, and trying to pick the oAuth scopes. I go ahead and trust their defaults and select recommended, only to get a warning that this is too many scopes and may error out (then why is this the recommended setting??), and then yeah, it errors out when trying to authenticate in the browser.

On Reddit, the reception was warmer. One user connected gws to Claude Code and had the agent read, summarise and act on emails, calling the experience "way easier" than previous scripting approaches. The community-driven CLI for Microsoft 365 offers a comparable surface for the Microsoft ecosystem, currently at version 11.7.0 with support for SharePoint, Teams, Entra ID and Power Platform. Unlike gws, it ships a static command set via npm rather than generating commands dynamically, though it benefits from a mature plugin architecture and a more straightforward authentication flow.

Full setup instructions, authentication options and a troubleshooting guide are available in the repository README.

About the Author

Rate this Article

Adoption
Style

BT