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

# Box, shell and run

> Demo: box, shell and run

Source: `demo/box/app.py` in the repository.

A box is any process kept running in a container: a web server, a database, a notebook. Ports are exposed
through the controlplane. `shell` and `run` are the interactive versions.

```bash theme={null}
cd demo/box

# start a static file server and print its URL
python app.py
curl -s URL            # <h1>levers9 box</h1>...

# see and stop it
levers9 container list
levers9 container stop `container id`

# an interactive shell with the same blueprint and volumes as a function (great for debugging)
cd ../cpu_function && levers9 shell app.py:is_prime

# run a one-off command in a container without writing a handler
levers9 run --help
```

Notes

* `keep_warm_seconds=-1` keeps a box running until you stop it; `0` stops it as soon as it is idle.
* `box.deploy(name=...)` makes it a deployment with a stable URL instead of a one-off container. The dashboard's
  notebooks are boxes deployed this way.
* `Blueprint().add_commands([...])` bakes files and system packages into the blueprint; see `../blueprint`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.