gws-shared

Document shared gws CLI patterns for authentication, flags, and output formatting.

30.3k|1.8k|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/googleworkspace/cli --skill gws-shared-googleworkspace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-shared
Source: https://github.com/googleworkspace/cli/tree/main/skills/gws-shared
Command: npx skills add https://github.com/googleworkspace/cli --skill gws-shared-googleworkspace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides essential shared patterns for using the gws CLI, covering authentication, global flags, and output formatting, simplifying complex command-line interactions.

Core Features & Use Cases

  • Authentication: Guides users through secure login processes for Google Workspace APIs.
  • Global Flags: Explains how to control output format, perform dry runs, and sanitize responses.
  • CLI Syntax: Details the structure for invoking gws commands and their specific method flags.
  • Use Case: A new user needs to list their Google Drive files and save the output as YAML. They can refer to this Skill to understand how to authenticate and apply the --format yaml flag.

Quick Start

Authenticate to the gws CLI using the browser-based OAuth flow.

Frequently Asked Questions about gws-shared

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

FAQPage Schema
How do I authenticate with Google Workspace APIs using the command line?

To authenticate with Google Workspace APIs via the command line, the gws CLI uses a secure browser-based OAuth flow to grant access. You initiate the login process directly from your shell to authorize the CLI.

What are global flags in the gws CLI for Google Workspace?

Global flags in the gws CLI control output formatting, enable dry runs, and sanitize responses across Google Workspace API commands. They provide consistent syntax for modifying command behavior and managing data extraction.

Do I need to install the gws binary before using this CLI?

Yes, you must install the gws binary and ensure it is available in your system's PATH before using these command line patterns. The binary is a required prerequisite for interacting with Google Workspace APIs.

How do I format Google Workspace CLI output as YAML?

To format Google Workspace command line output as YAML, you apply the global `--format yaml` flag to your gws command. This allows you to easily save structured API responses in your desired configuration format.

What is the correct syntax for invoking gws CLI commands?

The correct syntax for invoking gws CLI commands involves a structured pattern using base commands alongside specific method flags. This design ensures precise targeting of Google Workspace API endpoints directly from your shell.