install
source · Clone the upstream repo
git clone https://github.com/googleworkspace/cli
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/googleworkspace/cli "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/gws-drive" ~/.claude/skills/googleworkspace-cli-gws-drive && rm -rf "$T"
manifest:
skills/gws-drive/SKILL.mdsource content
drive (v3)
PREREQUISITE: Read
for auth, global flags, and security rules. If missing, run../gws-shared/SKILL.mdto create it.gws generate-skills
gws drive <resource> <method> [flags]
Helper Commands
| Command | Description |
|---|---|
| Upload a file with automatic metadata |
API Resources
about
— Gets information about the user, the user's Drive, and system capabilities. For more information, see Return user info. Required: Theget
parameter must be set. To return the exact fields you need, see Return specific fields.fields
accessproposals
— Retrieves an access proposal by ID. For more information, see Manage pending access proposals.get
— List the access proposals on a file. For more information, see Manage pending access proposals. Note: Only approvers are able to list access proposals on a file. If the user isn't an approver, a 403 error is returned.list
— Approves or denies an access proposal. For more information, see Manage pending access proposals.resolve
approvals
— Gets an Approval by ID.get
— Lists the Approvals on a file.list
apps
— Gets a specific app. For more information, see Return user info.get
— Lists a user's installed apps. For more information, see Return user info.list
changes
— Gets the starting pageToken for listing future changes. For more information, see Retrieve changes.getStartPageToken
— Lists the changes for a user or shared drive. For more information, see Retrieve changes.list
— Subscribes to changes for a user. For more information, see Notifications for resource changes.watch
channels
— Stops watching resources through this channel. For more information, see Notifications for resource changes.stop
comments
— Creates a comment on a file. For more information, see Manage comments and replies. Required: Thecreate
parameter must be set. To return the exact fields you need, see Return specific fields.fields
— Deletes a comment. For more information, see Manage comments and replies.delete
— Gets a comment by ID. For more information, see Manage comments and replies. Required: Theget
parameter must be set. To return the exact fields you need, see Return specific fields.fields
— Lists a file's comments. For more information, see Manage comments and replies. Required: Thelist
parameter must be set. To return the exact fields you need, see Return specific fields.fields
— Updates a comment with patch semantics. For more information, see Manage comments and replies. Required: Theupdate
parameter must be set. To return the exact fields you need, see Return specific fields.fields
drives
— Creates a shared drive. For more information, see Manage shared drives.create
— Gets a shared drive's metadata by ID. For more information, see Manage shared drives.get
— Hides a shared drive from the default view. For more information, see Manage shared drives.hide
— Lists the user's shared drives. This method accepts thelist
parameter, which is a search query combining one or more search terms. For more information, see the Search for shared drives guide.q
— Restores a shared drive to the default view. For more information, see Manage shared drives.unhide
— Updates the metadata for a shared drive. For more information, see Manage shared drives.update
files
— Creates a copy of a file and applies any requested updates with patch semantics. For more information, see Create and manage files.copy
— Creates a file. For more information, see Create and manage files. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:create
(Specify a valid MIME type, rather than the literal*/*
value. The literal*/*
is only used to indicate that any valid MIME type can be uploaded.*/*
— Downloads the content of a file. For more information, see Download and export files. Operations are valid for 24 hours from the time of creation.download
— Exports a Google Workspace document to the requested MIME type and returns exported byte content. For more information, see Download and export files. Note that the exported content is limited to 10 MB.export
— Generates a set of file IDs which can be provided in create or copy requests. For more information, see Create and manage files.generateIds
— Gets a file's metadata or content by ID. For more information, see Search for files and folders. If you provide the URL parameterget
, then the response includes the file contents in the response body. Downloading content withalt=media
only works if the file is stored in Drive.alt=media
— Lists the user's files. For more information, see Search for files and folders. This method accepts thelist
parameter, which is a search query combining one or more search terms. This method returns all files by default, including trashed files. If you don't want trashed files to appear in the list, use theq
query parameter to remove trashed files from the results.trashed=false
— Lists the labels on a file. For more information, see List labels on a file.listLabels
— Modifies the set of labels applied to a file. For more information, see Set a label field on a file. Returns a list of the labels that were added or modified.modifyLabels
— Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such asupdate
. This method supports patch semantics. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:modifiedDate
(Specify a valid MIME type, rather than the literal*/*
value.*/*
— Subscribes to changes to a file. For more information, see Notifications for resource changes.watch
operations
— Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.get
permissions
— Creates a permission for a file or shared drive. For more information, see Share files, folders, and drives. Warning: Concurrent permissions operations on the same file aren't supported; only the last update is applied.create
— Deletes a permission. For more information, see Share files, folders, and drives. Warning: Concurrent permissions operations on the same file aren't supported; only the last update is applied.delete
— Gets a permission by ID. For more information, see Share files, folders, and drives.get
— Lists a file's or shared drive's permissions. For more information, see Share files, folders, and drives.list
— Updates a permission with patch semantics. For more information, see Share files, folders, and drives. Warning: Concurrent permissions operations on the same file aren't supported; only the last update is applied.update
replies
— Creates a reply to a comment. For more information, see Manage comments and replies.create
— Deletes a reply. For more information, see Manage comments and replies.delete
— Gets a reply by ID. For more information, see Manage comments and replies.get
— Lists a comment's replies. For more information, see Manage comments and replies.list
— Updates a reply with patch semantics. For more information, see Manage comments and replies.update
revisions
— Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. For more information, see Manage file revisions.delete
— Gets a revision's metadata or content by ID. For more information, see Manage file revisions.get
— Lists a file's revisions. For more information, see Manage file revisions. Important: The list of revisions returned by this method might be incomplete for files with a large revision history, including frequently edited Google Docs, Sheets, and Slides. Older revisions might be omitted from the response, meaning the first revision returned may not be the oldest existing revision.list
— Updates a revision with patch semantics. For more information, see Manage file revisions.update
teamdrives
— Deprecated: Usecreate
instead.drives.create
— Deprecated: Useget
instead.drives.get
— Deprecated: Uselist
instead.drives.list
— Deprecated: Useupdate
instead.drives.update
Discovering Commands
Before calling any API method, inspect it:
# Browse resources and methods gws drive --help # Inspect a method's required params, types, and defaults gws schema drive.<resource>.<method>
Use
gws schema output to build your --params and --json flags.