Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsJun 1, 2026·3 min de lectura

Google Workspace CLI — One Command-Line Tool for Drive, Gmail, Sheets, and More

An official Rust CLI from Google that provides unified access to Google Workspace APIs including Drive, Gmail, Calendar, Sheets, Docs, Chat, and Admin.

Listo para agents

Staging seguro para este activo

Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.

Stage only · 29/100Política: staging
Superficie agent
Cualquier agent MCP/CLI
Tipo
CLI Tool
Instalación
Single
Confianza
Confianza: Established
Entrada
Google Workspace CLI Overview
Comando de staging seguro
npx -y tokrepo@latest install d61973e8-5df6-11f1-9bc6-00163e2b0d79 --target codex

Primero deja archivos en staging; la activación requiere revisar el README y el plan staged.

Introduction

Google Workspace CLI is an official command-line tool from Google, written in Rust, that provides unified terminal access to the full suite of Google Workspace APIs. Instead of juggling multiple tools or writing custom scripts for each service, you get one binary that handles Drive, Gmail, Calendar, Sheets, Docs, Chat, and Admin.

What Google Workspace CLI Does

  • Manages Google Drive files: list, upload, download, share, and organize
  • Sends and reads Gmail messages from the terminal
  • Interacts with Google Calendar events, Sheets data, and Docs content
  • Provides Admin SDK access for Workspace domain administration
  • Dynamically generates commands from the Google Discovery Service

Architecture Overview

The CLI is built in Rust and dynamically constructs its command tree from the Google Discovery Service at build time, ensuring complete API coverage without manual endpoint mapping. Authentication uses OAuth 2.0 with a local credential cache. Each subcommand maps to a Workspace API call, and responses are formatted as JSON or human-readable tables. The tool includes AI agent skills so it can be used programmatically by coding agents.

Self-Hosting & Configuration

  • Install via cargo or download a prebuilt binary from GitHub Releases
  • Authenticate with gw auth login which opens a browser OAuth flow
  • Credentials are stored locally in ~/.config/gw-cli/
  • Configure default output format (JSON or table) in settings
  • Supports service account authentication for automated workflows

Key Features

  • Single binary covering all major Google Workspace APIs
  • Dynamic command generation from Google Discovery Service ensures completeness
  • Built in Rust for fast startup and low resource usage
  • AI agent skill integration for use with coding assistants
  • Service account support for CI/CD and automation pipelines

Comparison with Similar Tools

  • gcloud CLI — covers Google Cloud Platform, not Workspace apps; this tool focuses on Workspace
  • GAM — popular Python tool for Google Workspace admin; GW CLI covers admin plus user-facing apps
  • Google APIs Explorer — web-based API testing; GW CLI is a terminal-native tool
  • gsutil — Google Cloud Storage tool; GW CLI handles Drive, Gmail, Calendar, and more

FAQ

Q: Is this an official Google project? A: Yes. The repository is under the googleworkspace GitHub organization.

Q: Does it work with personal Google accounts? A: It is designed for Google Workspace accounts, but some APIs also work with personal accounts.

Q: Can AI coding agents use this tool? A: Yes. It includes agent skill definitions and outputs structured JSON for programmatic use.

Q: How does it handle rate limits? A: The CLI respects Google API quotas and implements automatic retry with exponential backoff.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados