Google Workspace CLI (gws)
Tool : A precise action the AI can call
A command line for all of Google Workspace, Drive, Gmail, Calendar, Sheets, Docs, designed for humans and for agents.
gws builds its commands from Google's Discovery Service, which gives it access to the whole Workspace API, and it answers in structured JSON. It ships with more than a hundred skills and fifty recipes for agents. For a team that wants an agent to sort emails, fill in a spreadsheet or prepare a document, it is the most direct route. Credentials are encrypted at rest, with the key in the system keyring. An option has responses scanned by Model Armor to detect prompt injections. The project warns of breaking changes before version 1.0 and is not an officially supported Google product.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
Automating Google Workspace usually means writing API calls, handling authentication and splitting results page by page. Google Workspace CLI, or gws, replaces that work with a single command line for Drive, Gmail, Calendar, Sheets, Docs, Chat and the other services in the suite.
gws does not ship a fixed list of commands. It reads Google's Discovery Service at runtime and builds its commands from it, so a new endpoint added by Google is picked up automatically. Every response comes back as structured JSON, and helper commands prefixed with + cover common tasks, such as triaging unread emails, appending a row to a sheet or showing today's agenda.
The repository also provides more than a hundred skills (SKILL.md files) and 50 recipes for Gmail, Drive, Docs, Calendar and Sheets. An agent such as Claude Code or Gemini CLI can then drive Workspace without custom tooling. A Gemini CLI extension is also available.
The tool is aimed at developers and teams comfortable with a terminal who want to hand mail, spreadsheet or document tasks to an agent. It requires a Google Cloud project to obtain OAuth credentials, which rules it out for users with no technical habits at all.
gws is a community project, not an officially supported Google product, and it warns of breaking changes before version 1.0. The README notes that an official CLI, gwscli, is now available and supported by Google. gws keeps working and you can move when you are ready.
What it offers
- ·Commands are built from Google's Discovery Service, so the whole Workspace API is covered and new endpoints are picked up automatically.
- ·Every response is returned as structured JSON, with automatic pagination (--page-all) that outputs one JSON line per page.
- ·More than a hundred agent skills and 50 recipes cover Gmail, Drive, Docs, Calendar and Sheets, installable all at once or service by service with npx skills add.
- ·Helper commands prefixed with + simplify common tasks: +send, +reply and +triage for Gmail, +append for Sheets, +agenda for the calendar, +standup-report or +meeting-prep for summaries.
- ·The --dry-run option shows the request without sending it, and gws schema describes the request and response of any method.
- ·Several authentication modes are supported: interactive login, credentials export for a machine without a browser, service account and existing access token.
- ·Credentials are encrypted at rest (AES-256-GCM), with the key stored in the system keyring.
- ·An option to scan responses with Google Cloud Model Armor (--sanitize) detects prompt injections before they reach the agent.
In practice
- Price
- Free
- Commercial use
- Commercial use: yes
- Available on
- cli, claude-code, gemini-cli, any-agent
- FR interface
- No
Security and data
- Rating
- Security: one caveat, see the card
- Your data
- Data with the vendor
- Maintenance
- Active
- Last release
- 31 March 2026
Links and repository checked on 30 November 2026 · added on 30 November 2026
How to install Google Workspace CLI (gws)
npm install -g @googleworkspace/cli