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

# detail scans: list and filter your repository scan history

> CLI reference for detail scans list: view full scan history and filter by status, scan type, and date range for any connected repository.

The `detail scans` command lets you inspect the scan history for any repository, check the status of individual runs, and look up the scan ID you need to filter bugs with `detail bugs list --scan-id`.

## `detail scans list [REPO]`

List recent scans for a repository.

```bash theme={null}
detail scans list [OPTIONS] [REPO]
```

**Arguments**

| Argument | Description                                                                                                                       |
| -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `REPO`   | Repository as `owner/repo` (e.g. `usedetail/cli`), bare repo name (e.g. `cli`), or omitted to infer from the `origin` git remote. |

**Flags**

| Flag                 | Description                                                                                                                               | Default |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `--status <STATUS>`  | Filter by scan status: `in-progress`, `complete`, `failed`, or `dlq`.                                                                     | —       |
| `--scan-type <TYPE>` | Filter by scan type: `default` or `recent-changes`.                                                                                       | —       |
| `--since <VALUE>`    | Show scans created at or after this point. Accepts a duration (`1d`, `24h`, `30m`), an ISO date (`2024-01-01`), or an RFC 3339 timestamp. | —       |
| `--until <VALUE>`    | Show scans created at or before this point. Same formats as `--since`.                                                                    | —       |
| `--limit <1-100>`    | Maximum number of results per page.                                                                                                       | `50`    |
| `--page <N>`         | Page number, starting at 1.                                                                                                               | `1`     |
| `--format <FORMAT>`  | Output format: `table` or `json`.                                                                                                         | `table` |

Each row in the output includes the scan ID, status, scan type, commit SHA, bug counts, and timestamp.

<Note>
  Filters are applied client-side. When you use `--status`, `--scan-type`, `--since`, or `--until`, Detail fetches all scans for the repository first and then filters the results locally. For repositories with many scans, combining `--since` with a narrow window keeps the result set manageable.
</Note>

**Examples**

```bash theme={null}
# List recent scans for the repo inferred from git remote
detail scans list

# List scans for an explicit repository
detail scans list owner/my-repo

# Show only completed scans from the last week
detail scans list --status complete --since 7d

# Show failed scans of the recent-changes type
detail scans list --status failed --scan-type recent-changes

# Filter to a specific date range
detail scans list --since 2024-06-01 --until 2024-06-30

# Output as JSON for scripting
detail scans list --format json
```

<Tip>
  Copy the scan ID from the output and pass it to `detail bugs list --scan-id <id>` to see only the bugs that were discovered in that particular run.
</Tip>
