Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Google Workspace CLI

$ gws Official High Risk
Google · Workspace & SaaS · Apache-2.0 · macos / linux / windows

Google Workspace CLI (gws) wraps Drive, Gmail, Calendar, Sheets, Docs, and Chat APIs into a single binary generated dynamically from Google's Discovery Service. Built explicitly with AI agents in mind, it ships --dry-run, structured JSON responses, schema introspection, and official SKILL.md files.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g @googleworkspace/cli
CLI vs MCP Decision CLI Preferred vs MCP

gws covers all Workspace services via Discovery with --params / fields masks and ships an official SKILL.md + optional MCP server mode, saving massive context vs multi-service MCP setups.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
✓ Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 24 / 25

Purpose-built for AI agents: structured JSON outputs, --params field masking, gws schema runtime introspection, --dry-run, and official SKILL.md bundles.

  • Ships official SKILL.md files in googleworkspace/cli
  • Includes gws schema, --dry-run, and JSON payload I/O
Trust & Safety 19 / 25

Supports --dry-run, Model Armor sanitization options, and scoped OAuth/service accounts, though Gmail/Drive access inherently touches sensitive user data.

  • Supports --dry-run validation and scoped OAuth tokens
  • External email sending and Drive deletions carry high real-world impact
Setup & Portability 12 / 15

Easy binary/npm install across OSes, though initial GCP OAuth app configuration can take a few setup steps for personal accounts.

  • Distributed via @googleworkspace/cli and Rust releases; requires GCP OAuth setup
Utility & Efficiency 15 / 15

Single binary covers Gmail, Drive, Calendar, Sheets, Docs, and Chat dynamically via Discovery Service.

  • Dynamic Discovery Service covers the entire Workspace API surface
Maintenance & Lineage 9 / 10

Official googleworkspace/cli repository under Apache-2.0 with active development.

  • Hosted under official googleworkspace GitHub org
Docs & Verifiability 9 / 10

Clear README, schema self-inspection, and ready-to-use agent skills.

  • Repository includes agent skills and command examples

Security, Auth & Guardrails

Auth Modes
OAuth Browser Service Account Env API Key
Credential Storage

Encrypted local credential store / OS keyring (gws auth login) or GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE service-account JSON.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

CLI is Apache-2.0 open-source; requires a Google account / GCP OAuth client within Google Workspace API quotas.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Google Workspace CLI (gws) Agent Rules
- Always inspect unfamiliar methods with `gws schema <method>` first.
- Pass `fields` in `--params` on list/get calls to minimize returned payload size.
- Require `--dry-run` preview and explicit user approval before sending emails (`gmail`) or deleting Drive files.

Agent-Ready Command Recipes

Safe Read-Only Queries

List Drive files with field mask
gws drive files list --params '{"pageSize": 10, "fields": "files(id,name,mimeType)"}'

Uses API field masks so only needed JSON fields enter the agent context window.

Inspect API schema before calling
gws schema drive.files.list

Prints exact request/response schema directly from Google Discovery docs.

Controlled Writes & Previews

Preview a file upload with --dry-run
gws drive files create --json '{"name":"report.md"}' --dry-run

Validates the request payload locally without executing the remote mutation.

Strengths for Agents

  • + Ships official SKILL.md files and gws schema introspection specifically for coding agents.
  • + Single CLI spans Drive, Gmail, Calendar, Sheets, Docs, and Chat with consistent JSON I/O.
  • + --dry-run validates write payloads before hitting Workspace APIs.

Caveats & Pitfalls

  • ! First-time OAuth setup requires enabling Workspace APIs in a Google Cloud project.
  • ! Never grant unconstrained Gmail send or Drive delete scopes to autonomous loops.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI