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

# Sandbox

## e2b sandbox

work with sandboxes

### Usage

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
e2b sandbox [options] [command]
```

## e2b sandbox connect

connect terminal to already running sandbox

### Usage

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
e2b sandbox connect [options] <sandboxID>
```

## e2b sandbox list

list all running sandboxes

### Usage

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
e2b sandbox list [options]
```

## e2b sandbox kill

kill sandbox

### Usage

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
e2b sandbox kill [options] [sandboxID]
```

### Options

* `-a, --all: kill all running sandboxes `

## e2b sandbox spawn

spawn sandbox and connect terminal to it

### Usage

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
e2b sandbox spawn [options] [template]
```

### Options

* `-p, --path <path>: change root directory where command is executed to <path> directory `
* `--config <e2b-toml>: specify path to the E2B config toml. By default E2B tries to find ./e2b.toml in root directory. `

## e2b sandbox logs

show logs for sandbox

### Usage

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
e2b sandbox logs [options] <sandboxID>
```

### Options

* `--level <level>: filter logs by level (DEBUG, INFO, WARN, ERROR). The logs with the higher levels will be also shown. [default: INFO]`
* `-f, --follow: keep streaming logs until the sandbox is closed `
* `--format <format>: specify format for printing logs (json, pretty) [default: pretty]`
* `--loggers [loggers]: filter logs by loggers. Specify multiple loggers by separating them with a comma. `
