grep, git and any other program read and write its files like local ones, and every file operation still goes through the workspace’s mounts. The folder can be on the server’s machine, or on your own machine when the server runs somewhere else.
With the
mirage CLI the server runs on your machine, so the first way puts the folder there too. In your own app, set backend on the Mount instead, in Python or TypeScript.
On the server’s machine
1
Install FUSE
Install the system FUSE first, see the support matrix. Then the binding:
2
Mark the mounts
workspace.yaml
mountpoint must be a folder that exists. Without one, the server makes a new temporary folder.3
Create the workspace
GET /v1/workspaces/{id}, lists where each mount landed:READ mount fails with “Read-only file system”. On macOS a process holds one FUSE mount at a time, so the server can serve one folder there.
On your machine
apt install sshfs; on macOS install macFUSE and SSHFS from macfuse.github.io.
- Keep
-o direct_io. Files from API-backed mounts, such as Linear, Slack or Trello, have no size until they are read, so they list as 0 bytes. Withoutdirect_iothe kernel trusts that size and they read as empty; with it they read in full. - One session for the whole mount. The mount is one SFTP channel, so it runs as one fresh session under the key’s profile, closed when you unmount. In
jwtmode the key needsmirage-accountand opens only that account’s workspaces. - A write to a
READmount fails with “Permission denied”, since SFTP has no read-only error. - Every file operation is a round trip to the server.