Google Workspace Gets a Command Line for AI Agents
Google has launched a new Workspace CLI that brings Gmail, Docs, and Sheets into a unified, scriptable interface for AI agents. This signals a strategic return to command-line workflows, designed to let AI automate and scale knowledge work across Google's most popular productivity apps.
The new command-line interface, dubbed `gws`, is written in Rust and dynamically generates its commands by reading Google's live API Discovery Service. This ensures that as Workspace APIs are updated or added, the CLI automatically incorporates them without needing a package update. A core design principle is its utility for AI agents; every response is returned as structured JSON. This eliminates the need for agents to parse inconsistent outputs, providing a clean, machine-readable data stream for automating tasks across applications like Gmail, Drive, and Calendar. The tool ships with over 100 pre-packaged "Agent Skills" and 50 curated recipes for common workflows. This provides developers with a ready-made library for tasks like creating a Google Doc and then sharing it via a Gmail link in a single, streamlined process. Beyond its own commands, `gws` can operate as a Model Context Protocol (MCP) server. This exposes all of its Workspace capabilities as structured tools to any MCP-compatible client, such as the Gemini CLI or Claude Desktop, allowing different AI ecosystems to orchestrate Google Workspace. This approach supplants older, more cumbersome automation methods that required developers to manage multiple APIs, complex OAuth 2.0 authentication flows, and custom code to handle pagination. The CLI consolidates these functions into a single, unified interface. This developer-focused release follows the December 2025 launch of Google Workspace Studio, a no-code platform for business users to build their own AI agents. Together, these tools represent a dual strategy to embed agentic AI across both technical and non-technical enterprise users. From an efficiency standpoint, the CLI is more context-efficient for large language models than a pure MCP implementation. A CLI skill only requires a concise command reference in the prompt's context window, consuming fewer tokens than the large tool schemas required by MCP servers on every call.