gws
A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more
Install
npm install -g @googleworkspace/cliDownloads the binary from GitHub Releases. Also available via brew install googleworkspace-cli.
This is third-party code. Review the repository files before installing.
What it does
gws builds its command set at runtime from Google's Discovery Service, so new API methods show up without an update. Every response is structured JSON, with --dry-run, auto-pagination and method schema lookup via gws schema. The repository ships over a hundred SKILL.md files: one per API, helpers, and ready recipes for Gmail, Drive, Docs, Calendar and Sheets. It supports interactive OAuth, service accounts, pre-issued tokens and credential export for CI.
Who it is for. For people who want an agent to work with Google mail, documents and calendar without custom integrations.
Good fit when
- An agent needs to search mail, Drive files or calendar events
- You need to create spreadsheets and documents from scripts or CI
- You want to give Gemini CLI or another agent Workspace access in one install
Not a fit when
- Your team uses Yandex 360 or another office suite
- You cannot create a Google Cloud project and OAuth client
Example request
Find this week's emails from accounting in Gmail and save the attachments to a Drive folderLimitations
Not an officially supported Google product, and breaking changes are expected before 1.0. You need a Google Cloud project and OAuth client; unverified apps are limited in scopes, so the recommended preset may fail. Google Workspace availability from Russia is inconsistent.
How to disable. Remove the gws binary or the @googleworkspace/cli package, the ~/.config/gws credentials folder and any installed gws-* skills.
Security check
- Gets OAuth access to mail, files and calendar
- Can send email and modify documents
README in short
The README covers installing via binary, npm, cargo, Nix or Homebrew and a quick start with gws auth setup. It details auth methods and their precedence: token, credentials file, encrypted credentials in the OS keyring. There are sections on agent skills, the Gemini CLI extension, environment variables and exit codes. The project is marked unofficial and under active development.
FAQ
Why does login fail with Access blocked?
For an OAuth app in testing mode, add your account under Test users on the consent screen.
How do I use it in CI without a browser?
Sign in on a machine with a browser, export credentials with gws auth export --unmasked and point GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE at the file.
Related
Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server
A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI
Anthropic's official plugins for knowledge work roles: sales, support, product, marketing, legal, finance, data and enterprise search
An MCP server for Jira and Confluence, cloud and self-hosted: search, create and edit issues and pages