Google Workspace CLI
by Google Workspace (Community)
A command-line interface that gives AI agents and developers direct access to every Google Workspace API — Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more. Instead of memorizing API endpoints, you describe what you want in structured commands and get JSON output back. The killer feature: it dynamically reads from Google's Discovery Service, so it supports every Workspace API without hardcoded command lists. When Google ships a new API or updates an existing one, the CLI picks it up automatically. No waiting for library updates. Comes with 100+ pre-built agent skills for common workflows — sending emails, creating calendar events, managing Drive files, querying Sheets data. For AI agent developers, this turns Google Workspace into a programmable backend that any LLM can orchestrate. Built in Rust for speed, distributed via npm, pre-built binaries, or Cargo. Credentials are encrypted at rest with AES-256-GCM. Supports OAuth, service accounts, and token-based authentication. Has auto-pagination so you never have to manually handle large result sets, plus dry-run mode to preview API calls before executing. Security-conscious teams get Model Armor integration for sanitizing LLM responses before they hit Workspace APIs — a real concern when AI agents are creating documents or sending emails on your behalf. 17.2K GitHub stars. Not an officially supported Google product, but maintained under the googleworkspace GitHub organization with active development.
Installation
Key Features
- ✓Dynamic Discovery Service integration — supports every Workspace API without hardcoded commands
- ✓100+ pre-built agent skills for Gmail, Drive, Calendar, Sheets, Docs, Chat, and Admin
- ✓AES-256-GCM encrypted credential storage with OAuth, service account, and token auth
- ✓Auto-pagination and dry-run mode for safe API exploration
- ✓Model Armor response sanitization to prevent prompt injection in AI agent workflows
- ✓Structured JSON output for easy parsing by AI agents and scripts
Use Cases
- →Build AI agents that manage email, calendar, and documents through Google Workspace
- →Automate repetitive Workspace tasks from the terminal without browser context-switching
- →Query and update Google Sheets data programmatically as part of data pipelines
- →Create AI-powered email assistants that draft, send, and organize Gmail
- →Manage Google Drive files and permissions across teams via CLI scripts