What is this?
A single command-line tool for all of Google Workspace — Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin and more — with structured JSON output, built for humans and AI agents alike. It is not an officially supported Google product.
How can one CLI keep up with every Google Workspace API?
It ships no static command list: at runtime gws reads Google's own Discovery Service and builds its command tree from those documents, cached for 24 hours. When Workspace adds an endpoint or method, the CLI picks it up automatically.
How do I get the gws command onto my machine?
Download the pre-built binary for your OS and architecture from GitHub Releases and put it on your $PATH. You can also install via npm (needs Node.js 18+), Homebrew on macOS and Linux, a Nix flake, or build from source.
Do I need anything besides the binary before commands will run?
A Google Cloud project for OAuth credentials plus a Google account with Workspace access; Node.js 18+ is only needed for the npm route. Fastest login is gws auth setup with gcloud; otherwise configure OAuth manually and add yourself as a test user.
Is it safe to adopt right now, or still changing?
It is under active development and breaking changes are expected before v1.0. A common login snag: unverified OAuth apps in testing mode are capped at about 25 consent scopes, so pick individual services instead of the full preset.
How does it store my Google login?
Locally: login credentials are encrypted at rest with AES-256-GCM and the key lives in your OS keyring, with a file-based fallback. Tokens can also come from environment variables or a service account, so headless machines never need an interactive login.
What does it give AI agents beyond raw commands?
Every response is structured JSON, and the repo ships 100+ SKILL.md agent skills — one per supported API — plus higher-level workflow helpers and 50 curated recipes for Gmail, Drive, Docs, Calendar, and Sheets, so an LLM can manage Workspace without custom tooling.
Why use this instead of calling Google's REST APIs with curl?
For humans it removes the boilerplate: --help on every resource, --dry-run to preview requests, auto-pagination (--page-all emits NDJSON), and structured exit codes 0-5 so scripts branch without parsing error text.
Can it protect an agent from prompt injection hiding in API responses?
Yes — optional Google Cloud Model Armor integration sanitizes prompts and responses through a template before your agent sees them. It warns by default; set GOOGLEWORKSPACECLISANIZEMODE=block to reject instead.
How does the Gemini CLI extension fit in?
Authenticate gws once in your terminal, then install the extension into the Gemini CLI: the agent gets direct access to all gws commands and Workspace skills and automatically inherits your existing gws credentials.
Are there shortcuts for everyday tasks, not just raw API calls?
Yes — hand-crafted helper commands prefixed with +: +send, +reply, +triage and +watch for Gmail; +upload for Drive; +agenda and +insert for Calendar; and workflow helpers like +standup-report, +meeting-prep, +weekly-digest and +email-to-task. Time-aware helpers use your Google account timezone.
What are similar projects?
google_workspace_mcp, dingtalk-workspace-cli, cli, ordewell, postiz-agent, google-api-nodejs-client, oh-my-hermes, Filtmall-Shopping-Skill
Which topics is it in?
google-drive, gemini-cli-extension, oauth2, email, google, oauth, homebrew, json, gemini, rest-api, ai-agent, agent-skills