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

# List sandboxes

export const SandboxCliConfigHint = () => {
  if (typeof document === "undefined") {
    return null;
  } else {
    return <Note>Before running the command-line related example code in this document, please refer to the <Link href="/guides/sandbox-cli">tutorial</Link> to install the CLI and complete <Link href="/guides/sandbox-cli-auth">authentication</Link>.</Note>;
  }
};

<SandboxCliConfigHint />

### List all running sandboxes

To list all running sandboxes, use the following command:

```bash Bash icon="terminal" theme={"system"}
novita-sandbox-cli sandbox list
```

### Filter by state

Use the `--state` flag to filter sandboxes by state. Supported values are "**running**", "**paused**", or both.
For example, to get both running and paused sandboxes:

```bash Bash icon="terminal" theme={"system"}
novita-sandbox-cli sandbox list --state running,paused
```

### Filter by metadata

Use the `--metadata` flag to filter sandboxes by metadata.

```bash Bash icon="terminal" theme={"system"}
novita-sandbox-cli sandbox list --metadata key1=value1,key2=value2
```

### List limit

Use the `--limit` flag to limit the number of sandboxes returned by the command.
If the `--limit` flag is not specified, the command returns all sandboxes.

```bash Bash icon="terminal" theme={"system"}
novita-sandbox-cli sandbox list --limit 10
```
