### Browse Model Armor Resources and Methods Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor/SKILL.md Use this command to get a general overview of available resources and methods within the Model Armor CLI. This is a good starting point to understand the CLI's capabilities. ```bash gws modelarmor --help ``` -------------------------------- ### Create Model Armor Template Examples Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-create-template/SKILL.md Examples demonstrating template creation using a preset configuration or a custom JSON body. ```bash gws modelarmor +create-template --project P --location us-central1 --template-id my-tmpl --preset jailbreak ``` ```bash gws modelarmor +create-template --project P --location us-central1 --template-id my-tmpl --json '{...}' ``` -------------------------------- ### Install gws CLI from Source Source: https://github.com/googleworkspace/cli/blob/main/README.md Build and install the gws CLI from its source code using Cargo. ```bash cargo install --git https://github.com/googleworkspace/cli --locked ``` -------------------------------- ### Initial CLI Setup and Login Source: https://github.com/googleworkspace/cli/blob/main/README.md Use `gws auth setup` for one-time project creation and API enablement. Subsequent logins or scope selections use `gws auth login`. ```bash gws auth setup # one-time: creates a Cloud project, enables APIs, logs you in gws auth login # subsequent scope selection and login ``` -------------------------------- ### Sanitize Prompt Examples Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-prompt/SKILL.md Examples showing direct text input and piping input via stdin. ```bash gws modelarmor +sanitize-prompt --template projects/P/locations/L/templates/T --text 'user input' echo 'prompt' | gws modelarmor +sanitize-prompt --template ... ``` -------------------------------- ### Installing All Agent Skills Source: https://github.com/googleworkspace/cli/blob/main/README.md Use `npx skills add` with the repository URL to install all available Agent Skills at once. ```bash # Install all skills at once npx skills add https://github.com/googleworkspace/cli ``` -------------------------------- ### Append row examples Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-sheets-append/SKILL.md Examples demonstrating single-row, bulk multi-row, and specific range appends. ```bash gws sheets +append --spreadsheet ID --values 'Alice,100,true' gws sheets +append --spreadsheet ID --json-values '[["a","b"],["c","d"]]' gws sheets +append --spreadsheet ID --range "Sheet2!A1" --values 'Alice,100' ``` -------------------------------- ### Install google-workspace-cli Source: https://github.com/googleworkspace/cli/blob/main/crates/google-workspace-cli/README.md Install the CLI using various package managers. The npm command downloads the GitHub release binary. ```bash npm install -g @googleworkspace/cli ``` ```bash cargo install google-workspace-cli ``` ```bash nix run github:googleworkspace/cli ``` -------------------------------- ### gws CLI Quick Start Commands Source: https://github.com/googleworkspace/cli/blob/main/README.md Basic commands to set up authentication and list Drive files using the gws CLI. ```bash gws auth setup # walks you through Google Cloud project config gws auth login # subsequent OAuth login gws drive files list --params '{"pageSize": 5}' ``` -------------------------------- ### Installing Specific Agent Skills Source: https://github.com/googleworkspace/cli/blob/main/README.md Install only the skills you need by providing the specific path to the skill directory within the repository. ```bash # Or pick only what you need npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-drive npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-gmail ``` -------------------------------- ### Sanitize Response Examples Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-response/SKILL.md Examples showing direct text input and piped input for the sanitize-response command. ```bash gws modelarmor +sanitize-response --template projects/P/locations/L/templates/T --text 'model output' model_cmd | gws modelarmor +sanitize-response --template ... ``` -------------------------------- ### Examples of gws gmail +send Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-send/SKILL.md Various command-line examples for sending emails, including attachments, HTML content, and draft creation. ```bash gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi Alice!' ``` ```bash gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --cc bob@example.com ``` ```bash gws gmail +send --to alice@example.com --subject 'Hello' --body 'Bold text' --html ``` ```bash gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --from alias@example.com ``` ```bash gws gmail +send --to alice@example.com --subject 'Report' --body 'See attached' -a report.pdf ``` ```bash gws gmail +send --to alice@example.com --subject 'Files' --body 'Two files' -a a.pdf -a b.csv ``` ```bash gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --draft ``` -------------------------------- ### Quick Start: Authenticate and List Resources Source: https://github.com/googleworkspace/cli/blob/main/crates/google-workspace-cli/README.md Log in to authenticate and then list files from Google Drive and messages from Gmail. The --params flag allows passing JSON-formatted options. ```bash gws auth login ``` ```bash gws drive files list --params '{"pageSize": 5}' ``` ```bash gws gmail users.messages list --params '{"maxResults": 3}' ``` -------------------------------- ### Install gws CLI via npm Source: https://github.com/googleworkspace/cli/blob/main/README.md Install the gws CLI globally using npm. This method automates downloading the appropriate binary from GitHub Releases. ```bash npm install -g @googleworkspace/cli ``` -------------------------------- ### Google Drive upload examples Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-drive-upload/SKILL.md Common patterns for uploading files, including specifying parent folders and custom filenames. ```bash gws drive +upload ./report.pdf gws drive +upload ./report.pdf --parent FOLDER_ID gws drive +upload ./data.csv --name 'Sales Data.csv' ``` -------------------------------- ### Install Google Workspace CLI Source: https://github.com/googleworkspace/cli/blob/main/art/outro.txt Install the Google Workspace CLI globally using npm. This command is required before using any of the CLI's functionalities. ```bash npm i -g @googleworkspace/cli ``` -------------------------------- ### Install gws CLI via Homebrew Source: https://github.com/googleworkspace/cli/blob/main/README.md Install the gws CLI on macOS and Linux using the Homebrew package manager. ```bash brew install googleworkspace-cli ``` -------------------------------- ### Watch emails and clean up resources Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-watch/SKILL.md This example demonstrates watching emails, specifying a GCP project, enabling automatic cleanup of created Pub/Sub resources upon exit with `--cleanup`, and directing output to a specified directory using `--output-dir`. ```bash gws gmail +watch --project my-project --cleanup --output-dir ./emails ``` -------------------------------- ### Headless Authentication Setup Source: https://github.com/googleworkspace/cli/blob/main/README.md On a headless machine, set the `GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE` environment variable to the path of the exported credentials JSON file to authenticate. ```bash export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/credentials.json gws drive files list # just works ``` -------------------------------- ### Install Gemini CLI Extension Source: https://github.com/googleworkspace/cli/blob/main/README.md Install the Gemini CLI extension from a GitHub repository. This grants the Gemini CLI agent access to all gws commands and Google Workspace agent skills. ```bash gemini extensions install https://github.com/googleworkspace/cli ``` -------------------------------- ### View Service Helper Commands Source: https://github.com/googleworkspace/cli/blob/main/README.md Run `gws --help` to list both auto-generated Discovery methods and custom helper commands (prefixed with '+') for a given service. Examples include gmail, calendar, and drive. ```bash gws gmail --help # shows +send, +reply, +reply-all, +forward, +triage, +watch … ``` ```bash gws calendar --help # shows +insert, +agenda … ``` ```bash gws drive --help # shows +upload … ``` -------------------------------- ### Authenticate Gemini CLI Source: https://github.com/googleworkspace/cli/blob/main/README.md Run this command to authenticate your CLI before installing extensions. ```bash gws auth setup ``` -------------------------------- ### Run Weekly Digest Workflow Source: https://github.com/googleworkspace/cli/blob/main/skills/persona-event-coordinator/SKILL.md Starts the weekly digest workflow. Ensure prerequisite skills are loaded. ```bash gws workflow +weekly-digest ``` -------------------------------- ### Basic usage of gws gmail +watch Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-watch/SKILL.md Run this command to start watching for new emails. Ensure you have authenticated with gws. ```bash gws gmail +watch ``` -------------------------------- ### Basic event creation with gws-calendar-insert Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-calendar-insert/SKILL.md Use this command to create a new event with a summary, start time, and end time. Ensure times are in RFC3339 format. ```bash gws calendar +insert --summary 'Standup' --start '2026-06-17T09:00:00-07:00' --end '2026-06-17T09:30:00-07:00' ``` -------------------------------- ### Apps Resource Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-drive/SKILL.md Manages installed applications for Google Drive. ```APIDOC ## Apps API ### Description This resource allows retrieving information about specific apps or listing all apps installed for a user. ### Methods #### GET /drive/apps/{appId} ##### Description Gets a specific app by its ID. ##### Method GET ##### Endpoint /drive/apps/{appId} #### LIST /drive/apps ##### Description Lists a user's installed apps. ##### Method LIST ##### Endpoint /drive/apps ### See Also - [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info) ``` -------------------------------- ### Create a Simple Google Calendar Event Source: https://context7.com/googleworkspace/cli/llms.txt Create a basic Google Calendar event with a summary, start time, and end time using the gws calendar +insert command. ```bash # Create a simple event gws calendar +insert \ --summary 'Team Standup' \ --start '2024-06-17T09:00:00-07:00' \ --end '2024-06-17T09:30:00-07:00' ``` -------------------------------- ### Reading Data (GET/LIST) Source: https://github.com/googleworkspace/cli/blob/main/CONTEXT.md Demonstrates how to read data using GET or LIST operations, emphasizing the use of `--fields` for efficient token usage. ```APIDOC ## Reading Data (GET/LIST) Always use `--fields` to minimize tokens. ```bash # List Drive files (efficient) gws drive files list --params '{"q": "name contains \"Report\"", "pageSize": 10}' --fields "files(id,name,mimeType)" # Get Gmail message details gws gmail users messages get --params '{"userId": "me", "id": "MSG_123"}' ``` ``` -------------------------------- ### About Resource Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-drive/SKILL.md Gets information about the user's Google Drive and system capabilities. ```APIDOC ## GET /drive/about ### Description Gets information about the user, the user's Drive, and system capabilities. Requires the `fields` parameter to be set to specify the exact fields needed. ### Method GET ### Endpoint /drive/about ### Parameters #### Query Parameters - **fields** (string) - Required - Specifies the fields to return. See [Return specific fields](https://developers.google.com/workspace/drive/api/guides/fields-parameter). ### Response #### Success Response (200) - **(fields)** (object) - Information about the user's Drive and system capabilities, based on the `fields` parameter. ``` -------------------------------- ### gws CLI: Reading Data (GET/LIST) Source: https://github.com/googleworkspace/cli/blob/main/CONTEXT.md Examples of using the gws CLI to read data from Google Workspace APIs, emphasizing the use of `--fields` for efficiency when listing Drive files and getting Gmail message details. ```bash # List Drive files (efficient) gws drive files list --params '{"q": "name contains \"Report\"", "pageSize": 10}' --fields "files(id,name,mimeType)" # Get Gmail message details gws gmail users messages get --params '{"userId": "me", "id": "MSG_123"}' ``` -------------------------------- ### gws CLI Error Hint Source: https://github.com/googleworkspace/cli/blob/main/README.md This is an example of the actionable hint printed to stderr by the `gws` CLI when a required API is not enabled. It provides a URL to enable the API and advises waiting before retrying the command. ```text 💡 API not enabled for your GCP project. Enable it at: https://console.developers.google.com/apis/api/gmail.googleapis.com/overview?project=549352339482 After enabling, wait a few seconds and retry your command. ``` -------------------------------- ### VHS Quoting Rules for Commands Source: https://github.com/googleworkspace/cli/blob/main/AGENTS.md Examples demonstrating VHS quoting rules for typing commands. Use double quotes for simple strings and backticks for strings containing JSON with double quotes. ```bash Type "gws --help" Enter ``` ```bash Type `gws drive files list --params '{"pageSize":5}'` Enter ``` -------------------------------- ### Create a Google Classroom course Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-classroom-course/SKILL.md Initializes a new course with specified details. Requires the gws-classroom skill. ```bash gws classroom courses create --json '{"name": "Introduction to CS", "section": "Period 1", "room": "Room 101", "ownerId": "me"}' ``` -------------------------------- ### Browse Drive Resources and Methods Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-drive/SKILL.md Use the `--help` flag to explore available resources and methods within the Drive command set. This is useful for understanding the scope of operations. ```bash gws drive --help ``` -------------------------------- ### Browse Resources and Methods with gws help Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-classroom/SKILL.md Use the `gws --help` command to browse available resources and methods within the Google Workspace CLI. ```bash gws classroom --help ``` -------------------------------- ### Discovering gws-slides Resources and Methods Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-slides/SKILL.md Use the `--help` flag to browse available resources and methods for the gws-slides CLI. This helps in understanding the scope of operations. ```bash gws slides --help ``` -------------------------------- ### Discover gws-meet Resources and Methods Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-meet/SKILL.md Use the `--help` flag to browse available resources and methods within the gws-meet CLI. ```bash # Browse resources and methods gws meet --help ``` -------------------------------- ### Get Google Sheet Metadata Source: https://context7.com/googleworkspace/cli/llms.txt Retrieve metadata for a Google Spreadsheet, such as its title and properties, using the gws sheets spreadsheets get command. ```bash # Get spreadsheet metadata gws sheets spreadsheets get --params '{"spreadsheetId": "SPREADSHEET_ID"}' ``` -------------------------------- ### Create a new Google Doc Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-generate-report-from-sheet/SKILL.md Initializes a new document with a specified title. ```bash gws docs documents create --json '{"title": "Sales Report - January 2025"}' ``` -------------------------------- ### Discovering gws-forms Resources and Methods Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-forms/SKILL.md Use the `--help` flag to browse available resources and methods within the gws forms module. This is a crucial step for understanding the CLI's capabilities. ```bash gws forms --help ``` -------------------------------- ### Read Google Sheet Values using Raw API Source: https://context7.com/googleworkspace/cli/llms.txt Access the Google Sheets API directly to get values from a range with more advanced options using the gws sheets spreadsheets values get command. ```bash # Read using the raw API with more options gws sheets spreadsheets values get \ --params '{"spreadsheetId": "SPREADSHEET_ID", "range": "Sheet1!A1:C10"}' ``` -------------------------------- ### Notes Resource - Get Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-keep/SKILL.md Retrieves a specific Google Keep note. ```APIDOC ## GET /notes/get ### Description Gets a specific Google Keep note. ### Method GET ### Endpoint `/googleworkspace/cli/keep/notes/get` ### Query Parameters - **note_id** (string) - Required - The ID of the note to retrieve. ``` -------------------------------- ### Create a Google Drive Project Folder Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-organize-drive-folder/SKILL.md Use this command to create a new top-level folder for your project in Google Drive. Ensure the `gws-drive` skill is loaded. ```bash gws drive files create --json '{"name": "Q2 Project", "mimeType": "application/vnd.google-apps.folder"}' ``` -------------------------------- ### GET conferenceRecords Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-meet/SKILL.md Retrieve or list conference records from Google Meet. ```APIDOC ## GET conferenceRecords ### Description Operations to retrieve conference records, including getting a specific record by ID or listing multiple records. ### Method GET ### Endpoint gws meet conferenceRecords get gws meet conferenceRecords list ### Parameters #### Query Parameters - **conferenceId** (string) - Required for 'get' - The unique identifier of the conference record. ``` -------------------------------- ### GET /documents/get Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-docs/SKILL.md Retrieves the latest version of a specified Google Document. ```APIDOC ## GET /documents/get ### Description Gets the latest version of the specified document. ### Method GET ### Endpoint docs.documents.get ``` -------------------------------- ### gws CLI Core Syntax and Help Source: https://github.com/googleworkspace/cli/blob/main/CONTEXT.md Demonstrates the fundamental command structure of the gws CLI and how to access its help documentation at various levels. ```bash gws [sub-resource] [flags] Use --help to get help on the available commands. gws --help gws --help gws --help gws --help ``` -------------------------------- ### Browse gws docs command help Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-docs/SKILL.md Inspect the available resources and methods for the 'gws docs' command by running the help command. ```bash gws docs --help ``` -------------------------------- ### gws chat customEmojis get Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-chat/SKILL.md Retrieves details of a specific custom emoji. ```APIDOC ## GET /api/chat/v1/customEmojis/{name} ### Description Returns details about a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. ### Method GET ### Endpoint /api/chat/v1/customEmojis/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the custom emoji to retrieve. Format: `customEmojis/{customEmojiId}`. #### Query Parameters - **alt** (string) - Optional - Media download perspective. E.g. "media", "json". - **callback** (string) - Optional - JavaScript callback function name for JSONP requests. - **fields** (string) - Optional - Selector specifying which fields to include in a partial response. - **key** (string) - Optional - API key. Your API key identifies your project and provides use data, such as API usage. Obtain the key from the Google Cloud Console. - **oauth_token** (string) - Optional - OAuth 2.0 token for the current user. - **prettyPrint** (boolean) - Optional - Returns response with indentations and line breaks; false is equivalent to no pretty-printing. - **quotaUser** (string) - Optional - User - Limit on all quotas associated with this user for consumer projects. - **upload_protocol** (string) - Optional - Upload protocol for media uploads. v1 is only supported for media uploads. - **userIp** (string) - Optional - IP address of the end-user for whom identity is being requested. ### Response #### Success Response (200) - **name** (string) - The name of the custom emoji. - **description** (string) - Description of the custom emoji. - **url** (string) - The URL of the image for the custom emoji. - **createTime** (string) - The time when the custom emoji was created. - **updateTime** (string) - The time when the custom emoji was last updated. #### Response Example ```json { "name": ":my_emoji:", "description": "A custom emoji for my team.", "url": "https://example.com/my_emoji.png", "createTime": "2023-10-27T10:00:00Z", "updateTime": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Get Calendar Event Details Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-batch-invite-to-event/SKILL.md Retrieves the current state of a calendar event to prepare for modifications. ```bash gws calendar events get --params '{"calendarId": "primary", "eventId": "EVENT_ID"}' ``` -------------------------------- ### Core Syntax and Help Source: https://github.com/googleworkspace/cli/blob/main/CONTEXT.md Explains the basic syntax for using the gws CLI and how to access help for commands and services. ```APIDOC ## Core Syntax ```bash gws [sub-resource] [flags] ``` Use `--help` to get help on the available commands. ```bash gws --help gws --help gws --help gws --help ``` ``` -------------------------------- ### Insert New Calendar Event Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-plan-weekly-schedule/SKILL.md Adds a new event to the calendar with a specified summary, start time, and end time. ```bash gws calendar +insert --summary 'Deep Work Block' --start '2026-01-21T14:00:00' --end '2026-01-21T16:00:00' ``` -------------------------------- ### Execute Classroom CLI Commands Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-classroom/SKILL.md The base syntax for interacting with Google Classroom resources via the gws CLI. ```bash gws classroom [flags] ``` -------------------------------- ### Create Model Armor Template Usage Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-create-template/SKILL.md Basic command structure for creating a new template with required project, location, and ID parameters. ```bash gws modelarmor +create-template --project --location --template-id ``` -------------------------------- ### Create Expense Tracker Spreadsheet Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-expense-tracker/SKILL.md Initializes a new Google Sheets file in Google Drive. ```bash gws drive files create --json '{"name": "Expense Tracker 2025", "mimeType": "application/vnd.google-apps.spreadsheet"}' ``` -------------------------------- ### Get Google Doc Content Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-draft-email-from-doc/SKILL.md Use this command to retrieve the content of a Google Doc. Replace `DOC_ID` with the actual document ID. ```bash gws docs documents get --params '{"documentId": "DOC_ID"}' ``` -------------------------------- ### Run Weekly Digest Workflow Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-workflow-weekly-digest/SKILL.md Execute the weekly digest workflow to get a summary of meetings and unread emails. This command is read-only. ```bash gws workflow +weekly-digest ``` ```bash gws workflow +weekly-digest --format table ``` -------------------------------- ### Browse CLI Resources and Methods Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-admin-reports/SKILL.md Use this command to explore available resources and methods within the gws admin-reports CLI. This helps in understanding the structure and capabilities of the tool. ```bash gws admin-reports --help ``` -------------------------------- ### Update event time and notify attendees Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-reschedule-meeting/SKILL.md Apply a patch to the event to change the start and end times while triggering notifications for all attendees. ```bash gws calendar events patch --params '{"calendarId": "primary", "eventId": "EVENT_ID", "sendUpdates": "all"}' --json '{"start": {"dateTime": "2025-01-22T14:00:00", "timeZone": "America/New_York"}, "end": {"dateTime": "2025-01-22T15:00:00", "timeZone": "America/New_York"}}' ``` -------------------------------- ### Create a Google Meet space Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-meet-space/SKILL.md Initializes a new meeting space with open access settings. Requires the gws-meet skill. ```bash gws meet spaces create --json '{"config": {"accessType": "OPEN"}}' ``` -------------------------------- ### Execute Meeting Preparation Workflow Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-workflow-meeting-prep/SKILL.md Run the workflow to fetch details for the next upcoming meeting. ```bash gws workflow +meeting-prep ``` -------------------------------- ### View Weekly Calendar Agenda Source: https://github.com/googleworkspace/cli/blob/main/skills/persona-exec-assistant/SKILL.md Use this command on Monday mornings for weekly planning and to get an overview of the upcoming week's schedule. ```bash gws calendar +agenda --week ``` -------------------------------- ### Get Spreadsheet Details Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-backup-sheet-as-csv/SKILL.md Use this command to retrieve details about a specific Google Sheet, which can be useful for subsequent operations. Replace 'SHEET_ID' with the actual ID of your spreadsheet. ```bash gws sheets spreadsheets get --params '{"spreadsheetId": "SHEET_ID"}' ``` -------------------------------- ### Inspect CLI Commands and Schemas Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-chat/SKILL.md Use these commands to explore available resources and view the required parameters for specific methods. ```bash # Browse resources and methods gws chat --help # Inspect a method's required params, types, and defaults gws schema chat.. ``` -------------------------------- ### Discover CLI Commands Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-sheets/SKILL.md Commands to explore available resources and inspect method requirements. ```bash # Browse resources and methods gws sheets --help # Inspect a method's required params, types, and defaults gws schema sheets.. ``` -------------------------------- ### Discovering Commands Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-sheets/SKILL.md Instructions on how to inspect and discover available commands and their parameters. ```APIDOC ## Discovering Commands ### Description Before calling any API method, you can inspect it to understand its requirements and available options. ### Usage ```bash # Browse resources and methods gws sheets --help # Inspect a method's required params, types, and defaults gws schema sheets.. ``` ### Note Use the output from `gws schema` to construct your `--params` and `--json` flags for API calls. ``` -------------------------------- ### Get Full Gmail Message Content Source: https://context7.com/googleworkspace/cli/llms.txt Retrieve the complete content of a specific Gmail message, including headers and body, using its ID and specifying 'full' format. ```bash gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID", "format": "full"}' ``` -------------------------------- ### Discover Workflow Commands and Schemas Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-workflow/SKILL.md Use these commands to explore available resources and inspect parameter requirements for specific methods. ```bash # Browse resources and methods gws workflow --help # Inspect a method's required params, types, and defaults gws schema workflow.. ``` -------------------------------- ### Basic gws-meet Command Structure Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-meet/SKILL.md This is the general structure for using the gws-meet CLI. Replace `` and `` with specific API endpoints. ```bash gws meet [flags] ``` -------------------------------- ### Read Sales Data from Sheet Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-log-deal-update/SKILL.md Reads existing data from the 'Pipeline' sheet, starting from cell A1 up to column F. Replace SHEET_ID with the actual ID of your sales tracking spreadsheet. ```bash gws sheets +read --spreadsheet SHEET_ID --range "Pipeline!A1:F" ``` -------------------------------- ### Basic gws docs command structure Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-docs/SKILL.md Use this command structure to interact with Google Docs resources and methods. Ensure you have the necessary prerequisites and authentication set up. ```bash gws docs [flags] ``` -------------------------------- ### Upload a file via CLI Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-drive-upload/SKILL.md Basic usage for uploading a local file to Google Drive. ```bash gws drive +upload ``` -------------------------------- ### Create a Google Tasks List Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-task-list/SKILL.md Use this command to create a new task list. The title of the list is provided in JSON format. ```bash gws tasks tasklists insert --json '{"title": "Q2 Goals"}' ``` -------------------------------- ### Show limited unread emails with a specific query Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-triage/SKILL.md Retrieves a specified number of unread emails matching a custom Gmail search query. For example, this shows a maximum of 5 emails from 'boss'. ```bash gws gmail +triage --max 5 --query 'from:boss' ``` -------------------------------- ### Upload a File to Drive using Drive Helper Command Source: https://github.com/googleworkspace/cli/blob/main/README.md Use the `+upload` helper command for the `drive` service to upload a local file. Specify the file path and optionally provide a name for the file in Drive. ```bash gws drive +upload ./report.pdf --name "Q1 Report" ``` -------------------------------- ### Get Content of a Specific Gmail Message Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-forward-labeled-emails/SKILL.md Retrieve the full content of a Gmail message using its unique ID. This is necessary to include the original message body in the forwarded email. Replace 'MSG_ID' with the actual message ID. ```bash gws gmail users messages get --params '{"userId": "me", "id": "MSG_ID"}' ``` -------------------------------- ### Create a Shared Drive Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-shared-drive/SKILL.md Initializes a new Shared Drive with a unique request ID and specified name. ```bash gws drive drives create --params '{"requestId": "unique-id-123"}' --json '{"name": "Project X"}' ``` -------------------------------- ### Read Cells from Google Sheets with Shell Escaping Source: https://github.com/googleworkspace/cli/blob/main/README.md When interacting with Google Sheets ranges that contain '!', ensure values are wrapped in single quotes to prevent bash history expansion. This example reads cells A1:C10 from 'Sheet1'. ```bash gws sheets spreadsheets values get \ --params '{"spreadsheetId": "SPREADSHEET_ID", "range": "Sheet1!A1:C10"}' ``` -------------------------------- ### gws CLI: Schema Introspection Source: https://github.com/googleworkspace/cli/blob/main/CONTEXT.md Provides examples of using the gws CLI to inspect API schemas, which is useful for understanding the required parameters and body structures before executing commands. ```bash gws schema drive.files.list gws schema sheets.spreadsheets.create ``` -------------------------------- ### Discover CLI Commands Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-script/SKILL.md Commands for inspecting available resources, methods, and parameter requirements. ```bash # Browse resources and methods gws script --help # Inspect a method's required params, types, and defaults gws schema script.. ``` -------------------------------- ### Create Google Calendar Event Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-events-from-sheet/SKILL.md Use the `gws calendar insert` command to create a new calendar event. Provide the summary, start and end times, and attendee emails. This command is intended to be used within a loop processing rows from a sheet. ```bash gws calendar +insert --summary 'Team Standup' --start '2026-01-20T09:00:00' --end '2026-01-20T09:30:00' --attendee alice@company.com --attendee bob@company.com ``` -------------------------------- ### Discover Gmail CLI commands and schemas Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail/SKILL.md Use these commands to explore available resources and inspect parameter requirements for specific methods. ```bash # Browse resources and methods gws gmail --help # Inspect a method's required params, types, and defaults gws schema gmail.. ``` -------------------------------- ### Browse gws-calendar Resources and Methods Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-calendar/SKILL.md Inspect available resources and methods for the gws-calendar CLI. This command helps you understand the scope of operations you can perform. ```bash gws calendar --help ``` -------------------------------- ### Run gws CLI with Nix Source: https://github.com/googleworkspace/cli/blob/main/README.md Execute the gws CLI using Nix, leveraging a flake for environment management. ```bash nix run github:googleworkspace/cli ``` -------------------------------- ### Basic Subscription Command Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-events-subscribe/SKILL.md Use this command to subscribe to Google Workspace events. Ensure prerequisites for authentication and authorization are met. ```bash gws events +subscribe ``` -------------------------------- ### Upload Event Materials to Drive Source: https://github.com/googleworkspace/cli/blob/main/skills/persona-event-coordinator/SKILL.md Uploads event-related materials to Google Drive. Ensure `gws-drive` skill is available. ```bash gws drive +upload --file "event_agenda.pdf" --destination "/events/major-event/materials/" ``` -------------------------------- ### Browse People API Resources Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-people/SKILL.md Use this command to view available resources and methods within the People API. It helps in understanding the structure and capabilities of the API. ```bash gws people --help ``` -------------------------------- ### Basic gws-calendar Command Structure Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-calendar/SKILL.md Use this command structure to interact with Google Calendar resources and methods. Ensure you have read the prerequisite documentation for authentication and global flags. ```bash gws calendar [flags] ``` -------------------------------- ### Create post-mortem document Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-post-mortem-setup/SKILL.md Generates a new Google Doc with a predefined template structure. ```bash gws docs +write --title 'Post-Mortem: [Incident]' --body '## Summary ## Timeline ## Root Cause ## Action Items' ``` -------------------------------- ### Run VHS Demo Recording Source: https://github.com/googleworkspace/cli/blob/main/AGENTS.md Command to execute a demo recording using VHS. Ensure demo files are located in the 'docs/' directory. ```bash vhs docs/demo.tape ``` -------------------------------- ### Inspect API Schemas and Format Output Source: https://context7.com/googleworkspace/cli/llms.txt Tools for discovering available API methods, validating parameters via dry-runs, and formatting command output as JSON, Table, or YAML. ```bash gws schema drive.files.list gws drive files list --params '{"pageSize": 10}' --dry-run gws drive files list --format table ``` -------------------------------- ### Create calendar event via gws CLI Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-find-free-time/SKILL.md Schedules a meeting by specifying the summary, attendees, and start/end timestamps. ```bash gws calendar +insert --summary 'Meeting' --attendee user1@company.com --attendee user2@company.com --start '2024-03-18T14:00:00' --end '2024-03-18T14:30:00' ``` -------------------------------- ### Google Slides CLI Overview Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-slides/SKILL.md General usage pattern for the Google Slides CLI tool. ```APIDOC ## CLI Usage ### Description The Google Slides CLI provides an interface to read and write presentations. All commands follow the structure: `gws slides [flags]`. ### Prerequisite Ensure you have read `../gws-shared/SKILL.md` for authentication and security rules. If missing, run `gws generate-skills`. ### Discovery - Browse resources: `gws slides --help` - Inspect method schema: `gws schema slides..` ``` -------------------------------- ### Run Standup Report Command with Table Format Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-workflow-standup-report/SKILL.md Execute the command to generate the standup report with the output formatted as a table. This is useful for human-readable summaries. ```bash gws workflow +standup-report --format table ``` -------------------------------- ### Subscribe with Cleanup and Output Directory Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-events-subscribe/SKILL.md Subscribe to events, specifying an output directory for individual event files and enabling cleanup of created Pub/Sub resources upon exit. This ensures a clean state after the subscription ends. ```bash gws events +subscribe ... --cleanup --output-dir ./events ``` -------------------------------- ### Generate Morning Standup Summary using Workflow Helper Command Source: https://github.com/googleworkspace/cli/blob/main/README.md The `+standup-report` helper command for the `workflow` service generates a summary of today's meetings and open tasks. ```bash gws workflow +standup-report ``` -------------------------------- ### CLI Command: gws workflow +standup-report Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-workflow-standup-report/SKILL.md Executes the standup report workflow to retrieve a summary of today's meetings and open tasks. ```APIDOC ## CLI COMMAND: gws workflow +standup-report ### Description Generates a standup summary by combining today's calendar agenda with the user's open tasks list. This command is read-only and does not modify any data. ### Usage `gws workflow +standup-report [flags]` ### Flags - **--format** (string) - Optional - Output format: json (default), table, yaml, csv ### Examples `gws workflow +standup-report` `gws workflow +standup-report --format table` ``` -------------------------------- ### Invite a student to a course Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-create-classroom-course/SKILL.md Sends an invitation to a user to join a specific course by ID. ```bash gws classroom invitations create --json '{"courseId": "COURSE_ID", "userId": "student@school.edu", "role": "STUDENT"}' ``` -------------------------------- ### Create Google Doc Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-save-email-to-doc/SKILL.md Creates a new Google Doc with a specified title. Requires 'gws-docs' skill. ```bash gws docs documents create --json '{"title": "Saved Email - Important Update"}' ``` -------------------------------- ### Project File Search Command Source: https://github.com/googleworkspace/cli/blob/main/skills/persona-project-manager/SKILL.md Finds project folders using a specific query parameter. ```bash gws drive files list --params '{"q": "name contains \'Project\'"}' ``` -------------------------------- ### Manual OAuth Login Source: https://github.com/googleworkspace/cli/blob/main/README.md Run `gws auth login` after manually configuring OAuth client credentials in the Google Cloud Console and saving the JSON file to `~/.config/gws/client_secret.json`. ```bash gws auth login ``` -------------------------------- ### Build and Test Commands for gws CLI Source: https://github.com/googleworkspace/cli/blob/main/AGENTS.md Standard commands for building the gws CLI in development mode, performing lint checks with clippy, and running unit tests. Ensure test coverage for new code. ```bash cargo build # Build in dev mode cargo clippy -- -D warnings # Lint check cargo test # Run tests ``` -------------------------------- ### Using a Pre-obtained Access Token Source: https://github.com/googleworkspace/cli/blob/main/README.md If you have an access token from another tool like `gcloud`, set the `GOOGLE_WORKSPACE_CLI_TOKEN` environment variable to use it for authentication. ```bash export GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token) ``` -------------------------------- ### Verify Google Drive Folder Permissions Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-share-folder-with-team/SKILL.md List all permissions for a given Google Drive folder in a table format to verify access. Replace `FOLDER_ID` with the actual folder ID. Requires `gws-drive` skill. ```bash gws drive permissions list --params '{"fileId": "FOLDER_ID"}' --format table ``` -------------------------------- ### Verify File Permissions Source: https://github.com/googleworkspace/cli/blob/main/skills/recipe-share-event-materials/SKILL.md Lists all current permissions for a file to confirm the sharing status. ```bash gws drive permissions list --params '{"fileId": "FILE_ID"}' --format table ``` -------------------------------- ### POST /documents/create Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-docs/SKILL.md Creates a new blank document with a specified title. ```APIDOC ## POST /documents/create ### Description Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document. ### Method POST ### Endpoint docs.documents.create ``` -------------------------------- ### Discover gws events commands Source: https://github.com/googleworkspace/cli/blob/main/skills/gws-events/SKILL.md Commands to browse available resources and inspect specific method schemas for parameter requirements. ```bash # Browse resources and methods gws events --help # Inspect a method's required params, types, and defaults gws schema events.. ``` -------------------------------- ### Symlinking OpenClaw Skills Source: https://github.com/googleworkspace/cli/blob/main/README.md Symlink all `gws-*` skills from the local repository to the OpenClaw skills directory to keep them in sync. ```bash # Symlink all skills (stays in sync with repo) ln -s $(pwd)/skills/gws-* ~/.openclaw/skills/ ``` -------------------------------- ### Fetch Discovery Document in Rust Source: https://github.com/googleworkspace/cli/blob/main/crates/google-workspace/README.md Demonstrates resolving a service alias and fetching its corresponding Discovery Document asynchronously. ```rust use google_workspace::discovery::fetch_discovery_document; use google_workspace::services::resolve_service; #[tokio::main] async fn main() -> anyhow::Result<()> { let (api, version) = resolve_service("drive").unwrap(); let doc = fetch_discovery_document(api, version, None).await?; println!("{} {} — {} resources", doc.name, doc.version, doc.resources.len(), ); Ok(()) } ``` -------------------------------- ### Create Google Calendar Event with Attendees Source: https://context7.com/googleworkspace/cli/llms.txt Create a Google Calendar event that includes specified attendees by listing them with the --attendee flag. ```bash # Create event with attendees gws calendar +insert \ --summary 'Project Review' \ --start '2024-06-17T14:00:00-07:00' \ --end '2024-06-17T15:00:00-07:00' \ --attendee alice@example.com \ --attendee bob@example.com ```