> ## Documentation Index
> Fetch the complete documentation index at: https://docs.celesto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mount Folders and Data

> 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.

Host mounts let a sandbox read files from your local machine without copying them. This is useful when an agent needs to explore a codebase or process data that already lives on your host.

By default, the host folder is read-only — the sandbox can read every file, but changes stay inside the sandbox and never touch the originals. If you need the sandbox to write back to the host, see [writable mounts](#writable-mounts) below.

## CLI

Mount a directory when creating a sandbox:

```bash theme={null}
smolvm sandbox create --mount ~/Projects/my-app
smolvm sandbox ssh my-sandbox
ls /workspace   # your host files appear here
```

Mount multiple directories at custom paths:

```bash theme={null}
smolvm sandbox create --mount ~/Projects/my-app:/code --mount ~/data:/mnt/data
```

## Python SDK

```python theme={null}
from smolvm import SmolVM

with SmolVM(mounts=["~/Projects/my-app"]) as vm:
    result = vm.run("ls /workspace")
    print(result.stdout)
```

You can also specify custom mount paths:

```python theme={null}
with SmolVM(mounts=["~/Projects/my-app:/code", "~/data:/mnt/data"]) as vm:
    result = vm.run("ls /code")
    print(result.stdout)
```

## Writable mounts

By default, mounts are read-only. Add `--writable-mounts` to let the sandbox write back to your host directories.

### CLI

```bash theme={null}
smolvm sandbox create --mount ~/Projects/my-app --writable-mounts
```

Any file the sandbox creates or modifies inside the mount point appears on your host immediately.

### Python SDK

```python theme={null}
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
```

<Warning>
  Writable mounts give the sandbox full write access to the mounted host directories. Make sure you trust the code running inside the sandbox before enabling this flag.
</Warning>
