$npx -y skills add googleworkspace/cli --skill gws-docs-writeGoogle Docs: Append text to a document.
| 1 | # docs +write |
| 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 | Append text to a document |
| 6 | |
| 7 | ## Usage |
| 8 | |
| 9 | ```bash |
| 10 | gws docs +write --document <ID> --text <TEXT> |
| 11 | ``` |
| 12 | |
| 13 | ## Flags |
| 14 | |
| 15 | | Flag | Required | Default | Description | |
| 16 | |------|----------|---------|-------------| |
| 17 | | `--document` | ✓ | — | Document ID | |
| 18 | | `--text` | ✓ | — | Text to append (plain text) | |
| 19 | |
| 20 | ## Examples |
| 21 | |
| 22 | ```bash |
| 23 | gws docs +write --document DOC_ID --text 'Hello, world!' |
| 24 | ``` |
| 25 | |
| 26 | ## Tips |
| 27 | |
| 28 | - Text is inserted at the end of the document body. |
| 29 | - For rich formatting, use the raw batchUpdate API instead. |
| 30 | |
| 31 | > [!CAUTION] |
| 32 | > This is a **write** command — confirm with the user before executing. |
| 33 | |
| 34 | ## See Also |
| 35 | |
| 36 | - [gws-shared](../gws-shared/SKILL.md) — Global flags and auth |
| 37 | - [gws-docs](../gws-docs/SKILL.md) — All read and write google docs commands |