Skip to main content
RAMVFS keeps files in process memory, for scratch work, tests and trying Mirage. The mount starts empty and its files are gone when the process exits. It needs no service and no credentials; see the RAM page.

Install

Configure

new RAMVFS() takes no config. new RAMVFS({ capacity: '100MB' }) caps the bytes the store holds; a write past it fails with “Disk quota exceeded”. See capacity.

Layout

The mount starts empty. Files and folders exist once a command such as touch, mkdir, tee or cp writes them. The root / always exists.

Browser

@struktoai/mirage-browser exports the same RAMVFS, with the same options.

Integration

RAM answers these commands from its own tree, so fewer files are read. See Integration.
  • find: one recursive listing.
  • du: one recursive listing.
  • ls -R and tree: one recursive listing.

VFS.md

The VFS.md an agent reads with RAM mounted at /<path>. <mode> is the mount’s mode: read, write or exec. The commands shown are those of a write mount.
Virtual FilesystemSupported Unix Commands for VFSUnix commands work on each path as on a local filesystem, as far as the path supports them:Limitations of Unix Commands for VFSWhere a path differs from a local filesystem:Run man <cmd> or <cmd> --help for one command’s usage.