# CLI Reference
## vvbox run
Runs a command in a sandboxed container with the repo snapshot mounted.
Key flags:
- `--repo <path>` (required)
- `--cmd <string>` or `-- <args...>`
- `--diff` (generate patch)
- `--cleanup` / `--cleanup-on-success`
- `--no-network`
- `--shell` (interactive shell)
- `--keep` (keep container after exit)
- `--worktree <path>` + `--in-place` to run against an existing worktree (no snapshot)
## vvbox diff
Generate a patch from a run:
```bash
vvbox diff --last
```
## vvbox apply
Apply a patch back to the repo:
```bash
vvbox apply --last
```
Use `--allow-dirty` if your working tree isn’t clean. Add `--yes` to skip confirmation.
## vvbox attach
Attach to a kept container (requires `--keep`):
```bash
vvbox attach --last --shell
```
## vvbox logs
Stream logs from a run container:
```bash
vvbox logs --last --tail 200
```
Add `--no-follow` to exit immediately.
## vvbox init
Create a default `vvbox.yaml` in the repo root:
```bash
vvbox init --repo /path/to/repo
```
## vvbox services
Manage lightweight service containers:
```bash
vvbox services up --repo /path/to/repo
vvbox services status --repo /path/to/repo
vvbox services status --repo /path/to/repo --json
vvbox services logs --repo /path/to/repo --name db --tail 200
vvbox services restart --repo /path/to/repo
vvbox services down --repo /path/to/repo
```
## vvbox up / vvbox down
Short aliases for `vvbox services up` and `vvbox services down`.