Google Workspace CLI (gws)

SkillFiles & storage

Manage Google Workspace via the gws CLI — Drive, Gmail, Sheets, Docs, Slides, People, Chat, Meet, Forms, and cross-service workflows. Use when asked to send email, read/write spreadsheets, upload files to Drive, manage contacts, create presentations, send Chat messages, create docs, or any Google Workspace operation. Also triggers on "gws", "Google Drive", "Google Sheets", "Gmail", "Google Docs", "Google Slides", "Google Chat", "Google Meet", "Google Forms", "check my inbox", "upload to Drive", "read spreadsheet", "send an email", "create a doc", "send a chat message", "create a presentation".

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Google Workspace CLI (gws) skill

What this skill tells your AI

The instructions your AI receives, as published by espennilsen/pi in skills/google-workspace/SKILL.md and read by ahel’s review.

Interact with Google Workspace services via the gws CLI. This skill covers all supported services, helper shortcuts, cross-service workflows, role-based personas, and multi-step recipes.

Installation & Auth

The gws binary must be on $PATH. Version: 0.16.0+.

# Browser-based OAuth (interactive)
gws auth login

# Service Account
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json

# Check status
gws auth status

Auth Flags

FlagDescription
--readonlyRequest read-only scopes
--fullRequest all scopes incl. pubsub + cloud-platform
--scopesComma-separated custom scopes
-s, --servicesLimit scope picker to specific services (e.g. -s drive,gmail)

CLI Syntax

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

Global Flags

FlagDescription
--format <FMT>Output format: json (default), table, yaml, csv
--dry-runValidate locally without calling the API
--sanitize <TEMPLATE>Screen responses through Model Armor
--params '{"key": "val"}'URL/query parameters
--json '{"key": "val"}'Request body
-o, --output <PATH>Save binary responses to file
--upload <PATH>Upload file content (multipart)
--page-allAuto-paginate (NDJSON output)
--page-limit <N>Max pages with --page-all (default: 10)
--page-delay <MS>Delay between pages in ms (default: 100)

Discovering Commands

gws <service> --help                    # Browse resources and methods
gws schema <service.resource.method>    # Inspect params, types, defaults

Shell Tips

  • zsh ! expansion: Use double quotes for sheet ranges: --range "Sheet1!A1:D10"
  • JSON with double quotes: Wrap --params/--json in single quotes: --params '{"pageSize": 5}'

Security Rules

  • Never output secrets (API keys, tokens) directly
  • Always confirm with user before executing write/delete commands
  • Prefer --dry-run for destructive operations
  • Use --sanitize for PII/content safety screening

Services

Core Google Workspace API skills. Read the reference file for full resource/method details.

ServiceDescriptionReference
DriveManage files, folders, shared drivesreferences/gws-drive.md
SheetsRead and write spreadsheetsreferences/gws-sheets.md
GmailSend, read, and manage emailreferences/gws-gmail.md
DocsRead and write Google Docsreferences/gws-docs.md
SlidesRead and write presentationsreferences/gws-slides.md
PeopleManage contacts and profilesreferences/gws-people.md
ChatManage Chat spaces and messagesreferences/gws-chat.md
MeetManage Google Meet conferencesreferences/gws-meet.md
FormsRead and write Google Formsreferences/gws-forms.md
Admin ReportsAudit logs and usage reportsreferences/gws-admin-reports.md
EventsSubscribe to Workspace eventsreferences/gws-events.md
KeepManage Google Keep notesreferences/gws-keep.md
ClassroomManage courses, students, and invitationsreferences/gws-classroom.md
Model ArmorFilter content for safetyreferences/gws-modelarmor.md
WorkflowCross-service productivity workflowsreferences/gws-workflow.md

Helper Shortcuts

Quick commands for common operations. Read the reference file for flags and examples.

Drive

CommandReference
gws drive +upload <file>references/gws-drive-upload.md

Sheets

CommandReference
gws sheets +read --spreadsheet ID --range RANGEreferences/gws-sheets-read.md
gws sheets +append --spreadsheet ID --values '...'references/gws-sheets-append.md

Gmail

CommandReference
gws gmail +send --to EMAIL --subject S --body Breferences/gws-gmail-send.md
gws gmail +triagereferences/gws-gmail-triage.md
gws gmail +reply --message-id ID --body TEXTreferences/gws-gmail-reply.md
gws gmail +reply-all --message-id ID --body TEXTreferences/gws-gmail-reply-all.md
gws gmail +forward --message-id ID --to EMAILreferences/gws-gmail-forward.md
gws gmail +watchreferences/gws-gmail-watch.md

Docs

CommandReference
gws docs +write --document ID --text TEXTreferences/gws-docs-write.md

Chat

CommandReference
gws chat +send --space NAME --text TEXTreferences/gws-chat-send.md

Events

CommandReference
gws events +subscribereferences/gws-events-subscribe.md
gws events +renewreferences/gws-events-renew.md

Model Armor

CommandReference
gws modelarmor +sanitize-prompt --template NAMEreferences/gws-modelarmor-sanitize-prompt.md
gws modelarmor +sanitize-response --template NAMEreferences/gws-modelarmor-sanitize-response.md
gws modelarmor +create-template --project P --location L --template-id IDreferences/gws-modelarmor-create-template.md

Workflow

CommandReference
gws workflow +standup-reportreferences/gws-workflow-standup-report.md
gws workflow +meeting-prepreferences/gws-workflow-meeting-prep.md
gws workflow +email-to-task --message-id IDreferences/gws-workflow-email-to-task.md
gws workflow +weekly-digestreferences/gws-workflow-weekly-digest.md
gws workflow +file-announce --file-id ID --space SPACEreferences/gws-workflow-file-announce.md

Personas

Role-based skill bundles for common workflows. Read the reference for instructions.

PersonaDescriptionReference
Executive AssistantSchedule, inbox, and communicationsreferences/persona-exec-assistant.md
Project ManagerTasks, meetings, and doc sharingreferences/persona-project-manager.md
Team LeadStandups, coordination, and commsreferences/persona-team-lead.md
Sales OperationsDeal tracking, calls, client commsreferences/persona-sales-ops.md
Content CreatorCreate, organize, distribute contentreferences/persona-content-creator.md
Event CoordinatorScheduling, invitations, logisticsreferences/persona-event-coordinator.md
Customer SupportTickets, responses, escalationreferences/persona-customer-support.md
HR CoordinatorOnboarding, announcements, commsreferences/persona-hr-coordinator.md
IT AdministratorSecurity monitoring, configurationreferences/persona-it-admin.md
ResearcherReferences, notes, collaborationreferences/persona-researcher.md

Recipes

Multi-step task sequences with real commands. Read the reference for step-by-step instructions.

Gmail Recipes

RecipeReference
Label and archive emailsreferences/recipe-label-and-archive-emails.md
Create Gmail filterreferences/recipe-create-gmail-filter.md
Forward labeled emailsreferences/recipe-forward-labeled-emails.md
Set vacation responderreferences/recipe-create-vacation-responder.md
Save email attachments to Drivereferences/recipe-save-email-attachments.md
Save email to Google Docreferences/recipe-save-email-to-doc.md
Draft email from Docreferences/recipe-draft-email-from-doc.md

Drive Recipes

RecipeReference
Organize Drive folderreferences/recipe-organize-drive-folder.md
Share folder with teamreferences/recipe-share-folder-with-team.md
Email a Drive linkreferences/recipe-email-drive-link.md
Bulk download folderreferences/recipe-bulk-download-folder.md
Find large filesreferences/recipe-find-large-files.md
Create shared drivereferences/recipe-create-shared-drive.md
Watch Drive changesreferences/recipe-watch-drive-changes.md

Sheets Recipes

RecipeReference
Create expense trackerreferences/recipe-create-expense-tracker.md
Copy sheet for new monthreferences/recipe-copy-sheet-for-new-month.md
Log deal updatereferences/recipe-log-deal-update.md
Compare sheet tabsreferences/recipe-compare-sheet-tabs.md
Backup sheet as CSVreferences/recipe-backup-sheet-as-csv.md
Sync contacts to sheetreferences/recipe-sync-contacts-to-sheet.md
Generate report from sheetreferences/recipe-generate-report-from-sheet.md

Cross-Service Recipes

RecipeReference
Create doc from templatereferences/recipe-create-doc-from-template.md
Share doc and notifyreferences/recipe-share-doc-and-notify.md
Send team announcementreferences/recipe-send-team-announcement.md
Create feedback formreferences/recipe-create-feedback-form.md
Create Meet spacereferences/recipe-create-meet-space.md
Review Meet participantsreferences/recipe-review-meet-participants.md
Create presentationreferences/recipe-create-presentation.md
Collect form responsesreferences/recipe-collect-form-responses.md
Create classroom coursereferences/recipe-create-classroom-course.md

Exit Codes

CodeMeaning
0Success
1API error — Google returned an error response
2Auth error — credentials missing or invalid
3Validation — bad arguments or input
4Discovery — could not fetch API schema
5Internal — unexpected failure

Community & Feedback

Signals

GitHub stars
119
Forks
13
Last commit
Sep 2026

ahel review

  • S4info
    community integration — published by espennilsen, not google

Automated review, not a security audit. Ruleset v1.

Advanced
Catalog kind
skill
Gateway key
google-workspace-espennilsen
Source
github.com/espennilsen/pi