# phi logs

Stream and fetch logs.

## phi logs download

```bash
phi logs download [RUN_ID] --out OUT [options]
```

### Arguments

| Name | Required | Description |
|---|---|---|
| `RUN_ID` | Optional | Run id; defaults to .phi/state.json. |

### Options

| Flag | Value | Description |
|---|---|---|
| `--out` (required) | OUT | File to write the logs to. |
| `--stage` | STAGE | Filter to a single stage. |

## phi logs settings

Only an organization admin can change log settings.

```bash
phi logs settings [options]
```

### Options

| Flag | Value | Description |
|---|---|---|
| `--logs-enabled, --no-logs-enabled` | switch |  |
| `--retention-seconds` | RETENTION_SECONDS |  |
| `--max-pod-bytes` | MAX_POD_BYTES |  |
| `--tail-lines-default` | TAIL_LINES_DEFAULT |  |
| `--heartbeat-interval-seconds` | HEARTBEAT_INTERVAL_SECONDS |  |
| `--project` | PROJECT | Project scope; defaults to org. |

## phi logs show

```bash
phi logs show [RUN_ID] [options]
```

### Arguments

| Name | Required | Description |
|---|---|---|
| `RUN_ID` | Optional | Run id; defaults to .phi/state.json. |

### Options

| Flag | Value | Description |
|---|---|---|
| `--stage` | STAGE | Filter to a single stage. |
| `--tail` | TAIL | Show only the last N lines. |
| `--follow` | switch | Tail the live log stream. |


---
Source: https://dynophi.com/docs/cli/logs. From the installed client, phi 0.4.2, 2026-11-23.
