MilikMilik

Google’s New Workspace CLI Brings AI Agents to the Command Line

Google’s New Workspace CLI Brings AI Agents to the Command Line
Interest|High-Quality Software

What the Google Workspace CLI Is and Why It Matters

The Google Workspace CLI is a Rust-based command line tool that exposes a unified, dynamically generated interface to Google Workspace APIs so both human developers and autonomous AI agents can automate workflows across Drive, Gmail, Calendar, Docs, Sheets, Chat, Admin and more through a single entry point. Unlike traditional CLIs, it is built from the ground up for AI agent automation, offering structured JSON output and over 100 bundled agent skills that describe how to call each Workspace API. Google Cloud director Addy Osmani introduced the tool as “built for humans and agents”, highlighting its dual audience: operators who prefer terminal workflows and AI systems that need predictable commands. With this design, the Google Workspace CLI aims to lower the friction between web-based productivity tools and programmable automation, turning everyday Workspace actions into scriptable, repeatable operations.

Dynamic Command Surface: Rust Development Meets Discovery Service

The Google Workspace CLI, shipped as the gws command, is written in Rust and licensed under Apache 2.0, but its most distinctive feature is how it discovers commands. Instead of compiling a static list, gws reads Google’s Discovery Service at runtime and builds its entire command set dynamically, so new or updated API endpoints appear without a new CLI release. For developers, this can reduce the maintenance burden that comes from breaking API changes and version churn. A single pattern applies across services: for example, listing recent Drive files becomes one call, gws drive files list with JSON parameters for options like pageSize. This makes the CLI feel more like a thin, predictable shell over the underlying APIs than a hand-curated toolbox, which aligns well with AI agents that need machine-readable capability descriptions.

Built for Humans and AI Agents: Skills, JSON and MCP

Beyond acting as a basic command line tool, the Google Workspace CLI is designed as infrastructure for AI agent automation. It emits structured JSON by default, a format that language models and orchestration frameworks can parse reliably. The project also ships with more than 100 bundled agent skills, packaged as SKILL.md files that describe how to call each supported API. These skills help AI agents understand what is possible without manual prompt engineering for every endpoint. The CLI can also run as an MCP server, letting tools such as Claude Code or Gemini CLI connect and call Workspace APIs through gws. According to InfoQ, one Reddit user connected gws to Claude Code so the agent could read, summarise and act on emails, describing the experience as “way easier” than earlier scripting-heavy approaches.

New Automation Workflows Across Drive, Gmail and Calendar

For developers and operators, the appeal of the Google Workspace CLI lies in consistent, cross-application workflows. The same calling pattern applies whether the target is Drive, Gmail, Calendar or other Workspace apps, so once gws is set up, it becomes a single interface for sending emails, triaging inboxes or generating meeting summaries. Helper commands prefixed with + wrap common tasks such as sending emails, preparing standup reports or cleaning up notifications, which simplifies both human use and AI orchestration. Agents can now chain commands together: query Drive for recent files, fetch calendar events, then compose a summary email, all through the same command surface. As more teams wire gws into their CI pipelines, cron jobs or agent platforms, the boundary between manual Workspace use and scripted automation is likely to narrow further.

Adoption Challenges and How It Compares to Other CLIs

Despite strong interest—the repository has gathered over 26,500 stars on GitHub—the Google Workspace CLI is still marked as an experimental, unofficial project, with warnings that breaking changes are expected. Community feedback reflects this tension. On Hacker News, some praised the dynamic command generation and the broader move toward API-first, CLI-first tooling, while others struggled with setup. One user reported spending 45 minutes following the default flow, only to hit scope limits and verification errors when running gws auth login with recommended OAuth scopes. Compared to the community-driven CLI for Microsoft 365, which ships a static, npm-based command set and a more straightforward authentication flow, gws trades maturity for flexibility. For teams that can live with rough edges, its dynamic design and AI agent focus hint at a new pattern for how productivity suites expose their capabilities.

Google’s New Workspace CLI Brings AI Agents to the Command Line

Milik earns a commission when you shop through our links, at no extra cost to you. Editorial content is independently selected by our team.

You May Also Like

Comments
Say something...
No comments yet. Be the first to share your thoughts!