GDocsVFS exposes Google Docs as .gdoc.json files. Reads return the document’s structured content.
Setup steps for OAuth credentials live at Google Workspace Credentials.
Node
Browser
examples/browser/vfs/gdocs/gdocs_pkce.ts.
Config
Fields marked secret are redacted in snapshots.
Mount mode
read. A MountMode.WRITE mount also allows mv (retitle) and rm (delete). Append text with the gws CLI.
For the JSON shape see the Python Google Docs docs.
VFS.md
The VFS.md an agent reads with Google Docs mounted at/<path>.
- Rendered
- Raw
Virtual Filesystem
VFS Layout
/<path>
<YYYY-MM-DD>is the file’smodifiedTime, so a date glob such as2026-05-*narrows by it.<title>is sanitized: spaces and any character outside[A-Za-z0-9_.-]become_, at most 100 characters.<doc-id>is the Google Docs document id.shared/holds docs shared with you by others; ones you own and shared with others are still inowned/.
.gdoc.json holds the Google Docs API documents.get response, read
with includeTabsContent=true so every tab is present:.body, .documentStyle, .namedStyles) empty and hangs every
tab’s content off .tabs[].documentTab instead. Tabs also nest, so text
can sit at any depth under .childTabs; the recursive recipes below read
a one-tab and a fifty-tab document alike.Useful jq paths:sectionBreak, which carries no
.paragraph, so a path through .paragraph needs the ? or it fails
with Cannot iterate over null.Delete, on a write path:.gdoc.json files can be removed; owned/ and shared/ cannot.Rename to a new title, on a write path:_); any other name is refused.Supported Unix Commands for VFS
Unix commands work on each path as on a local filesystem, as far as the path supports them:Limitations of Unix Commands for VFS
Where a path differs from a local filesystem:Run
man <cmd> or <cmd> --help for one command’s usage.Integration
What Google Docs answers through its own API, so fewer files are read. Integration explains each command.
The Python Google Docs docs list when each search answers and what it can miss.