gws

A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more

CLIEditors’ pickHigh risk

googleworkspace/cli

Install

npm install -g @googleworkspace/cli

Downloads 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 folder

Limitations

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.

Editors’ pick

Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server

CLIMedium risk29.7K
Editors’ pick

A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI

MCP serverMedium risk28.1K
Editors’ pick

Anthropic's official plugins for knowledge work roles: sales, support, product, marketing, legal, finance, data and enterprise search

PluginHigh risk24K
Editors’ pick

An MCP server for Jira and Confluence, cloud and self-hosted: search, create and edit issues and pages

MCP serverHigh risk5.9K