CLI: Google Workspace CLI - one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat,…
googleworkspace/cliGoogle Workspace CLI - one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more. Dynamically built from Google Discovery Service. Includes AI agent skills.
Evaluate and collect.
What the project says.
gws One CLI for all of Google Workspace - built for humans and AI agents. Drive, Gmail, Calendar, and every Workspace API. Zero boilerplate. Structured JSON output. 40+ agent skills included. [!NOTE] The official Google Workspace CLI ( gwscli ) is now available. It's supported by Google and built for AI agents. Give it a try and tell us what's missing. Install: ask your agent to download and follow the install instructions: curl -fsSL -O PROMPT.md Get started · Moving from gws gws is a community project and is not an officially supported Google product. It keeps working, and you can move when you're ready. ⬇️ Download the latest release for your OS gws doesn't ship a static list of commands. It reads Google's own Discovery Service at runtime and builds its entire command surface dynamically. When Google Workspace adds an API endpoint or method, gws picks it up automatically. [!IMPORTANT] This project is under active development. Expect breaking changes as we march toward v1.0. Contents - Prerequisites - Installation - Quick Start - Why gws? - Authentication - AI Agent Skills - Advanced Usage - Environment Variables - Exit Codes - Architecture - Troubleshooting - Development Prerequisites - Node.js 18+ - for npm install (or download a pre-built binary from GitHub Releases) - A Google Cloud project - required for OAuth credentials. You can create one via the Google Cloud Console or with the gcloud CLI or with the gws auth setup command. - A Google account with access to Google Workspace Installation The recommended way to install gws is to download the pre-built binary for your OS and architecture from the GitHub Releases page. Extract the archive and place the gws binary in your $PATH . For convenience, you can also use npm to automate downloading the appropriate binary from GitHub Releases: Or build from source: A Nix flake is also available at github:googleworkspace/cli On macOS and Linux, you can also install via Homebrew: Quick Start Why gws? For humans - stop writing curl calls against REST docs. gws gives you --help on every resource, --dry-run to preview requests, and auto‑pagination. For AI agents - every response is structured JSON. Pair it with the included agent skills and your LLM can manage Workspace without custom tooling. Authentication The CLI supports multiple auth workflows so it works on your laptop, in CI, and on a server. Which setup should I use? I have… Use --- --- gcloud installed and authenticated gws auth setup (fastest) A GCP project but no gcloud Manual OAuth setup An existing OAuth access token GOOGLE WORKSPACE CLI TOKEN Existing Credentials GOOGLE WORKSPACE CLI CREDENTIALS FILE Interactive (local desktop) Credentials are encrypted at rest (AES-256-GCM) with the key stored in your OS keyring (or /.config/gws/.encryption key when GOOGLE WORKSPACE CLI KEYRING BACKEND=file ). gws auth setup requires the gcloud CLI. If you don't have gcloud , use the manual setup below instead. [!WARNING] Scope limits in testing mode: If your OAuth app is unverified (testing mode), Google limits consent to 25 scopes. The recommended scope preset includes 85+ scopes and will fail for unverified apps (especially for @gmail.com accounts). Choose individual services instead to filter the scope picker: Manual OAuth setup (Google Cloud Console) Use this when gws auth setup cannot automate project/client creation, or when you want explicit control. 1. Open Google Cloud Console in the target project: - OAuth consent screen: - Credentials: 2. Configure OAuth branding/audience if prompted: - App type: External (testing mode is fine) 3. Add your account under Test users 4. Create an OAuth client: - Type: Desktop app 5. Download the client JSON and save it to: - /.config/gws/client secret.json [!IMPORTANT] You must add yourself as a test user. In the OAuth consent screen, click Test users → Add users and enter your Google account email. Without this, login will fail with a generic "Access blocked" error. Then run: Browser-assisted ...
Continue the conversation.
Comments, one-level replies, owner highlights, and discussion notifications are included with ORYNT membership.
Sign in with GitHub