Google Workspace CLI
gwsis a Google Workspace command-line tool built for humans and AI agents: structured JSON output, dry-run previews, auto-pagination, dynamic command generation from Google's Discovery Service, and bundled agent skills. It is explicitly not an officially supported Google product. Source: googleworkspace/cli README, https://github.com/googleworkspace/cli, accessed 2026-06-25
What It Gives Agents
gws reads Google's Discovery Service at runtime and builds its command surface dynamically, so the CLI can pick up newly exposed Workspace API methods without a manually maintained command list. Responses are structured JSON, which makes it a better default for agents than scraping Google Workspace web UIs. Source: googleworkspace/cli README, accessed 2026-06-25
Core agent affordances:
--dry-runto preview requests before mutations.--page-allfor streaming paginated results as NDJSON.gws schema <service.method>to inspect request and response schemas.- OAuth flows for local desktop, pre-obtained access tokens, and credentials files.
- Agent skills for Workspace tasks. Kevin already has the
gws-*skills installed and routed. Source: googleworkspace/cli README; Active Stack (What to Actually Use), 2026-06-24
GitHub reports 28,352 stars, Rust implementation, Apache-2.0 license, and topics across Drive, Gmail, Calendar, Chat, Sheets, Docs, Admin, OAuth2, Google APIs, and agent skills. Source: GitHub API for googleworkspace/cli, accessed 2026-06-25
Install
Preferred install is a prebuilt binary from GitHub Releases. Other supported paths:
npm install -g @googleworkspace/cli
brew install googleworkspace-cli
cargo install --git https://github.com/googleworkspace/cli --locked
nix run github:googleworkspace/cli
Routing Summary
Use the installed gws-* skills first. They are the procedural layer for Drive, Calendar, Gmail, Sheets, Docs, Slides, Tasks, write/append/triage helpers, and shared auth. Use raw gws commands only when the skill needs a lower-level Workspace method that has no wrapper yet. Source: User request, 2026-06-25; Skill Resolver
Safety rules:
- Read/list first.
- Use
--dry-runbefore writes where supported. - Ask before sending email, writing docs/sheets/slides/tasks, uploading files, or creating calendar events.
- Confirm the target Google account, project, and scopes before any mutation.
Timeline
- 2026-06-25 | Page created after Kevin explicitly asked to use googleworkspace/cli as an awesome tool. Existing
gws-*skills were already installed and active; this page adds the upstream CLI source of truth. Source: User request, 2026-06-25; googleworkspace/cli README