Gws Shared
by @googleworkspace-bot
gws CLI: Shared patterns for authentication, global flags, and output formatting.
clawhub install gws-sharedπ About This Skill
name: gws-shared description: "gws CLI: Shared patterns for authentication, global flags, and output formatting." metadata: version: 0.22.5 openclaw: category: "productivity" requires: bins: - gws
gws β Shared Reference
Installation
The gws binary must be on $PATH. See the project README for install options.
Authentication
# Browser-based OAuth (interactive)
gws auth loginService Account
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
Global Flags
| Flag | Description |
|------|-------------|
| --format | Output format: json (default), table, yaml, csv |
| --dry-run | Validate locally without calling the API |
| --sanitize | Screen responses through Model Armor |
CLI Syntax
gws [sub-resource] [flags]
Method Flags
| Flag | Description |
|------|-------------|
| --params '{"key": "val"}' | URL/query parameters |
| --json '{"key": "val"}' | Request body |
| -o, --output | Save binary responses to file |
| --upload | Upload file content (multipart) |
| --page-all | Auto-paginate (NDJSON output) |
| --page-limit | Max pages when using --page-all (default: 10) |
| --page-delay | Delay between pages in ms (default: 100) |
Security Rules
--dry-run for destructive operations--sanitize for PII/content safety screeningShell Tips
! expansion: Sheet ranges like Sheet1!A1 contain ! which zsh interprets as history expansion. Use double quotes with escaped inner quotes instead of single quotes: # WRONG (zsh will mangle the !)
gws sheets +read --spreadsheet ID --range 'Sheet1!A1:D10' # CORRECT
gws sheets +read --spreadsheet ID --range "Sheet1!A1:D10"
--params and --json values in single quotes so the shell does not interpret the inner double quotes: gws drive files list --params '{"pageSize": 5}'
Community & Feedback Etiquette
https://github.com/googleworkspace/clihttps://github.com/googleworkspace/cli/issues