/gdocs/.
For Google OAuth setup, see Google Workspace Setup.
Config
Filesystem Layout
owned (documents you created) and shared
(documents shared with you). The filename shape is:
Cache
The Google Docs resource usesIndexCacheStore. Index entries store
document IDs and metadata. There is no separate content cache — file
content caching is handled by the workspace IOResult mechanism.
Example
examples/gdocs/gdocs.py for the full working example.
Shell Commands
Standard commands available on the mounted Google Docs tree:| Command | Notes |
|---|---|
ls | List owned/shared documents |
cat | Read document JSON |
head / tail | First/last N lines |
grep / rg | Pattern search |
jq | Query JSON fields |
wc | Line/word/byte counts |
stat | File metadata |
find | Recursive search |
tree | Directory tree view |
basename / dirname / realpath | Path utilities |
nl | Number lines |
gws-docs-documents-create
Create a new Google Docs document.
| Option | Required | Description |
|---|---|---|
--json | yes | JSON body with title field |
gws-docs-documents-batchUpdate
Batch update a document.
| Option | Required | Description |
|---|---|---|
--params | yes | JSON with documentId |
--json | yes | JSON with requests array |
gws-docs-write
Append text to a document.
| Option | Required | Description |
|---|---|---|
--document | yes | Google document ID |
--text | yes | Text to append |