Install
mirage and mirage-bash. Install Claude Code separately.
Shell
mirage-bash takes the place of bash, so every command Claude Code’s Bash tool runs goes to a workspace session.
Mount the project and /tmp at their own paths, beside your data:
workspace.yaml
- The project mount gives Claude’s Bash and its own Read and Edit tools the same files at the same paths.
- Claude Code keeps its working directory in
/tmpbetween commands, socdcarries over.
command -v mirage-bash prints:
.claude/settings.json
claude in the project. For one run instead:
Session and profile
Commands run as the workspace’s default session. To run them under a profile, define it in the workspace:workspace.yaml
.claude/settings.json
- Each command runs in a copy of the session, from Claude’s working directory.
cdcarries over, since Claude Code tracks it;exportlasts for that one command, as in Claude Code’s own shell. - The profile applies to every command. A line it refuses fails whole, with exit
126and the reason on stderr. mirage session update demo agent -p buildermoves the session to another profile while Claude runs.
MCP
- Plugin
- mirage mcp
npx -y @struktoai/mirage-cli mcp on your project’s .mirage/workspace.yaml.shell, read, write, edit, ls, grep and glob from the workspace’s MCP server, beside its own tools.
With Shell, serve the same session and deny the tools that would bypass it:
.claude/settings.json
agent.
FUSE
Install your platform’s FUSE driver. With uv, install'mirage-ai[fuse]'; with npm on macOS, also follow the macFUSE 4 workaround. Then expose the workspace at a local folder:
workspace.yaml
/tmp/mirage-demo go through Mirage, with Claude’s own tools. The mount does not restrict the agent’s access to other host paths. mirage workspace delete demo-fuse unmounts it. On macOS the daemon holds one FUSE mount at a time.