gws), with selected API methods and helpers for mail, spreadsheet ranges and document text.
Setup
Use Google Workspace setup to obtain OAuth credentials and the scopes needed by each service.SKILL.md
The SKILL.md an agent reads withgws installed.
- Rendered
- Raw
Available commandsThese commands are registered with this shell;
--help after a command or subcommand shows its usage.gwsSupported commands
Rungws <command> --help for the supported flags and operands.
This list is generated from Mirage’s registered command tree.
Usage
Call an API method
gws SERVICE RESOURCE METHOD. --params supplies URL path and
query parameters; --json supplies the body. Methods return the API response
as compact JSON. Lists follow nextPageToken by default and print multiple
pages as NDJSON. Use --page-limit N to stop early. Export methods can return
raw bytes instead of JSON.
The supported methods are the registered subset above, not every method in
Google’s Discovery documents.
Use helpers
+ prefix: use gws docs write, not
gws docs +write. --tab is Mirage’s addition for document tabs.
Choose a document tab
gws docs documents get --params '{"documentId":"DOC_ID"}' returns the
legacy body of the first tab. Add "includeTabsContent":true to receive
tabs[].documentTab, including nested childTabs, instead of that flat body.
Mounted .gdoc.json files always use the tab-aware shape.
docs write appends to the first tab unless --tab selects another one.
A raw batchUpdate follows the API’s defaults: replaceAllText without a
tab restriction can affect every tab.
Behavior
The CLI can shareGoogleConfig with Google’s VFS adapters. Each registration
owns its config and requires no mount. Setting folder_id (folderId in
TypeScript) changes creation placement, not which files the CLI may read:
- Drive
files createandcopydefaultparentsto that folder. - An explicit
parentsarray wins, including an empty array. - Docs, Sheets and Slides creation is followed by a Drive move into the folder. These are separate requests, so a failed move can leave the new file created.
- Injected placement requests include Shared Drive support.
--page-all.
Parser refusals use Mirage’s declared command style, so upstream exit codes
and diagnostics are not a blanket compatibility promise.
License
See compatibility and licenses.