Control Gmail, Docs and Calendar via Terminal: Google launches CLI tool

Google has introduced an open-source tool that allows command-line access to Workspace services. It supports AI agents and uses MCP.

listen Print view
Google logo on white wall

(Image: testing/Shutterstock.com)

2 min. read

Google has released a new command-line tool for Workspace, allowing developers and administrators to directly access services such as Gmail, Drive, Calendar, Sheets, and Docs. The Google Workspace CLI (gws) is available as open-source software under the Apache 2.0 license and dynamically builds its command structure from the Google Discovery Service. Within days of its release in early March 2026, the project garnered significant interest on GitHub.

This is also due to its technical orientation: the tool is aimed at both users and AI agents. It supports the Model Context Protocol (MCP), enabling AI systems like Claude to connect directly with Workspace data. The CLI comes with over 40 predefined agent skills designed to automate tasks such as email triage, meeting preparation, or file organization. Developers can create their own skills for their specific requirements.

A technical advantage over conventional API clients lies in dynamic command creation: the CLI loads command definitions from the Discovery Service at runtime and caches them for 24 hours. During this period, new Workspace API endpoints become automatically available without requiring a software update. The tool also offers features such as schema introspection, automatic pagination, and structured JSON output.

Videos by heise

Installation can be done either via npm (npm install -g @googleworkspace/cli) or as a pre-compiled binary. Alternatively, the software developed in Rust can also be compiled using Cargo. Authentication supports OAuth, service accounts, and domain-wide delegation, with credentials encrypted using AES-256-GCM. Granular permissions can be configured via Google IAM and Service Accounts according to the principle of least privilege.

Google explicitly labels the Workspace CLI as “not officially supported,” even though the tool is developed by Google. The Workspace CLI differs from the Gemini CLI released in 2025, which is designed as a terminal-based AI coding tool. Further information can be found in the project's GitHub repository.

(fo)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.