hoodini/ai-agents-skills/google-workspace-cli
Claude Code and agent skill by hoodini/ai-agents-skills
- community
Checking that the SKILL.md file is still in the repository.
Interact with all Google Workspace APIs via the gws CLI. Use when managing Drive files, sending/reading Gmail, creating Calendar events, reading/writing Sheets/Docs/Slides, managing Chat spaces, contacts, Admin users/groups, Vault eDiscovery, Classroom, Apps Script, Workspace Events, or configuring the gws MCP server. Triggers on Google Workspace, gws, Drive, Gmail, Calendar, Sheets, Docs, Slides, Chat, Tasks, Meet, Forms, Keep, Admin, People, Vault, Classroom, Apps Script, Cloud Identity, Alert Center, Groups Settings, Licensing, Reseller, Model Armor, gws CLI, gws mcp, Google API, Workspace automation, npx skills add.
Install
npx vskill@latest install hoodini/ai-agents-skills/google-workspace-cliSKILL.md
Google Workspace CLI (gws)
One CLI for all of Google Workspace — Drive, Gmail, Calendar, Sheets, Docs, Slides, Chat, Tasks, Admin, Meet, Forms, Keep, and every other Workspace API. Built for humans and AI agents. Structured JSON output. 100+ agent skills included.
Note: This is not an officially supported Google product.
Important: This project is under active development. Expect breaking changes as we march toward v1.0.
Repository: https://github.com/googleworkspace/cli
How It Works
gws does NOT ship a static list of commands. It reads Google's own Discovery Service at runtime and builds its entire command surface dynamically. When Google adds a new API endpoint or method, gws picks it up automatically — zero updates needed.
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, with the `gcloud` CLI, or with the
gws auth setupcommand. - A Google account with access to Google Workspace
Installation
Alternative installation methods:
Quick Start
Authentication
Which setup should I use?
| I have… | Use | |
|---|---|---|
gcloud installed and authenticated | gws auth setup (fastest — one command) | |
A GCP project but no gcloud | Manual OAuth setup in Cloud Console | |
| An existing OAuth access token | GOOGLE_WORKSPACE_CLI_TOKEN env var | |
| Existing credentials JSON (service account or exported) | GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE env var |
Quick Setup (recommended — requires gcloud CLI)
Credentials are encrypted at rest (AES-256-GCM) with the key stored in your OS keyring.
Scoped Login (for unverified/testing OAuth apps, limited to ~25 scopes)
Warning: Unverified (testing-mode) apps are limited to ~25 OAuth scopes. Therecommendedscope preset includes 85+ scopes and will fail for unverified apps (especially for@gmail.comaccounts). Choose individual services instead:
Multiple Accounts
Credentials are stored per-account as credentials.<b64-email>.enc in ~/.config/gws/, with an accounts.json registry tracking defaults.
Manual OAuth Setup (no gcloud)
Use this when gws auth setup cannot automate project/client creation, or when you want explicit control.
- Open Google Cloud Console in the target project:
- OAuth consent screen:
https://console.cloud.google.com/apis/credentials/consent?project=<PROJECT_ID> - Credentials:
https://console.cloud.google.com/apis/credentials?project=<PROJECT_ID>
- Configure OAuth branding/audience if prompted — App type: External (testing mode is fine)
- Add your account under Test users
- Create an OAuth client — Type: Desktop app
- Download the client JSON → save 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:
Headless / CI
Service Account (server-to-server)
Pre-obtained Access Token
Browser-Assisted Auth (for AI agents)
Agents can complete OAuth with browser automation:
- Human flow: Run
gws auth login, open the printed URL, approve scopes. - Agent-assisted flow: The agent opens the URL, selects the account, handles consent prompts, and returns control once the localhost callback succeeds.
If consent shows "Google hasn't verified this app" (testing mode), click Continue. If scope checkboxes appear, select required scopes (or Select all) before continuing.
Auth Precedence
| Priority | Method | Source | |
|---|---|---|---|
| 1 | Access token | GOOGLE_WORKSPACE_CLI_TOKEN | |
| 2 | Credentials file | GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE | |
| 3 | Per-account encrypted credentials | gws auth login --account EMAIL | |
| 4 | Plaintext credentials | ~/.config/gws/credentials.json |
Account resolution: --account flag > GOOGLE_WORKSPACE_CLI_ACCOUNT env var > default in accounts.json.
All environment variables can also live in a.envfile in your project root.
Command Structure
The universal pattern for ALL gws commands:
Global Flags
| Flag | Description | |
|---|---|---|
--help | Show help for any service, resource, or method | |
--params '{ JSON }' | URL/query parameters as JSON | |
--json '{ JSON }' | Request body as JSON | |
--dry-run | Preview the HTTP request without executing | |
--page-all | Auto-paginate, one JSON line per page (NDJSON) | |
--page-limit <N> | Max pages to fetch (default: 10) | |
--page-delay <MS> | Delay between pages (default: 100ms) | |
--upload <path> | Multipart file upload | |
--account <email> | Use a specific authenticated account | |
--sanitize <template> | Model Armor response sanitization |
Introspecting Schemas
Core Services — Commands & Examples
Google Drive
Gmail
Google Calendar
Google Sheets
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/google-workspace-cli/SKILL.md
Popularity
- Repository stars
- 206
- Repository forks
- 44
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 10 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hoodini/ai-agents-skills/google-workspace-cli)