Product Thumbnail

Google Workspace CLI

CLI for Google Workspace ecosystem built for humans & agents

Open Source
Developer Tools
Artificial Intelligence
GitHub

Google Workspace CLI lets humans and AI agents control Drive, Gmail, Calendar, Sheets, Docs, and more from one CLI. Built from Google’s Discovery Service, it stays up to date automatically and includes 100+ agent skills to automate workflows without the MCP context tax.

Top comment

Google Workspace CLI is a command-line tool that lets humans and AI agents control the entire Google Workspace... Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin and more, from one CLI.

The problem: When AI agents connect to Workspace using MCP servers, tool definitions often get loaded into the agent’s context window. Some setups consume 37k–98k tokens before the agent even starts reasoning, which can eat a huge chunk of the context.

The solution: This avoids that “context tax.” Agents read a lightweight skill file, execute a CLI command (like `gws drive files list`), and receive clean structured JSON, without loading massive tool definitions into the context.

What makes it different:

  • Commands built dynamically from Google’s Discovery Service, so it stays current automatically

  • 100+ agent skills for Workspace workflows

  • Works with human CLI usage and AI agents

  • Supports CI/headless environments and encrypted credentials

  • Can even run as MCP over stdio if you want MCP transport

Key features:

  • One CLI for the entire Workspace API surface

  • Structured JSON output

  • Helper workflows (email, meetings, standups, file sharing, etc.)

  • Runtime discovery of new Workspace APIs

Who it’s for: Developers building AI agents in Claude Code, Cursor, and agentic workflows, or anyone who wants a faster way to automate Google Workspace without writing REST calls.

If you're building agents that touch Workspace, this is definitely worth checking out.

I hunt the latest and greatest launches in tech, SaaS and AI, follow to be notified @rohanrecommends

Comment highlights

Hello something like that, but for GMP tools

- Google Analytics 4
- Google Tag Manager
- Google Search Console
- Google Ads

Can u see more at: https://www.npmjs.com/package/@lucianfialho/gmp-cli

Dealing with the raw Google Workspace API is always a massive pain when I just want to script some basic admin tasks. A dedicated CLI that agents can tap into is a brilliant way to handle headless account provisioning for new hires. I would love to know if you are managing the OAuth token refresh lifecycle entirely under the hood.

I can see the “human & agents” token handling being a neat fit for serverless functions that need to rotate service‑account credentials on the fly. Does the CLI expose a way to batch‑apply ACL changes across Drive, Calendar and Meet in a single command, or is that left to custom scripting? I once built a nightly sync that pulled Drive permissions into a CSV via raw curl – the CLI would have saved me a dozen of those frantic command‑line gymnastics.

Finally a single CLI that actually covers the whole Workspace stack — Drive, Gmail, Calendar, Sheets, Docs, Chat — instead of stitching together curl and REST docs. I use it for quick scripts (list recent Drive files, send a mail, check today’s agenda) and the --dry-run + --help on every command make it safe to experiment. The fact that it’s built from Google’s Discovery API means new endpoints show up without waiting for a release. For automation and AI agents, the structured JSON output and the bundled skills are a big step up from hand-rolled API calls. Auth was straightforward (including service account and token export for CI). Not officially from Google, but it’s become my default way to touch Workspace from the terminal.

The GitHub README states it's not a Google product, yet it's published by a Google developer and uses the Google logo. Do you know why?

The "context tax" problem with MCP tool definitions consuming 37k-98k tokens before the agent even starts working is a real bottleneck that most developers building agentic workflows have hit. Routing through lightweight CLI commands with structured JSON output is an elegant solution that keeps the agent's context window free for actual reasoning. Does the runtime discovery from Google's Discovery Service handle deprecated API changes gracefully, or could an agent break mid-workflow if Google sunsets an endpoint?