Documentation Index
Fetch the complete documentation index at: https://mintlify.com/googleworkspace/cli/llms.txt
Use this file to discover all available pages before exploring further.
Google Workspace CLI
One command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, and every Google Workspace API. Built for humans and AI agents.
npminstall−g@googleworkspace/cli</div><divclassName="text−gray−400text−smmb−4"> gws auth setup
$ gws drive files list —params ''
✓ 5 files retrieved
Quick Start
Get up and running with Google Workspace CLI in minutes
Install the CLI
Install globally via npm:npm install -g @googleworkspace/cli
Or build from source: Authenticate
Run the interactive setup to configure OAuth and log in:This walks you through Google Cloud project configuration and OAuth login. Credentials are encrypted at rest with AES-256-GCM. Run your first command
List your recent Drive files:gws drive files list --params '{"pageSize": 5}'
{
"files": [
{
"id": "1abc...",
"name": "Q1 Report.pdf",
"mimeType": "application/pdf"
},
{
"id": "2def...",
"name": "Budget 2026",
"mimeType": "application/vnd.google-apps.spreadsheet"
}
]
}
Explore more commands
Try other Google Workspace services:# Send a Gmail message
gws gmail users messages send --params '{"userId": "me"}' --json '{"raw": "..."}'
# List calendar events
gws calendar events list --params '{"calendarId": "primary"}'
# Create a spreadsheet
gws sheets spreadsheets create --json '{"properties": {"title": "My Sheet"}}'
Every service from Google’s Discovery API is available automatically.
Explore by Topic
Dive into specific areas of Google Workspace CLI
Dynamic Discovery
Learn how gws builds its command surface from Google’s Discovery Service at runtime
Authentication Guide
OAuth2, Service Accounts, headless CI, and more authentication patterns
AI Agent Skills
100+ agent skills for Drive, Gmail, Calendar, Sheets, Docs, and Chat
MCP Server
Expose Google Workspace APIs to any Model Context Protocol client
Command Reference
Complete command documentation for Drive, Gmail, Calendar, and all services
Advanced Features
Pagination, uploads, dry-run mode, schema introspection, and Model Armor
Key Features
Everything you need to automate Google Workspace
Dynamic Command Surface
Commands are generated from Google’s Discovery Service at runtime. New APIs appear automatically.
Flexible Authentication
OAuth2, Service Accounts, headless CI flows, and domain-wide delegation support.
Structured JSON Output
Every response is structured JSON, perfect for piping to jq or integrating with AI agents.
100+ Agent Skills
Pre-built skills for OpenCode, MCP clients, and Gemini CLI extension integration.
Ready to get started?
Install the CLI and start automating Google Workspace in minutes.
View Quickstart Guide