Google has introduced a new command-line interface (CLI) for Google Workspace, often referred to as gws, aimed at simplifying interactions with its suite of productivity tools for both developers and AI agents. Announced and shipped in early March 2026, the tool provides a single interface to services such as Gmail, Google Drive, Calendar, Sheets, Docs, Chat, and Admin.
Developed using Rust and distributed via npm, the gws CLI distinguishes itself through several key features. A significant aspect is its dynamic command generation, which leverages Google’s Discovery Service at runtime. This allows the CLI to automatically update its command set as Google introduces new API endpoints, removing the need for manual updates. According to Code Pulse, “when Google adds a new API endpoint, gws picks it up automatically. No waiting for a package update. No stale command list”.
Crucially, the gws CLI is designed with AI agents in mind. It outputs all responses in structured JSON format, which is easily parsable by large language models and other AI systems. This focus on AI is further evident through the inclusion of over 100 pre-built “agent skills” or workflow recipes, enabling automation of common tasks like email management, file searches, and calendar operations without extensive custom coding. “The CLI is specifically designed to enable seamless and efficient interaction between AI agents and Google Workspace APIs,” states Geeky Gadgets.
The gws CLI supports various authentication methods, including OAuth login, and encrypts credentials at rest. It simplifies integrations for popular AI agent tools such as OpenClaw, Claude Code, and Vertex AI agents, and can function as a Model Context Protocol (MCP) server, offering a standardized way for AI systems to interact with Workspace APIs. Mashable notes that while AI agents could previously connect to Workspace, “this involved workarounds and the use of multiple APIs… The new CLI offers developers a ‘legitimate way to integrate them into their Google Workspace account’”.
The project is open-source under the Apache 2.0 license and is available for installation via npm install -g @googleworkspace/cli. While widely covered and introduced by Google Cloud figures, some sources describe the gws CLI as “experimental and community-oriented” and “not an officially supported Google product”. Despite this, its release signifies Google’s strategic move to make its core services “agent-ready” and reduce the friction in automating Workspace tasks via AI.