Skip to main content
GoogleDriveVFS exposes a user’s Drive (My Drive plus shared drives the user can see) as a tree. Setup steps for OAuth credentials live at Google Workspace Credentials.

Node

Browser

The browser examples in examples/browser/vfs/gdrive/gdrive_pkce.ts show a full PKCE flow that keeps the secret out of the page.

Config

Fields marked secret are redacted in snapshots.

Mount mode

read, write and exec. Under write mode the standard write commands (tee, cp, mv, rm, mkdir, sed -i, …) work on regular files and folders; Google-native files (.gdoc.json, .gsheet.json, .gslide.json) are mutated through the gws commands instead. Use MountMode.EXEC if python3 or js should run scripts from the mount. A Shared Drive is writable on the same terms as My Drive: every Drive call carries supportsAllDrives, so what you may change is decided by your role on that drive rather than by the mount, and a role that forbids the change fails with EACCES on that operand.

VFS.md

The VFS.md an agent reads with Google Drive mounted at /<path>.

Virtual Filesystem

VFS Layout

/<path>
  • There is no owned/ and shared/ split: this is your full Drive view, including files shared with you that were added to My Drive.
  • This is a remote mount: prefer targeted reads over full scans. A date-prefixed glob (2026-05-*) becomes a Drive modifiedTime range query.
  • To act on Drive items by id (create, update, export, permissions), use the gws CLI if installed (gws drive --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 Google Drive answers through its own API, so fewer files are read. Integration explains each command. The Python Google Drive docs list when each search answers and what it can miss.