Setup
Start a local server (redis-server listens on redis://localhost:6379/0,
the default) or use a managed one. For Redis Cloud, the endpoint is in the
database’s Configuration tab and the password of the default user under
Security (Pro) or Default user > Configure (Essentials). Use
rediss:// when the server needs TLS.
pip install "mirage-ai[redis]"; Node needs the redis@^5 peer
dependency (pnpm add @struktoai/mirage-node redis).
Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- The tree is whatever commands write. Each file is a
<prefix>file:<path>key; a differentkey_prefixkeeps a workspace apart from other data. - Runs in Python, Node and Cloudflare Workers over the Redis protocol.
- A browser has no socket, so it mounts Redis through the Upstash REST API; see browser Redis setup.
Sample runs
write mount. Add capacity: 100MB
under config to cap the bytes the files hold; see
capacity.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.