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

# devbox logs

> List Devbox executions and stream their retained or live logs.

Use `devbox logs` to stream the retained and live output of an execution, or list retained executions on a Devbox.

## `devbox logs`

Replay the output retained for an execution, then follow new output until the execution completes. The execution ID is printed by `devbox exec --detach` and appears in `devbox logs list`.

<h3 id="logs-usage">
  Usage
</h3>

```bash theme={null}
devbox logs [name] <exec-id> [flags]
```

### Follow an execution

```bash theme={null}
devbox logs main exec_nl1f65debpkamdbdnuqra114cc
```

<h3 id="logs-options">
  Options
</h3>

<ResponseField name="--show-all" type="boolean" default="false">
  Include Devboxes owned by other workspace members when selecting a Devbox.
</ResponseField>

***

## `devbox logs list`

List retained executions. The default table shows each execution's ID, command, start time, and status. Status is `running`, `completed`, or `failed` with its exit code.

<h3 id="list-usage">
  Usage
</h3>

```bash theme={null}
devbox logs list [name] [flags]
```

### List executions as JSON

```bash theme={null}
devbox logs list main --output json
```

When the Devbox has no retained executions, the default output is:

```text Output nocopy theme={null}
No executions.
```

<h3 id="list-options">
  Options
</h3>

<ResponseField name="-o, --output" type="string">
  Set the output format to `json`. Leave empty for a table.
</ResponseField>

The inherited `--show-all` option is documented under `devbox logs` above.

## Related topics

<Card title="Execute commands" icon="terminal" href="/docs/devbox/exec">
  Start executions and inspect their retained output.
</Card>
