← Back to tools

gws

Unified CLI for all Google Workspace APIs

Cloud & Services Productivity linuxmacoswindows TypeScript Apache-2.0

Description

gws is a unified command-line interface for Google Workspace APIs that dynamically generates commands from Google's Discovery Service. Covers Drive, Gmail, Calendar, Sheets, Docs, Chat, and Admin APIs with structured JSON output. Built for both human operators and AI agents, with 100+ agent skills for common workflows.

Install

npmnpm install -g @googleworkspace/cli
cargocargo install --git https://github.com/googleworkspace/cli --locked
nixnix run github:googleworkspace/cli

AI Summary

Unified CLI for all Google Workspace APIs — Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin — with dynamic command generation and structured JSON output.

Capabilities

  • + Access all Google Workspace APIs from the terminal
  • + Dynamic command generation from Google Discovery Service
  • + Structured JSON output for piping and automation
  • + Multiple auth methods: OAuth, service accounts, access tokens
  • + Auto-pagination with --page-all
  • + File uploads via --upload
  • + Schema introspection for any API method
  • + Dry-run mode to preview requests

Use When

  • You need to manage Google Drive, Gmail, Calendar, or Sheets from the CLI
  • You want to automate Google Workspace tasks in scripts
  • You need structured JSON output from Google APIs
  • You are building AI agent workflows with Google Workspace

Avoid When

  • x You don't have a Google Workspace or Google Cloud account
  • x You need only a single Google service (dedicated CLI may suffice)

Usage Patterns

List Drive files

gws drive files list --page-all

List all files in Google Drive with auto-pagination

Send an email

gws gmail users.messages send --user me --body '{...}'

Send a Gmail message via the API

Inspect API schema

gws schema drive.files.list

View the schema for a specific API method

Create a spreadsheet

gws sheets spreadsheets create --body '{"properties":{"title":"New Sheet"}}'

Create a new Google Sheets spreadsheet

Input / Output

stdout: Structured JSON API responses

Typical Pipelines

gws drive files list --page-all | jq '.files[] | .name'
gws sheets spreadsheets.values get --spreadsheetId ID --range A1:Z | jq .

Related Tools

View AGENTS.md for gws