CLI
Mount a directory when creating a sandbox:Python SDK
Writable mounts
By default, mounts are read-only. Add--writable-mounts to let the sandbox write back to your host directories.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
SmolVM is open source. Support the project with a star on GitHub →
Share local folders and project files with a SmolVM sandbox using read-only or writable host mounts so agents can explore code without copying it first.
smolvm sandbox create --mount ~/Projects/my-app
smolvm sandbox ssh my-sandbox
ls /workspace # your host files appear here
smolvm sandbox create --mount ~/Projects/my-app:/code --mount ~/data:/mnt/data
from smolvm import SmolVM
with SmolVM(mounts=["~/Projects/my-app"]) as vm:
result = vm.run("ls /workspace")
print(result.stdout)
with SmolVM(mounts=["~/Projects/my-app:/code", "~/data:/mnt/data"]) as vm:
result = vm.run("ls /code")
print(result.stdout)
--writable-mounts to let the sandbox write back to your host directories.
smolvm sandbox create --mount ~/Projects/my-app --writable-mounts
from smolvm import SmolVM
with SmolVM(mounts=["~/Projects/my-app"], writable_mounts=True) as vm:
vm.run("echo 'hello' > /workspace/new-file.txt")
# new-file.txt now exists on the host at ~/Projects/my-app/new-file.txt
Was this page helpful?
