{"id":46296489,"url":"https://github.com/googleworkspace/cli","last_synced_at":"2026-03-17T22:16:06.839Z","repository":{"id":341894341,"uuid":"1171026502","full_name":"googleworkspace/cli","owner":"googleworkspace","description":"Google 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.","archived":false,"fork":false,"pushed_at":"2026-03-09T00:27:04.000Z","size":9789,"stargazers_count":16595,"open_issues_count":75,"forks_count":641,"subscribers_count":47,"default_branch":"main","last_synced_at":"2026-03-09T07:55:50.375Z","etag":null,"topics":["agent-skills","ai-agent","automation","cli","discovery-api","gemini-cli-extension","google-admin","google-api","google-calendar","google-chat","google-docs","google-drive","google-sheets","google-workspace","oauth2","rust"],"latest_commit_sha":null,"homepage":"https://developers.google.com/workspace","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleworkspace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-02T19:46:06.000Z","updated_at":"2026-03-09T07:54:08.000Z","dependencies_parsed_at":"2026-03-08T04:01:34.073Z","dependency_job_id":null,"html_url":"https://github.com/googleworkspace/cli","commit_stats":null,"previous_names":["googleworkspace/cli"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/googleworkspace/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleworkspace","download_url":"https://codeload.github.com/googleworkspace/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30357620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","ai-agent","automation","cli","discovery-api","gemini-cli-extension","google-admin","google-api","google-calendar","google-chat","google-docs","google-drive","google-sheets","google-workspace","oauth2","rust"],"created_at":"2026-03-04T10:00:50.622Z","updated_at":"2026-03-17T22:16:06.822Z","avatar_url":"https://github.com/googleworkspace.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003egws\u003c/h1\u003e\n\n**One CLI for all of Google Workspace — built for humans and AI agents.**\u003cbr\u003e\nDrive, Gmail, Calendar, and every Workspace API. Zero boilerplate. Structured JSON output. 40+ agent skills included.\n\n\u003e [!NOTE]\n\u003e This is **not** an officially supported Google product.\n\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@googleworkspace/cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@googleworkspace/cli\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/googleworkspace/cli/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/googleworkspace/cli\" alt=\"license\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/googleworkspace/cli/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/googleworkspace/cli/ci.yml?branch=main\u0026label=CI\" alt=\"CI status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@googleworkspace/cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/unpacked-size/@googleworkspace/cli\" alt=\"install size\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n```bash\nnpm install -g @googleworkspace/cli\n```\n\n`gws` doesn't ship a static list of commands. It reads Google's own [Discovery Service](https://developers.google.com/discovery) at runtime and builds its entire command surface dynamically. When Google Workspace adds an API endpoint or method, `gws` picks it up automatically.\n\n\u003e [!IMPORTANT]\n\u003e This project is under active development. Expect breaking changes as we march toward v1.0.\n\n## Contents\n\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Why gws?](#why-gws)\n- [Authentication](#authentication)\n- [AI Agent Skills](#ai-agent-skills)\n- [Advanced Usage](#advanced-usage)\n- [Environment Variables](#environment-variables)\n- [Exit Codes](#exit-codes)\n- [Architecture](#architecture)\n- [Troubleshooting](#troubleshooting)\n- [Development](#development)\n\n## Prerequisites\n\n- **Node.js 18+** — for `npm install` (or download a pre-built binary from [GitHub Releases](https://github.com/googleworkspace/cli/releases))\n- **A Google Cloud project** — required for OAuth credentials. You can create one via the [Google Cloud Console](https://console.cloud.google.com/) or with the [`gcloud` CLI](https://cloud.google.com/sdk/docs/install) or with the `gws auth setup` command.\n- **A Google account** with access to Google Workspace\n\n## Installation\n\n```bash\nnpm install -g @googleworkspace/cli\n```\n\n\u003e The npm package bundles pre-built native binaries for your OS and architecture.\n\u003e No Rust toolchain required.\n\nPre-built binaries are also available on the [GitHub Releases](https://github.com/googleworkspace/cli/releases) page.\n\nOr build from source:\n\n```bash\ncargo install --git https://github.com/googleworkspace/cli --locked\n```\n\nA Nix flake is also available at `github:googleworkspace/cli`\n\n```bash\nnix run github:googleworkspace/cli\n```\n\nOn macOS and Linux, you can also install via [Homebrew](https://brew.sh/):\n\n```bash\nbrew install googleworkspace-cli\n```\n\n## Quick Start\n\n```bash\ngws auth setup     # walks you through Google Cloud project config\ngws auth login     # subsequent OAuth login\ngws drive files list --params '{\"pageSize\": 5}'\n```\n\n## Why gws?\n\n**For humans** — stop writing `curl` calls against REST docs. `gws` gives you `--help` on every resource, `--dry-run` to preview requests, and auto‑pagination.\n\n**For AI agents** — every response is structured JSON. Pair it with the included agent skills and your LLM can manage Workspace without custom tooling.\n\n```bash\n# List the 10 most recent files\ngws drive files list --params '{\"pageSize\": 10}'\n\n# Create a spreadsheet\ngws sheets spreadsheets create --json '{\"properties\": {\"title\": \"Q1 Budget\"}}'\n\n# Send a Chat message\ngws chat spaces messages create \\\n  --params '{\"parent\": \"spaces/xyz\"}' \\\n  --json '{\"text\": \"Deploy complete.\"}' \\\n  --dry-run\n\n# Introspect any method's request/response schema\ngws schema drive.files.list\n\n# Stream paginated results as NDJSON\ngws drive files list --params '{\"pageSize\": 100}' --page-all | jq -r '.files[].name'\n```\n\n## Authentication\n\nThe CLI supports multiple auth workflows so it works on your laptop, in CI, and on a server.\n\n### Which setup should I use?\n\n| I have… | Use |\n|---|---|\n| `gcloud` installed and authenticated | [`gws auth setup`](#interactive-local-desktop) (fastest) |\n| A GCP project but no `gcloud` | [Manual OAuth setup](#manual-oauth-setup-google-cloud-console) |\n| An existing OAuth access token | [`GOOGLE_WORKSPACE_CLI_TOKEN`](#pre-obtained-access-token) |\n| Existing Credentials | [`GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE`](#service-account-server-to-server) |\n\n### Interactive (local desktop)\n\nCredentials 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`).\n\n```bash\ngws auth setup       # one-time: creates a Cloud project, enables APIs, logs you in\ngws auth login       # subsequent scope selection and login\n```\n\n\u003e `gws auth setup` requires the [`gcloud` CLI](https://cloud.google.com/sdk/docs/install). If you don't have `gcloud`, use the [manual setup](#manual-oauth-setup-google-cloud-console) below instead.\n\n\u003e [!WARNING]\n\u003e **Scope limits in testing mode:** If your OAuth app is unverified (testing mode),\n\u003e Google limits consent to ~25 scopes. The `recommended` scope preset includes 85+\n\u003e scopes and **will fail** for unverified apps (especially for `@gmail.com` accounts).\n\u003e Choose individual services instead to filter the scope picker:\n\u003e ```bash\n\u003e gws auth login -s drive,gmail,sheets\n\u003e ```\n\n\n### Manual OAuth setup (Google Cloud Console)\n\nUse this when `gws auth setup` cannot automate project/client creation, or when you want explicit control.\n\n1. Open Google Cloud Console in the target project:\n   - OAuth consent screen: `https://console.cloud.google.com/apis/credentials/consent?project=\u003cPROJECT_ID\u003e`\n   - Credentials: `https://console.cloud.google.com/apis/credentials?project=\u003cPROJECT_ID\u003e`\n2. Configure OAuth branding/audience if prompted:\n   - App type: **External** (testing mode is fine)\n3. Add your account under **Test users**\n4. Create an OAuth client:\n   - Type: **Desktop app**\n5. Download the client JSON and save it to:\n   - `~/.config/gws/client_secret.json`\n\n\u003e [!IMPORTANT]\n\u003e **You must add yourself as a test user.** In the OAuth consent screen, click\n\u003e **Test users → Add users** and enter your Google account email. Without this,\n\u003e login will fail with a generic \"Access blocked\" error.\n\nThen run:\n\n```bash\ngws auth login\n```\n\n### Browser-assisted auth (human or agent)\n\nYou can complete OAuth either manually or with browser automation.\n\n- **Human flow**: run `gws auth login`, open the printed URL, approve scopes.\n- **Agent-assisted flow**: the agent opens the URL, selects account, handles consent prompts, and returns control once the localhost callback succeeds.\n\nIf consent shows **\"Google hasn't verified this app\"** (testing mode), click **Continue**.\nIf scope checkboxes appear, select required scopes (or **Select all**) before continuing.\n\n### Headless / CI (export flow)\n\n1. Complete interactive auth on a machine with a browser.\n2. Export credentials:\n   ```bash\n   gws auth export --unmasked \u003e credentials.json\n   ```\n3. On the headless machine:\n   ```bash\n   export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/credentials.json\n   gws drive files list   # just works\n   ```\n\n### Service Account (server-to-server)\n\nPoint to your key file; no login needed.\n\n```bash\nexport GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/service-account.json\ngws drive files list\n```\n\n### Pre-obtained Access Token\n\nUseful when another tool (e.g. `gcloud`) already mints tokens for your environment.\n\n```bash\nexport GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)\n```\n\n### Precedence\n\n| Priority | Source                 | Set via                                 |\n| -------- | ---------------------- | --------------------------------------- |\n| 1        | Access token           | `GOOGLE_WORKSPACE_CLI_TOKEN`            |\n| 2        | Credentials file       | `GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE` |\n| 3        | Encrypted credentials  | `gws auth login`                        |\n| 4        | Plaintext credentials  | `~/.config/gws/credentials.json`        |\n\nEnvironment variables can also live in a `.env` file.\n\n## AI Agent Skills\n\nThe repo ships 100+ Agent Skills (`SKILL.md` files) — one for every supported API, plus higher-level helpers for common workflows and 50 curated recipes for Gmail, Drive, Docs, Calendar, and Sheets. See the full [Skills Index](docs/skills.md) for the complete list.\n\n```bash\n# Install all skills at once\nnpx skills add https://github.com/googleworkspace/cli\n\n# Or pick only what you need\nnpx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-drive\nnpx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-gmail\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eOpenClaw setup\u003c/summary\u003e\n\n```bash\n# Symlink all skills (stays in sync with repo)\nln -s $(pwd)/skills/gws-* ~/.openclaw/skills/\n\n# Or copy specific skills\ncp -r skills/gws-drive skills/gws-gmail ~/.openclaw/skills/\n```\n\nThe `gws-shared` skill includes an `install` block so OpenClaw auto-installs the CLI via `npm` if `gws` isn't on PATH.\n\n\u003c/details\u003e\n\n## Gemini CLI Extension\n\n1. Authenticate the CLI first:\n\n   ```bash\n   gws auth setup\n   ```\n\n2. Install the extension into the Gemini CLI:\n   ```bash\n   gemini extensions install https://github.com/googleworkspace/cli\n   ```\n\nInstalling this extension gives your Gemini CLI agent direct access to all `gws` commands and Google Workspace agent skills. Because `gws` handles its own authentication securely, you simply need to authenticate your terminal once prior to using the agent, and the extension will automatically inherit your credentials.\n\n## Advanced Usage\n\n### Multipart Uploads\n\n```bash\ngws drive files create --json '{\"name\": \"report.pdf\"}' --upload ./report.pdf\n```\n\n### Pagination\n\n| Flag                | Description                                    | Default |\n| ------------------- | ---------------------------------------------- | ------- |\n| `--page-all`        | Auto-paginate, one JSON line per page (NDJSON) | off     |\n| `--page-limit \u003cN\u003e`  | Max pages to fetch                             | 10      |\n| `--page-delay \u003cMS\u003e` | Delay between pages                            | 100 ms  |\n\n### Google Sheets — Shell Escaping\n\nSheets ranges use `!` which bash interprets as history expansion. Always wrap values in **single quotes**:\n\n```bash\n# Read cells A1:C10 from \"Sheet1\"\ngws sheets spreadsheets values get \\\n  --params '{\"spreadsheetId\": \"SPREADSHEET_ID\", \"range\": \"Sheet1!A1:C10\"}'\n\n# Append rows\ngws sheets spreadsheets values append \\\n  --params '{\"spreadsheetId\": \"ID\", \"range\": \"Sheet1!A1\", \"valueInputOption\": \"USER_ENTERED\"}' \\\n  --json '{\"values\": [[\"Name\", \"Score\"], [\"Alice\", 95]]}'\n```\n\n### Helper Commands\n\nSome services ship hand-crafted helper commands alongside the auto-generated Discovery surface. Helper commands are prefixed with `+` so they are visually distinct and never collide with Discovery-generated method names.\n\nTime-aware helpers (`+agenda`, `+standup-report`, `+weekly-digest`, `+meeting-prep`) automatically use your **Google account timezone** (fetched from Calendar Settings API and cached for 24 hours). Override with `--timezone`/`--tz` on `+agenda`, or set the `--timezone` flag for explicit control.\n\nRun `gws \u003cservice\u003e --help` to see both Discovery methods and helper commands together.\n\n```bash\ngws gmail --help      # shows +send, +reply, +reply-all, +forward, +triage, +watch …\ngws calendar --help   # shows +insert, +agenda …\ngws drive --help      # shows +upload …\n```\n\n**Full helper reference:**\n\n| Service | Command | Description |\n|---------|---------|-------------|\n| `gmail` | `+send` | Send an email |\n| `gmail` | `+reply` | Reply to a message (handles threading automatically) |\n| `gmail` | `+reply-all` | Reply-all to a message |\n| `gmail` | `+forward` | Forward a message to new recipients |\n| `gmail` | `+triage` | Show unread inbox summary (sender, subject, date) |\n| `gmail` | `+watch` | Watch for new emails and stream them as NDJSON |\n| `sheets` | `+append` | Append a row to a spreadsheet |\n| `sheets` | `+read` | Read values from a spreadsheet |\n| `docs` | `+write` | Append text to a document |\n| `chat` | `+send` | Send a message to a space |\n| `drive` | `+upload` | Upload a file with automatic metadata |\n| `calendar` | `+insert` | Create a new event |\n| `calendar` | `+agenda` | Show upcoming events (uses Google account timezone; override with `--timezone`) |\n| `script` | `+push` | Replace all files in an Apps Script project with local files |\n| `workflow` | `+standup-report` | Today's meetings + open tasks as a standup summary |\n| `workflow` | `+meeting-prep` | Prepare for your next meeting: agenda, attendees, and linked docs |\n| `workflow` | `+email-to-task` | Convert a Gmail message into a Google Tasks entry |\n| `workflow` | `+weekly-digest` | Weekly summary: this week's meetings + unread email count |\n| `workflow` | `+file-announce` | Announce a Drive file in a Chat space |\n| `events` | `+subscribe` | Subscribe to Workspace events and stream them as NDJSON |\n| `events` | `+renew` | Renew/reactivate Workspace Events subscriptions |\n| `modelarmor` | `+sanitize-prompt` | Sanitize a user prompt through a Model Armor template |\n| `modelarmor` | `+sanitize-response` | Sanitize a model response through a Model Armor template |\n| `modelarmor` | `+create-template` | Create a new Model Armor template |\n\n**Examples:**\n\n```bash\n# Send an email\ngws gmail +send --to alice@example.com --subject \"Hello\" --body \"Hi there\"\n\n# Reply to a message\ngws gmail +reply --message-id MESSAGE_ID --body \"Thanks!\"\n\n# Append a row to a spreadsheet\ngws sheets +append --spreadsheet SPREADSHEET_ID --values \"Alice,95\"\n\n# Show today's calendar agenda\ngws calendar +agenda\n\n# Upload a file to Drive\ngws drive +upload ./report.pdf --name \"Q1 Report\"\n\n# Morning standup summary\ngws workflow +standup-report\n\n# Show today's agenda in a specific timezone\ngws calendar +agenda --today --timezone America/New_York\n```\n\n### Model Armor (Response Sanitization)\n\nIntegrate [Google Cloud Model Armor](https://cloud.google.com/security/products/model-armor) to scan API responses for prompt injection before they reach your agent.\n\n```bash\ngws gmail users messages get --params '...' \\\n  --sanitize \"projects/P/locations/L/templates/T\"\n```\n\n| Variable                                 | Description                  |\n| ---------------------------------------- | ---------------------------- |\n| `GOOGLE_WORKSPACE_CLI_SANITIZE_TEMPLATE` | Default Model Armor template |\n| `GOOGLE_WORKSPACE_CLI_SANITIZE_MODE`     | `warn` (default) or `block`  |\n\n## Environment Variables\n\nAll variables are optional. See [`.env.example`](.env.example) for a copy-paste template.\n\n| Variable | Description |\n|---|---|\n| `GOOGLE_WORKSPACE_CLI_TOKEN` | Pre-obtained OAuth2 access token (highest priority) |\n| `GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE` | Path to OAuth credentials JSON (user or service account) |\n| `GOOGLE_WORKSPACE_CLI_CLIENT_ID` | OAuth client ID (alternative to `client_secret.json`) |\n| `GOOGLE_WORKSPACE_CLI_CLIENT_SECRET` | OAuth client secret (paired with `CLIENT_ID`) |\n| `GOOGLE_WORKSPACE_CLI_CONFIG_DIR` | Override config directory (default: `~/.config/gws`) |\n| `GOOGLE_WORKSPACE_CLI_SANITIZE_TEMPLATE` | Default Model Armor template |\n| `GOOGLE_WORKSPACE_CLI_SANITIZE_MODE` | `warn` (default) or `block` |\n| `GOOGLE_WORKSPACE_CLI_LOG` | Log level for stderr (e.g., `gws=debug`). Off by default. |\n| `GOOGLE_WORKSPACE_CLI_LOG_FILE` | Directory for JSON log files with daily rotation. Off by default. |\n| `GOOGLE_WORKSPACE_PROJECT_ID` | GCP project ID override for quota/billing and fallback for helper commands |\n\nEnvironment variables can also be set in a `.env` file (loaded via [dotenvy](https://crates.io/crates/dotenvy)).\n\n## Exit Codes\n\n`gws` uses structured exit codes so scripts can branch on the failure type without parsing error output.\n\n| Code | Meaning | Example cause |\n|------|---------|---------------|\n| `0` | Success | Command completed normally |\n| `1` | API error | Google returned a 4xx/5xx response |\n| `2` | Auth error | Credentials missing, expired, or invalid |\n| `3` | Validation error | Bad arguments, unknown service, invalid flag |\n| `4` | Discovery error | Could not fetch the API schema document |\n| `5` | Internal error | Unexpected failure |\n\n```bash\ngws drive files list --params '{\"fileId\": \"bad\"}'\necho $?   # 1 — API error\n\ngws unknown-service files list\necho $?   # 3 — validation error (unknown service)\n```\n\n## Architecture\n\n`gws` uses a **two-phase parsing** strategy:\n\n1. Read `argv[1]` to identify the service (e.g. `drive`)\n2. Fetch the service's Discovery Document (cached 24 h)\n3. Build a `clap::Command` tree from the document's resources and methods\n4. Re-parse the remaining arguments\n5. Authenticate, build the HTTP request, execute\n\nAll output — success, errors, download metadata — is structured JSON.\n\n## Troubleshooting\n\n### \"Access blocked\" or 403 during login\n\nYour OAuth app is in **testing mode** and your account is not listed as a test user.\n\n**Fix:** Open the [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent) in your GCP project → **Test users** → **Add users** → enter your Google account email. Then retry `gws auth login`.\n\n### \"Google hasn't verified this app\"\n\nExpected when your app is in testing mode. Click **Advanced** → **Go to \\\u003capp name\\\u003e (unsafe)** to proceed. This is safe for personal use; verification is only required to publish the app to other users.\n\n### Too many scopes / consent screen error\n\nUnverified (testing mode) apps are limited to ~25 OAuth scopes. The `recommended` scope preset includes many scopes and will exceed this limit.\n\n**Fix:** Select only the scopes you need:\n\n```bash\ngws auth login --scopes drive,gmail,calendar\n```\n\n### `gcloud` CLI not found\n\n`gws auth setup` requires the `gcloud` CLI to automate project creation. You have three options:\n\n1. [Install gcloud](https://cloud.google.com/sdk/docs/install) and use `gcloud` directly.\n2. Re-run `gws auth setup` which wraps `gcloud` calls.\n3. Skip `gcloud` entirely — set up OAuth credentials manually in the [Cloud Console](#manual-oauth-setup-google-cloud-console)\n\n### `redirect_uri_mismatch`\n\nThe OAuth client was not created as a **Desktop app** type. In the [Credentials](https://console.cloud.google.com/apis/credentials) page, delete the existing client, create a new one with type **Desktop app**, and download the new JSON.\n\n### API not enabled — `accessNotConfigured`\n\nIf a required Google API is not enabled for your GCP project, you will see a\n403 error with reason `accessNotConfigured`:\n\n```json\n{\n  \"error\": {\n    \"code\": 403,\n    \"message\": \"Gmail API has not been used in project 549352339482 ...\",\n    \"reason\": \"accessNotConfigured\",\n    \"enable_url\": \"https://console.developers.google.com/apis/api/gmail.googleapis.com/overview?project=549352339482\"\n  }\n}\n```\n\n`gws` also prints an actionable hint to **stderr**:\n\n```\n💡 API not enabled for your GCP project.\n   Enable it at: https://console.developers.google.com/apis/api/gmail.googleapis.com/overview?project=549352339482\n   After enabling, wait a few seconds and retry your command.\n```\n\n**Steps to fix:**\n\n1. Click the `enable_url` link (or copy it from the `enable_url` JSON field).\n2. In the GCP Console, click **Enable**.\n3. Wait ~10 seconds, then retry your `gws` command.\n\n\u003e [!TIP]\n\u003e You can also run `gws auth setup` which walks you through enabling all required\n\u003e APIs for your project automatically.\n\n## Development\n\n```bash\ncargo build                       # dev build\ncargo clippy -- -D warnings       # lint\ncargo test                        # unit tests\n./scripts/coverage.sh             # HTML coverage report → target/llvm-cov/html/\n```\n\n## License\n\nApache-2.0\n\n## Disclaimer\n\n\u003e [!CAUTION]\n\u003e This is **not** an officially supported Google product.\n","funding_links":[],"categories":["Rust","Agent Integration \u0026 Deployment Tools","精选文章","Phase 2: Use Existing Skills","Top 20 by Stars","Productivity and Workspace","Productivity Suites"],"sub_categories":["AI Developer Toolkit","办公协作CLI/MCP","Ready-to-Use Skill Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleworkspace%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleworkspace%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleworkspace%2Fcli/lists"}