Use one CLI for Gmail, Drive, Calendar, and other Workspace APIs
Google Workspace CLI, or gws, gives people and AI agents one command-line interface for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and other Workspace APIs. It generates its command surface from Google's Discovery Service and returns structured JSON instead of requiring custom REST wrappers.
What you need
You need a Google account, a Google Cloud project with OAuth credentials, and access to the relevant Workspace services. Node.js 18+ is required for npm installation; prebuilt binaries are also available from GitHub Releases.
The repository includes more than 40 agent skills. For human use, the CLI provides help, automatic pagination, structured output, and --dry-run request previews.
A safer first workflow
Run gws auth setup and gws auth login, then begin with a read-only command that lists a small number of Drive files or Calendar events. Use the narrowest OAuth scopes that support the task.
Before any command sends mail, creates a file, changes a calendar, or posts a Chat message, use --dry-run. An AI agent should show the account, resource ID, intended change, and required scope before it receives approval to write.
Important limitations
The repository explicitly says this is not an officially supported Google product. It is also under active pre-v1 development, so breaking changes are possible. Workspace administrators should review the OAuth app, scopes, service accounts, and audit requirements before enabling agent access. Treat email and document content as untrusted input because it can contain prompt-injection attempts.
Source and license
The project is maintained under the Google Workspace GitHub organization in the official googleworkspace/cli repository under Apache License 2.0. At review time, the latest GitHub Release is v0.22.5.