Interactive shell over a temporary Mesa repo running inside a Daytona sandbox, written in TypeScript.
Spins up a Daytona sandbox from an image with Mesa installed, creates and mounts a temporary repo via FUSE, and drops you into a minimal shell. Commands execute inside the sandbox against the mounted filesystem.
See also: daytona-python-shell for the Python version.
npm install
# Create a .env in this directory (gitignored)
cp .env.example .env
# Now populate your .env file with the required values
# Run
npm startCreating Daytona sandbox...
Mounting Mesa...
Connected to ~/.local/share/mesa/mnt/acme/daytona-123456789. Type "exit" or Ctrl+C to quit.
$ printf 'Hello from Daytona and Mesa!\n' > hello.txt
$ cat hello.txt
Hello from Daytona and Mesa!
$ exit
Cleaning up sandbox and temporary repo...
Bye!
- Builds a Daytona image with Mesa and its FUSE configuration.
- Creates a temporary Mesa repo and a Daytona sandbox.
- Mints a 30-minute access token restricted to the temporary repo.
- Passes
MESA_ORGandMESA_ACCESS_TOKENonly to themesa mountcommand. The private key never enters the sandbox. - Starts the FUSE daemon (
mesa mount --daemonize), then drops you into a REPL in the mounted repo. - Deletes the sandbox and temporary repo when the shell exits.
By default, MesaFS mounts every repo the access token can access. Since this token is restricted to the temporary repo, that is the only repo in the mount.
| Variable | Description |
|---|---|
MESA_PRIVATE_KEY |
Mesa signing private key stored only in the trusted host process |
DAYTONA_API_KEY |
Daytona API key (get one here) |
- Node.js >= 18
- Mesa account with a signing key
- Daytona account with an API key