Favicon of google-workspace-cli

google-workspace-cli

Command-line tool for Gmail, Drive, Docs, Sheets, Calendar, and more. Dynamic API discovery, structured JSON output, and built-in AI agent skills for automation and scripting.

Google Workspace CLI (gws) is a command-line interface that connects your terminal directly to Google Workspace services. Instead of juggling web interfaces or writing REST API calls, you can manage Gmail, Drive, Docs, Sheets, Calendar, Chat, and other Workspace tools entirely from the shell.

The tool's most distinctive feature is its dynamic command structure. Rather than shipping with a fixed set of commands, gws reads Google's Discovery Service at runtime and automatically builds its command surface. When Google releases new API endpoints, gws picks them up instantly—no updates required.

Key capabilities include:

  • Send emails, query Drive files, modify spreadsheets, and manage calendars from scripts
  • Return structured JSON output for easy parsing and integration with other tools
  • Support for auto-pagination to handle large result sets
  • Built-in --dry-run mode to preview requests before executing
  • 40+ pre-built agent skills for AI language models to interact with Workspace
  • Multiple authentication methods: interactive OAuth, service accounts, pre-obtained tokens, and headless CI workflows

The tool works equally well for humans working in the terminal and AI agents automating Workspace tasks. Developers can chain gws commands in pipelines, use it in CI/CD workflows, or integrate it with custom scripts. The structured JSON responses make it ideal for automation, while the built-in help system and schema introspection keep humans productive without consulting external documentation.

Install

Npm
$ npm install -g @googleworkspace/cli

Features

JSON outputScriptable

Media

Pros

4
  • Dynamic API discovery for comprehensive Google Workspace coverage
  • Structured JSON output for easy machine parsing
  • Built-in AI agent skills for automation
  • Supports multiple authentication workflows for flexibility

Cons

2
  • Not an officially supported Google product
  • Under active development with potential for breaking changes

Related tools

Share:

Auto-fetched .

Recent releases

Similar to google-workspace-cli

Favicon

 

  
 
Favicon

 

  
 
Favicon