/gws:gws-drivefrom gws
Provides CLI commands for Google Drive operations via gws: list, search, upload, download, manage files/folders, permissions, approvals, revisions, comments, and shared drives.
Ships in gws. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
gws drive provides CLI access to Google Drive with structured JSON output.
Disclaimer:
gwsis not the official Google CLI. This is an independent, open-source project not endorsed by or affiliated with Google.
Before executing any gws command, verify the CLI is installed:
gws version
If not found, install: go install github.com/omriariav/workspace-cli/cmd/gws@latest
Requires OAuth2 credentials. Run gws auth status to check.
If not authenticated: gws auth login (opens browser for OAuth consent).
For initial setup, see the gws-auth skill.
| Task | Command |
|---|---|
| List files | gws drive list |
| List files in folder | gws drive list --folder <folder-id> |
| Search files | gws drive search "quarterly report" |
| Get file info | gws drive info <file-id> |
| Download a file | gws drive download <file-id> |
| Upload a file | gws drive upload report.pdf |
| Create a folder | gws drive create-folder --name "Project Files" |
| Move a file | gws drive move <file-id> --to <folder-id> |
| Delete a file | gws drive delete <file-id> |
| Copy a file | gws drive copy <file-id> |
| Convert Office file | gws drive convert <file-id> |
| Export file | gws drive export --file-id <id> --mime-type application/pdf --output report.pdf |
| Update metadata | gws drive update --file-id <id> --name "New Name" |
| Empty trash | gws drive empty-trash |
| Drive info | gws drive about |
| Recent changes | gws drive changes |
| Task | Command |
|---|---|
| List permissions | gws drive permissions --file-id <id> |
| Share with user | gws drive share --file-id <id> --type user --role writer --email [email protected] |
| Share with anyone | gws drive share --file-id <id> --type anyone --role reader |
| Get permission | gws drive permission --file-id <id> --permission-id <perm-id> |
| Update permission | gws drive update-permission --file-id <id> --permission-id <perm-id> --role reader |
| Remove permission | gws drive unshare --file-id <id> --permission-id <perm-id> |
| Task | Command |
|---|---|
| List comments | gws drive comments <file-id> |
| Get comment | gws drive comment --file-id <id> --comment-id <cid> |
| Add comment | gws drive add-comment --file-id <id> --content "Great work!" |
| Delete comment | gws drive delete-comment --file-id <id> --comment-id <cid> |
| Resolve comment | gws drive resolve-comment --file-id <id> --comment-id <cid> |
| Unresolve comment | gws drive unresolve-comment --file-id <id> --comment-id <cid> |
| List replies | gws drive replies --file-id <id> --comment-id <cid> |
| Reply to comment | gws drive reply --file-id <id> --comment-id <cid> --content "Thanks!" |
| Get reply | gws drive get-reply --file-id <id> --comment-id <cid> --reply-id <rid> |
| Delete reply | gws drive delete-reply --file-id <id> --comment-id <cid> --reply-id <rid> |
| Task | Command |
|---|---|
| List approvals | gws drive approvals <file-id> |
| Get approval | gws drive approval <file-id> <approval-id> |
| Start approval | gws drive start-approval --file-id <id> --reviewers [email protected] |
| Approve | gws drive approve --file-id <id> --approval-id <approval-id> |
| Decline | gws drive decline --file-id <id> --approval-id <approval-id> |
| Reassign reviewers | gws drive reassign-approval --file-id <id> --approval-id <approval-id> --add-reviewer [email protected] |
| Cancel approval | gws drive cancel-approval --file-id <id> --approval-id <approval-id> |
| Comment on approval | gws drive comment-approval --file-id <id> --approval-id <approval-id> --message "Looks good" |
| Task | Command |
|---|---|
| List revisions | gws drive revisions --file-id <id> |
| Get revision | gws drive revision --file-id <id> --revision-id <rid> |
| Delete revision | gws drive delete-revision --file-id <id> --revision-id <rid> |
| Task | Command |
|---|---|
| List shared drives | gws drive shared-drives |
| Get shared drive | gws drive shared-drive --id <drive-id> |
| Create shared drive | gws drive create-drive --name "Engineering" |
| Update shared drive | gws drive update-drive --id <drive-id> --name "New Name" |
| Delete shared drive | gws drive delete-drive --id <drive-id> |
gws drive list [flags]
Flags:
--folder string — Folder ID to list (default: "root")--max int — Maximum number of files (default 50)--order string — Sort order (default: "modifiedTime desc")Examples:
gws drive list
gws drive list --folder 1abc123xyz --max 20
gws drive list --order "name"
gws drive search <query> [flags]
Flags:
--max int — Maximum number of results (default 50)--raw — Treat query as raw V3 query syntaxExamples:
gws drive search "quarterly report"
gws drive search "budget 2024" --max 10
gws drive search "mimeType='application/pdf' and trashed=false" --raw
gws drive info <file-id>
Gets detailed information about a file including name, type, size, owners, and permissions.
gws drive download <file-id> [flags]
Flags:
--output string — Output file path (default: original filename)Examples:
gws drive download 1abc123xyz
gws drive download 1abc123xyz --output ./local-copy.pdf
gws drive upload <local-file> [flags]
Flags:
--folder string — Parent folder ID (default: root)--name string — File name in Drive (default: local filename)--mime-type string — MIME type (auto-detected if not specified)gws drive create-folder --name <name> [flags]
Flags:
--name string — Folder name (required)--parent string — Parent folder ID (default: root)gws drive move <file-id> --to <folder-id>
gws drive delete <file-id> [flags]
By default, moves to trash. Use --permanent to permanently delete.
gws drive copy <file-id> [flags]
Flags:
--name string — Name for the copy--folder string — Destination folder IDgws drive convert <file-id> [flags]
Converts DOCX/XLSX/PPTX to native Google Docs/Sheets/Slides. Creates a new file (does not modify the original). Target format is auto-detected from source MIME type.
Flags:
--name string — Name for the converted file (default: original name)--folder string — Destination folder ID--to string — Target format: docs, sheets, slides (auto-detected if omitted)gws drive export --file-id <id> --mime-type <mime> --output <path>
Exports Docs, Sheets, Slides to formats like PDF, CSV, DOCX, etc.
Flags:
--file-id string — File ID (required)--mime-type string — Export MIME type (required, e.g. application/pdf, text/csv)--output string — Output file path (required)gws drive update --file-id <id> [flags]
Flags:
--file-id string — File ID (required)--name string — New file name--description string — New description--starred — Star or unstar the file--trashed — Trash or untrash the filegws drive empty-trash
Permanently deletes all files in the trash. Cannot be undone.
gws drive about
Returns user info and storage quota (limit, usage, usage in Drive, usage in trash).
gws drive changes [flags]
Polling pattern: the first call (without --page-token) fetches the current start token
and typically returns zero results. Save the returned new_start_page_token and pass it
in subsequent calls to detect new changes.
Flags:
--max int — Maximum number of changes (default 100)--page-token string — Page token from a previous call (auto-fetches start token if empty)gws drive permissions --file-id <id>
gws drive share --file-id <id> --type <type> --role <role> [flags]
Flags:
--file-id string — File ID (required)--type string — Permission type: user, group, domain, anyone (required)--role string — Role: reader, commenter, writer, organizer, owner (required)--email string — Email address (for user/group type)--domain string — Domain (for domain type)--send-notification — Send notification email (default: true)gws drive unshare --file-id <id> --permission-id <perm-id>
gws drive permission --file-id <id> --permission-id <perm-id>
gws drive update-permission --file-id <id> --permission-id <perm-id> --role <role>
gws drive comments <file-id> [flags]
Flags:
--max int — Maximum number of comments (default 100)--include-resolved — Include resolved comments--include-deleted — Include deleted commentsgws drive comment --file-id <id> --comment-id <cid>
gws drive add-comment --file-id <id> --content "comment text"
gws drive add-comment --file-id <id> --content "Fix this" --quoted-text "the text to anchor to"
Flags:
--file-id string — File ID (required)--content string — Comment content (required)--quoted-text string — Anchor comment to this quoted text in the documentgws drive delete-comment --file-id <id> --comment-id <cid>
Posts a reply with action=resolve (the documented Drive API path for state
transitions). The original comment content is never modified. Pass an
optional --content to attach a closing note.
gws drive resolve-comment --file-id <id> --comment-id <cid>
gws drive resolve-comment --file-id <id> --comment-id <cid> --content "fixed in #1234"
Posts a reply with action=reopen. The original comment content is never
modified. Pass an optional --content to attach a reopening note.
gws drive unresolve-comment --file-id <id> --comment-id <cid>
gws drive unresolve-comment --file-id <id> --comment-id <cid> --content "still broken on safari"
gws drive replies --file-id <id> --comment-id <cid>
gws drive reply --file-id <id> --comment-id <cid> --content "reply text"
gws drive get-reply --file-id <id> --comment-id <cid> --reply-id <rid>
gws drive delete-reply --file-id <id> --comment-id <cid> --reply-id <rid>
gws drive approvals <file-id> [flags]
Flags:
--max int — Maximum number of approvals (default 100)gws drive approval <file-id> <approval-id>
gws drive start-approval --file-id <id> --reviewers [email protected] [flags]
Flags:
--file-id string — File ID (required)--reviewers string — Comma-separated reviewer email addresses (required)--due-time string — Approval due time (RFC3339)--message string — Message to send to reviewers--lock-file — Lock the file while approval is in progressgws drive approve --file-id <id> --approval-id <approval-id> [--message "Approved"]
gws drive decline --file-id <id> --approval-id <approval-id> [--message "Needs changes"]
gws drive reassign-approval --file-id <id> --approval-id <approval-id> --add-reviewer [email protected]
gws drive reassign-approval --file-id <id> --approval-id <approval-id> --replace-reviewer [email protected][email protected]
Flags:
--add-reviewer string — Comma-separated reviewer emails to add--replace-reviewer string — Comma-separated replacements in [email protected][email protected] form--message string — Message to send to reviewersgws drive cancel-approval --file-id <id> --approval-id <approval-id> [--message "Cancelling"]
gws drive comment-approval --file-id <id> --approval-id <approval-id> --message "Please review"
gws drive revisions --file-id <id>
gws drive revision --file-id <id> --revision-id <rid>
gws drive delete-revision --file-id <id> --revision-id <rid>
gws drive shared-drives [flags]
Flags:
--max int — Maximum number of drives (default 100)--query string — Search querygws drive shared-drive --id <drive-id>
gws drive create-drive --name "Drive Name"
gws drive update-drive --id <drive-id> --name "New Name"
gws drive delete-drive --id <drive-id>
gws drive list --format json # Structured JSON (default)
gws drive list --format yaml # YAML format
gws drive list --format text # Human-readable text
To receive push notifications when Drive files change (baseline file and
permission events on a file or shared drive, delivered to an existing
Pub/Sub topic), use the Workspace Events API via the gws-events skill
(gws events subscriptions create --target //drive.googleapis.com/files/FILE ...).
For on-demand history, gws drive changes and gws drive activity remain
the polling options.
--format json (the default) for programmatic parsinggws drive search to find files by name, then gws drive info <id> for details--permanent only when explicitly requestedcomments command works on any Drive file type (Docs, Sheets, Slides, etc.)--include-resolved to see themgws drive about to check storage quota before large uploadsgws drive changes to monitor recent file activity--type anyone --role reader for public accessapplication/pdf, text/csv, application/vnd.openxmlformats-officedocument.wordprocessingml.documentWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
google-drive, gws-cli, file-management, drive-permissions, cloud-storage
Other plugins' skills for the same job
16 skills in this plugin
/gws-authGoogle Workspace CLI authentication setup and management. Use when users need to set up OAuth credentials, authenticate with Google APIs, or troubleshoot authentication issues. Triggers: gws auth, google workspace setup, oauth, credentials, client id, api setup./gws-calendarGoogle Calendar CLI operations via gws. Use when users need to list calendars, view events, create/update/delete events, RSVP to invitations, manage calendar CRUD, subscriptions, ACL, free/busy queries, colors, and settings. Triggers: calendar, events, meetings, schedule, rsvp, invite, share, freebusy./gws-chatGoogle Chat CLI operations via gws. Use when users need to list/create/manage chat spaces, read/send messages, manage members, track read state, handle attachments, or monitor space events. Triggers: google chat, gchat, chat spaces, chat messages./gws-contactsGoogle Contacts CLI operations via gws. Use when users need to list, search, view, create, or delete contacts. Triggers: contacts, google contacts, people api, contact management./gws-docsGoogle Docs CLI operations via gws. Use when users need to read, create, or edit Google Docs documents. Triggers: google docs, document, gdoc, word processing./gws-eventsGoogle Workspace Events API operations via gws. Use when users need to create or manage event subscriptions for Chat, Drive, or Meet resources (Pub/Sub delivery), renew or reactivate subscriptions, or decode Pub/Sub CloudEvent notifications. Triggers: workspace events, event subscription, subscribe to chat events, drive events, meet events, pubsub notifications, cloudevent.npx claudepluginhub omriariav/workspace-cli --plugin gws