googleworkspace/cli

Community CLI for Google Workspace APIs.

What it solves

Working with Google Workspace (Drive, Gmail, Calendar, Sheets, etc.) usually means writing raw REST calls against API docs, handling authentication, pagination, and scraping responses. This tool replaces that with a single command-line program that works for both people and AI agents. It removes the boilerplate of curl calls, gives you structured JSON output, and automatically stays up to date with new Google Workspace API endpoints and methods.

How it works

Instead of shipping a fixed list of commands, gws reads Google's official Discovery Service at runtime. When you run a command, it first identifies the service (like drive or gmail), fetches that service's Discovery Document (cached for 24 hours), and builds a command tree from it. Then it re-parses your arguments, handles authentication (OAuth, service accounts, or pre-obtained tokens), and executes the request. All responses — including errors and download metadata — are returned as structured JSON. It also includes hand-crafted helper commands (prefixed with +) for common tasks like sending email, uploading files, or showing your daily agenda, which are tailored for usability.

Who it’s for

  • Developers who want a faster, more reliable way to script Google Workspace tasks without writing REST boilerplate.
  • AI agents (like LLM-based assistants) because every response is JSON, and the included agent skills let agents manage Workspace with minimal custom tooling.
  • Anyone who needs to automate Workspace — from a laptop to CI pipelines to server-side applications.

Highlights

  • Dynamic command surface — automatically picks up new Google Workspace API methods as they are published, no manual updates needed.
  • Structured JSON output everywhere, making it easy to pipe into jq or feed into an LLM.
  • 100+ agent skills (SKILL.md files) included, with 50 curated recipes for Gmail, Drive, Docs, Calendar, and Sheets.
  • Flexible authentication — supports interactive OAuth, headless export, service accounts, and pre-obtained tokens, with credential encryption and precedence rules.
  • Helper commands for common workflows: send email, reply, triage inbox, upload to Drive, create calendar events, standup summaries, and more.
  • Advanced features like multipart uploads, pagination (streaming NDJSON), timezone-aware agenda commands, and Model Armor integration to sanitize responses for prompt injection.

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Project