bygoogleworkspace· 58 skills
Read and write Google Docs.
$npx -y skills add googleworkspace/cli --skill gws-docsInstalls into the current project.
Run `npx skills use "https://github.com/googleworkspace/cli" --skill "googleworkspace/cli/gws-docs"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/googleworkspace/cli" that are relevant to the current task. Run `npx skills add "https://github.com/googleworkspace/cli"` and select the relevant skills, then follow their instructions.
| 1 | # docs (v1) |
| 2 | |
| 3 | > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. |
| 4 | |
| 5 | ```bash |
| 6 | gws docs <resource> <method> [flags] |
| 7 | ``` |
| 8 | |
| 9 | ## Helper Commands |
| 10 | |
| 11 | | Command | Description | |
| 12 | |---------|-------------| |
| 13 | | [`+write`](../gws-docs-write/SKILL.md) | Append text to a document | |
| 14 | |
| 15 | ## API Resources |
| 16 | |
| 17 | ### documents |
| 18 | |
| 19 | - `batchUpdate` — Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. |
| 20 | - `create` — Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document. |
| 21 | - `get` — Gets the latest version of the specified document. |
| 22 | |
| 23 | ## Discovering Commands |
| 24 | |
| 25 | Before calling any API method, inspect it: |
| 26 | |
| 27 | ```bash |
| 28 | # Browse resources and methods |
| 29 | gws docs --help |
| 30 | |
| 31 | # Inspect a method's required params, types, and defaults |
| 32 | gws schema docs.<resource>.<method> |
| 33 | ``` |
| 34 | |
| 35 | Use `gws schema` output to build your `--params` and `--json` flags. |