Skip to content
Back to skills

Gws Quick Ref

ASecurity

Quick reference for gws CLI syntax — core patterns, key flags, pagination, field masks, and output formats.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 28, 2026
ai-agentsgobashsecurity

Works with

  • cli

Security analysis

A100/100

Scanned May 28, 2026

npx -y skills add fakoli/fakoli-plugins --skill gws-quick-ref --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gws Quick Ref?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gws Quick Ref
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fakoli-gws-quick-ref/badge)](https://www.skillsdirectory.com/skills/fakoli-gws-quick-ref)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gws-quick-ref
description: "Quick reference for gws CLI syntax — core patterns, key flags, pagination, field masks, and output formats."
trigger:
  - keyword: gws reference
  - keyword: gws syntax
  - keyword: gws flags
  - keyword: gws cheatsheet
  - keyword: how to use gws
version: 1.0.0
---

# gws Quick Reference

> **Reference:** See the `gws-shared` skill for auth, global flags, and security rules.

Quick reference card for the `gws` CLI syntax and patterns.

## Core Syntax

```bash
gws <service> <resource> [sub-resource] <method> [flags]
```

### Getting Help

```bash
gws --help                              # All services
gws <service> --help                    # Service resources
gws <service> <resource> --help         # Resource methods
gws <service> <resource> <method> --help  # Method flags
```

## Key Flags

| Flag | Purpose | Example |
|------|---------|---------|
| `--params '<JSON>'` | URL/query parameters | `--params '{"userId": "me", "q": "is:unread"}'` |
| `--json '<JSON>'` | Request body (POST/PUT/PATCH) | `--json '{"name": "My File"}'` |
| `--fields '<MASK>'` | Limit response fields | `--fields "files(id,name)"` |
| `--format <FMT>` | Output format | `json`, `yaml`, `csv`, `table` |
| `--page-all` | Auto-paginate (NDJSON output) | Streams all pages |
| `--page-limit N` | Limit pagination pages | `--page-limit 3` |
| `--upload <PATH>` | Multipart file upload | `--upload ./file.pdf` |
| `--output <PATH>` | Download to file | `--output ./download.pdf` |
| `--dry-run` | Preview without executing | Shows what would happen |
| `--sanitize <TPL>` | Model Armor scan | Scans response for injection |

## Common Patterns

### 1. Reading Data (GET/LIST)

```bash
# Always use --fields to minimize response size
gws drive files list \
  --params '{"q": "name contains \"Report\"", "pageSize": 10}' \
  --fields "files(id,name,mimeType)"
```

### 2. Writing Data (POST/PUT/PATCH)

```bash
# Always --dry-run first, then execute
gws calendar events insert \
  --params '{"calendarId": "primary"}' \
  --json '{"summary": "Meeting", "start": {...}, "end": {...}}' \
  --dry-run
```

### 3. Pagination

```bash
# Auto-paginate all results (NDJSON — one JSON object per line)
gws admin users list --params '{"domain": "example.com"}' --page-all

# Limit to N pages
gws drive files list --page-limit 3
```

### 4. Schema Introspection

```bash
# Check method parameters before executing
gws schema drive.files.list
gws schema calendar.events.insert --resolve-refs
```

### 5. File Operations

```bash
# Upload (auto-detects MIME type)
gws drive files create --json '{"name": "report.pdf"}' --upload ./report.pdf

# Download
gws drive files get --params '{"fileId": "ID", "alt": "media"}' --output ./file.pdf

# Export Google Doc as PDF
gws drive files export --params '{"fileId": "ID", "mimeType": "application/pdf"}' --output doc.pdf
```

## Helper Commands (+prefix)

Helpers are service-specific shortcuts that simplify common operations:

| Service | Helpers |
|---------|---------|
| Gmail | `+send`, `+reply`, `+reply-all`, `+forward`, `+triage`, `+watch` |
| Calendar | `+agenda`, `+insert` |
| Drive | `+upload` |
| Sheets | `+read`, `+append` |
| Docs | `+write` |
| Chat | `+send` |
| Script | `+push` |
| Events | `+subscribe`, `+renew` |
| Model Armor | `+create-template`, `+sanitize-prompt`, `+sanitize-response` |
| Workflow | `+standup-report`, `+meeting-prep`, `+email-to-task`, `+weekly-digest`, `+file-announce` |

## Output Formats

| Format | Use Case |
|--------|----------|
| `json` | Default. For parsing and piping to `jq` |
| `yaml` | Human-readable structured output |
| `csv` | Tabular export for spreadsheets |
| `table` | Quick visual scan |

## Available Services

`drive`, `sheets`, `gmail`, `calendar`, `docs`, `slides`, `tasks`, `people`, `chat`, `classroom`, `forms`, `keep`, `meet`, `events`, `admin-reports`, `modelarmor`, `workflow`, `script`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.