Google Workspace cli control Gmail, Docs etc from Terminal

Google has released a new command-line tool for Workspace, giving developers and administrators direct access to services like Gmail, Drive, Calendar, Sheets, and Docs. Google Workspace’s Google Workspace CLI (gws) is available as open source software under the Apache 2.0 license and dynamically generates its command structure from the Google Discovery Service. Within days of its release in early March 2026, the project had 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), allowing AI systems like Claude to connect directly to Workspace data. The CLI has over 40 predefined agent skills designed to automate tasks such as sorting emails, preparing meetings, or organizing files. Developers can create their own skills for their specific requirements.

See more articles from iGuRu.gr when you search for news on Google.

A technical advantage over conventional API clients lies in dynamic command generation: 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 available automatically without requiring a software update. The tool also offers features such as schema introspection, automatic pagination, and structured JSON.

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

Google describes the Workspace CLI as “unofficially supported,” even though the tool is developed by Google itself. The Workspace CLI is different from the Gemini CLI released in 2025, which was designed as a terminal-based AI coding tool.

More information can be found in the project repository on GitHub.


Google preferences

Leave a Comment

Your email address will not be published. Required fields are marked *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).