explaingit

googleworkspace/cli

📈 Trending26,375RustAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

Command-line tool to control Google Workspace services (Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin) from your terminal or scripts without writing custom code.

Mindmap

mindmap
  root((repo))
    What it does
      Control Workspace services
      Automate repetitive tasks
      Feed data to AI agents
    Key features
      Dynamic API discovery
      40+ agent skills
      Structured JSON output
    Use cases
      Batch file operations
      User management
      Message automation
    Tech stack
      Rust
      Google APIs
      OAuth 2.0
    Installation
      npm
      Homebrew
      Direct download
    Audience
      Automation engineers
      AI agent builders
      DevOps teams

Things people build with this

USE CASE 1

Automate batch operations on Google Drive files (move, delete, share) without manual clicking.

USE CASE 2

Build AI agents that can read emails, create calendar events, or manage spreadsheets on behalf of users.

USE CASE 3

Script repetitive admin tasks like bulk user provisioning or sending templated messages via Gmail.

USE CASE 4

Feed structured Google Workspace data into external systems or data pipelines via JSON output.

Tech stack

RustGoogle Workspace APIsOAuth 2.0JSON

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Google OAuth 2.0 credentials setup and authentication flow before any API calls work.

Use freely for any purpose including commercial. Keep the notice and disclose changes to the patent grant.

In plain English

The Google Workspace CLI (called "gws") is a command-line tool that lets you control all of Google's Workspace services, Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, from your terminal or automate them in scripts, without writing any custom code against Google's APIs. In plain terms: instead of clicking around in a browser or building complex integrations, you type commands like "list my Drive files" or "create a spreadsheet" and get structured results back instantly. This is especially powerful for automating repetitive tasks (batch file operations, sending messages, managing users) or feeding Google Workspace data into AI agents. The tool is unusually clever in how it stays current: rather than hardcoding a list of commands, it reads Google's own live API catalog at startup and builds all available commands dynamically. That means when Google adds a new API feature, the CLI gains it automatically. For AI agent builders: it includes over 40 pre-built "agent skills" and outputs everything as structured JSON, the format AI systems prefer. This makes it a ready-made toolkit for giving an AI assistant the ability to manage someone's Google Workspace on their behalf. Important context: despite living under the "googleworkspace" GitHub organization, the README explicitly states this is not an officially supported Google product. It requires setting up your own Google Cloud project and OAuth credentials, which involves some technical steps. Built in Rust (fast and lightweight), installable via npm, Homebrew, or direct download. Free and open-source.

Copy-paste prompts

Prompt 1
Show me how to list all files in my Google Drive using the gws CLI and filter by file type.
Prompt 2
How do I set up OAuth credentials for gws and authenticate with my Google Workspace account?
Prompt 3
Create a bash script that uses gws to send a message to a Google Chat channel and log the response.
Prompt 4
What agent skills does gws provide, and how do I use them to build an AI assistant that manages my calendar?
Prompt 5
How do I export all my Gmail labels and message counts as JSON using gws for analysis?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.