GmailVFS browses labels, messages, and attachments via the Gmail API.
Both runtimes share the same OAuth config: a Google Cloud clientId / clientSecret plus a long-lived refreshToken for the user. Setup steps live at Google Workspace Credentials.
Node
Browser
Config
Fields marked secret are redacted in snapshots.
VFS.md
The VFS.md an agent reads with Gmail mounted at/<path>.
- Rendered
- Raw
Virtual Filesystem
VFS Layout
/<path>
<label>is a Gmail label:INBOX,SENT,DRAFT,IMPORTANT,STARRED,TRASH,SPAMor any user label.<yyyy-mm-dd>is the date the message was received. Listing one (ls /<path>/INBOX/2026-05-03/) pushesafter:/before:into the Gmail query, much cheaper than scanning the whole label.<subject>is sanitized:lsthe date directory rather than construct it.<message-id>is the Gmail message id.- The email body is in the
.gmail.jsonfile; read it withcat,headorjq, keeping the suffix. The sibling directory, the same name without the extension, holds attachments only:catone to download its bytes.grep -rover a date directory skips these binary files. - A
greporrghit names the.gmail.jsonfile, not the attachments directory. To list a message’s attachments,lsits path with.gmail.jsonstripped;ENOENTmeans it has none:ls /<path>/INBOX/2026-05-03/<subject>__<message-id>/
.gmail.json is processed by Mirage, not the raw Gmail API response:jq paths:gws
CLI if installed (gws gmail --help).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 Gmail answers through its own API, so fewer files are read. Integration explains each command.
The Python Gmail docs list when each search answers and what it can miss.
Mount mode
read.
For the mounted layout (labels, dates, attachments) see the Python Gmail docs.