gws — Unofficial Google Workspace CLI in Go
An unofficial, single-binary Go CLI for Google Workspace — a Gmail CLI, Google Drive CLI, Google Calendar CLI, and more in one tool, with a Claude Code plugin for AI agents.
Unofficial project. workspace-cli is independent and is not affiliated with, endorsed by, or sponsored by Google LLC. See the Disclaimer.
gws is an unofficial Google Workspace CLI written in Go. It gives developers and AI agents a structured, token-efficient interface to 14 Google Workspace services — Gmail, Google Calendar, Google Drive, Docs, Sheets, Slides, Tasks, Chat, Contacts, Groups, Keep, Forms, Workspace Events, and Custom Search. Every command returns consistent JSON (or YAML or human-readable text), which suits scripting, automation, and agent toolchains.
- One Go binary. No Node.js, Python, or other runtime to install.
- Built for AI agents. Ships a Claude Code plugin and a Codex plugin with one skill per service, structured output, and predictable flags — no wrapper code required.
- Commands are compiled in. About 300 task-shaped commands with stable flags; nothing is discovered over the network at startup.
Installation
# Go 1.25+ — installs the `gws` binary
go install github.com/omriariav/workspace-cli/cmd/gws@latest
Prebuilt binaries for macOS and Linux (amd64 and arm64) are attached to every GitHub release.
From Source
git clone https://github.com/omriariav/workspace-cli.git
cd workspace-cli
make build # produces ./bin/gws
./bin/gws --help
Why omriariav/workspace-cli vs. Google's gws and gwscli?
Google publishes two Workspace command-line tools of its own, and one of them shares this project's binary name:
googleworkspace/cli — also installs a binary called gws. It is hosted under Google's GitHub organization, and its README describes it as a community project that is not an officially supported Google product.
gwscli — the official, Google-supported Google Workspace CLI.
| This project (gws) | googleworkspace/cli (gws) | Official gwscli |
|---|
| Status | Unofficial, independent, MIT | Community project in Google's GitHub org, Apache-2.0 | Official and supported by Google |
| Language / install | Go; go install or a release binary | Rust; release binary, npm, Homebrew, or cargo | Prebuilt binary from Google's install script |
| Command surface | About 300 hand-written commands compiled into the binary | Generated at runtime from Google's Discovery documents | A curated set of actions discovered from Google's backend at runtime |
| Calling style | Task flags: gws gmail send --to … --subject … | API-shaped: --params '{…}' and --json '{…}' | Task flags: gwscli gmail create_draft … |
| Services | 14, including Groups, Keep, Forms, Workspace Events | Every API with a Discovery document | 9 (Gmail, Calendar, Drive, Docs, Sheets, Slides, Chat, Tasks, People) |
| Sending email | Yes (send, reply, forward) | Yes | Drafts only |
| Admin governance | OAuth scopes only | OAuth scopes only | Workspace admin policies and approval prompts |
| Agent integration | Claude Code and Codex plugins, one skill per service | Agent skills and a Gemini CLI extension | Packaged agent skills |
Choose this project if you want stable, task-shaped commands with deep per-service coverage in a single Go binary. Choose gwscli if you need Google support or admin-enforced controls on what an agent may do. Choose googleworkspace/cli if you need an API method nothing else wraps.
Binary name overlap: this project and googleworkspace/cli both install gws. If you use both, install one under another name — for example go build -o ~/bin/gws-go ./cmd/gws from a clone of this repository.
Features: Gmail CLI, Google Drive CLI, Google Calendar CLI, and more