/gw-cli:gw-setupfrom gw-cli
Guide users through Google Cloud Console setup for gw-cli — project creation, API enablement, OAuth consent screen, credentials, and first login. Use when the user wants to set up gw-cli for the first time or add a new Google account.
Ships in gw-cli. Installing the plugin adds it to Claude Code.
Walk the user step-by-step through Google Cloud Console setup and first login.
gcloud CLI installed and authenticatedgw-cli installed (pip install -e . or pip install git+...)gcloud projects create gw-cli-$(date +%Y%m%d) --name="gw-cli"
gcloud config set project gw-cli-YYYYMMDD
If the project ID is taken, append a random suffix.
gcloud services enable calendar-json.googleapis.com gmail.googleapis.com drive.googleapis.com --project=PROJECT_ID
This must be done in the browser:
https://console.cloud.google.com/apis/credentials/consent?project=PROJECT_ID
Settings:
gw-cliIMPORTANT: Add test users
Error 403: access_deniedBrowser:
https://console.cloud.google.com/apis/credentials/oauthclient?project=PROJECT_ID
Settings:
gw-cliAfter creation, download the JSON file.
Recommend saving to ~/.config/gw-cli/ACCOUNT_NAME.json for organization.
gw auth login --credentials PATH_TO_CREDENTIALS_JSON
If the local server callback fails (localhost connection refused), gw-cli automatically falls back to manual mode:
gw auth status
gw cal list --days 3
gw mail list --query "is:unread" --limit 5
Each Google account needs its own credentials.json from its own GCP project (or the same project if the admin allows it).
gw auth login --credentials ~/.config/gw-cli/work-account.json
gw auth list
gw auth switch [email protected]
| Problem | Solution |
|---|---|
Error 403: access_denied | Add your email to OAuth consent screen test users |
ERR_CONNECTION_REFUSED on callback | WSL2 issue — gw-cli auto-falls back to manual URL paste |
HttpError 401 on login | Enable the required APIs (Step 2) |
Token has been expired or revoked | Run gw auth login --credentials <path> again |
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
7 commands in this plugin
/gw-authManage Google Workspace accounts — login, list, switch, status, remove. Use when the user wants to add, switch, or manage Google accounts for gw-cli./gw-calendarGoogle Calendar operations — list events, create/update/delete events, set up Google Meet, check free/busy. Use when the user asks about calendar, meetings, schedules, or availability./gw-driveGoogle Drive operations — list/search files, upload, create Google Docs/Sheets/Slides, manage sharing. Use when the user asks about files, documents, Drive, or sharing.npx claudepluginhub jfk/gw-cli --plugin gw-cli