gws --help.
Licenses: The upstream project uses
Apache-2.0; Mirage’s
independent implementation uses
Apache-2.0.
Install
clis: section; see the CLI overview.
Verbs
The syntax mirrors the upstream Google Workspace CLI: one passthrough leaf per Discovery method, plus hand-written helpers under each service.drive, sheets, docs, slides, gmail. The whole
surface is discoverable from the shell:
API passthrough
Passthrough commands call the corresponding API method directly:--params fills URL path and query parameters, --json is the request
body, and the output is the compact API response JSON. List methods
follow nextPageToken to the end by default (pages print as NDJSON);
--page-limit N stops early.
Folder scope
A config carryingfolder_id scopes what the CLI creates, so a file
it makes lands in the same folder a GDriveResource sharing that config
mounts, and the agent’s own ls shows what it just made:
- Two divergences from the official CLI’s passthrough.
drive files createandcopygetparentsdefaulted into the request body, and the Docs/Sheets/Slidescreatemethods have noparentsfield at all, so mirage issues a second Drive call to move the new file. Both also sendsupportsAllDrives, which is what lets a scope name a Shared Drive folder. - An explicit
parentsarray always wins, and then nothing is injected into the query either: you typed the call, you own it. The key being present is what counts, so"parents": []is honored too rather than read as absent. - Reads are not scoped.
gws drive files liststill sees the whole account. The scope is about where new files go, not a fence.