fabioeloi/gws-cli-skill / gws-cli
gws-cli
VerifiedUse the Google Workspace CLI to inspect schemas, authenticate safely, and run Google Workspace API commands. Use when the user wants to work with Drive, Gmail, Sheets, Docs, Calendar, Chat, Tasks, or other Google Workspace APIs through the gws command.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.6 KB |
| references/REFERENCE.md | markdown | 3.0 KB |
| scripts/check-prereqs.shexecutable | script | 245 B |
references/REFERENCE.md
View on GitHub# gws-cli Reference
This file is the technical companion to the repository documentation in
`README.md` and `docs/`. Keep it focused on execution details, not repository
marketing or contribution process.
## Installation
Preferred install path:
```bash
npm install -g @googleworkspace/cli
```
Alternative install paths supported upstream:
```bash
cargo install --git https://github.com/googleworkspace/cli --locked
nix run github:googleworkspace/cli
```
## Authentication choices
### Interactive local desktop
```bash
gws auth setup
gws auth login
```
### Minimal auth status check
```bash
gws auth status
```
### Service account
```bash
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
gws auth status
```
### Manual OAuth for non-interactive environments
When `gws auth setup` cannot guide the user interactively, prefer one of these approaches:
- supply client ID and secret through environment variables expected by the CLI
- store the downloaded OAuth client file in the configuration path expected by `gws`
- rerun setup interactively on a workstation and export credentials for CI if policy allows it
Do not invent credential values or print secrets into logs.
## Service discovery
Use service help first:
```bash
gws drive --help
gws sheets --help
gws gmail --help
```
Use method schema second:
```bash
gws schema drive.files.list
gws schema docs.documents.batchUpdate
gws schema tasks.tasks.insert
```
## Core CLI syntax
```bash
gws <service> <resource> [sub-resource] <method> [flags]
```
Common flags:
- `--params '{"key":"value"}'` for path and query parameters
- `--json '{"key":"value"}'` for request bodies
- `--output ./file.bin` for binary downloads
- `--upload ./local.file` for uploads
- `--format json|table|yaml|csv` for response formatting
- `--page-all` for automatic pagination with NDJSON output
- `--page-limit <N>` and `--page-delay <MS>` to control pagination behavior
- `--dry-run` for local validation when supported by the CLI path
## Helper command examples
These helpers are implemented upstream and often reduce request complexity:
```bash
gws drive +upload ./report.pdf --parent FOLDER_ID
gws sheets +append --spreadsheet SHEET_ID --range Sheet1!A:C --values '["a","b","c"]'
gws sheets +read --spreadsheet SHEET_ID --range Sheet1!A:C
gws docs +write --document DOC_ID --text 'Hello, world!'
gws calendar +agenda --today
gws gmail +send --to user@example.com --subject 'Status' --body 'Ready'
```
Treat helper commands that modify state as write operations requiring user confirmation.
## Output handling
- Prefer `--format json` for agent workflows.
- Expect NDJSON, not a single JSON document, when `--page-all` is enabled.
- Use `--output` for binary media instead of trying to parse it inline.
## Safe operating checklist
1. Verify `gws` exists.
2. Verify auth state.
3. Inspect service help.
4. Inspect schema.
5. Build command with explicit `--params` and `--json`.
6. Confirm intent for state-changing commands.
7. Execute and inspect structured output.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file). | Stars: 197k | Updated | Claude CodeCodex | Unverified | Install |
| doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |