gws-shared

Provides shared authentication, global flags, and output formatting patterns for the gws CLI.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill gws-shared-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-shared
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/gws-shared
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill gws-shared-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with the gws CLI across Google Workspace services requires consistent authentication setup, correct flag usage, and awareness of shell quoting pitfalls. This Skill centralizes those shared patterns so agents and users avoid repeated mistakes like mangled sheet ranges or leaked secrets. ## Core Features & Use Cases - Authentication Setup: Covers both browser-based OAuth login and service account credentials via GOOGLE_APPLICATION_CREDENTIALS. - Global Flags Reference: Documents output formats (json, table, yaml, csv), --dry-run validation, --sanitize content screening, and pagination controls like --page-all and --page-limit. - Shell Quoting Guidance: Explains how to handle zsh history expansion with sheet ranges like Sheet1!A1 and how to quote JSON payloads for --params and --json flags. - Use Case: An agent needs to read a Google Sheet range and paginate through Drive files; this Skill supplies the correct quoting, pagination flags, and safety rules before any command runs. ## Quick Start Ask the agent to read a Google Sheets range using the gws CLI with proper quoting and JSON output formatting.

Frequently Asked Questions about gws-shared

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate the gws CLI with Google Workspace?

Run gws auth login for interactive browser-based OAuth, or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account key file path for non-interactive authentication.

How do I paginate through all results with the gws CLI?

Use the --page-all flag to auto-paginate, which returns NDJSON output. Control the behavior with --page-limit to cap pages (default 10) and --page-delay to set milliseconds between page requests (default 100).

Why does my Google Sheets range fail in zsh with gws?

Zsh interprets the exclamation mark in ranges like Sheet1!A1 as history expansion. Wrap the range in double quotes instead of single quotes so the shell passes it through correctly.

What output formats does the gws CLI support?

The --format flag supports json (the default), table, yaml, and csv. Use -o or --output to save binary responses to a file when needed.

Can I test a gws command without calling the API?

Yes, use the --dry-run flag to validate the request locally without making an API call. This is recommended before executing write or delete operations.