explaingit

googleworkspace/cli

Analysis updated 2026-05-18

25,833RustAudience · developerComplexity · 3/5LicenseSetup · 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
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

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.

What is it built with?

RustGoogle Workspace APIsOAuth 2.0JSON

How does it compare?

googleworkspace/clitokio-rs/axumthealgorithms/rust
Stars25,83325,83325,745
LanguageRustRustRust
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get 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?

Frequently asked questions

What is cli?

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

What language is cli written in?

Mainly Rust. The stack also includes Rust, Google Workspace APIs, OAuth 2.0.

What license does cli use?

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

How hard is cli to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is cli for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.