> ## 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 bugs: list, show, close, and reopen findings

> CLI reference for the detail bugs command: list, inspect, close, and reopen AI-detected bug findings directly from your terminal.

The `detail bugs` command group lets you list, inspect, resolve, and dismiss AI-detected bugs from the terminal. You can filter findings by status, author, time range, or scan, and triage them individually without leaving your workflow.

## `detail bugs list [REPO]`

List bugs for a repository.

```bash theme={null}
detail bugs 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>`         | Status filter: `pending`, `resolved`, or `dismissed`. Repeat the flag or comma-separate values to combine (e.g. `--status pending,resolved`). | `pending` |
| `--vulns`                   | Show only security vulnerabilities.                                                                                                           | —         |
| `--introduced-by <AUTHORS>` | Show only bugs introduced by these GitHub usernames. Comma-separated or repeat the flag.                                                      | —         |
| `--scan-id <SCAN_ID>`       | Filter bugs to a specific scan by workflow request ID (`wr_...`).                                                                             | —         |
| `--since <VALUE>`           | Show bugs 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 bugs created at or before this point. Same formats as `--since`.                                                                         | —         |
| `--all`                     | Auto-paginate and return every matching bug instead of a single page. Cannot be combined with `--page` or `--limit`.                          | —         |
| `--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`   |

<Note>
  Filters like `--vulns`, `--introduced-by`, `--since`, and `--until` are applied client-side after fetching all matching bugs. For large repositories, adding `--scan-id` first narrows the server-side result set and can speed things up considerably.
</Note>

**Examples**

```bash theme={null}
# List pending bugs in a specific repo
detail bugs list owner/my-repo

# Show only security vulnerabilities (inferred from git remote)
detail bugs list --vulns

# Filter by author and time range
detail bugs list --introduced-by alice,bob --since 7d

# Show all pending and resolved bugs
detail bugs list --status pending,resolved

# Filter to a specific scan
detail bugs list --scan-id wr_abc123

# Fetch every matching bug without paging
detail bugs list --all

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

***

## `detail bugs show <BUG_ID>`

Show the full AI-generated report for a single bug, including its title, affected file, security classification, introduction commit, and review history.

```bash theme={null}
detail bugs show [OPTIONS] <BUG_ID>
```

**Arguments**

| Argument | Description                 |
| -------- | --------------------------- |
| `BUG_ID` | Bug ID in `bug_...` format. |

**Flags**

| Flag                | Description                       | Default |
| ------------------- | --------------------------------- | ------- |
| `--format <FORMAT>` | Output format: `table` or `json`. | `table` |

**Examples**

```bash theme={null}
# View the full report for a bug
detail bugs show bug_abc123

# Output as JSON
detail bugs show bug_abc123 --format json
```

***

## `detail bugs close <BUG_ID>`

Resolve or dismiss a bug. When you run this command in a terminal without `--state`, Detail prompts you interactively to choose a close state, dismissal reason, and optional notes.

```bash theme={null}
detail bugs close [OPTIONS] <BUG_ID>
```

**Arguments**

| Argument | Description                 |
| -------- | --------------------------- |
| `BUG_ID` | Bug ID in `bug_...` format. |

**Flags**

| Flag                          | Description                                                                                                                        | Default |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `--state <STATE>`             | Close state: `resolved` or `dismissed`. Prompted interactively if omitted in a TTY. Required in non-interactive mode.              | —       |
| `--dismissal-reason <REASON>` | Reason for dismissal: `not-a-bug`, `wont-fix`, `duplicate`, or `other`. Required when `--state dismissed` in non-interactive mode. | —       |
| `--notes <TEXT>`              | Optional free-text note to attach to the review.                                                                                   | —       |
| `--format <FORMAT>`           | Output format: `table` or `json`.                                                                                                  | `table` |

<Warning>
  `--state pending` is not valid for `close`. Use `detail bugs reopen` to move a bug back to pending.
</Warning>

**Examples**

```bash theme={null}
# Resolve a bug
detail bugs close bug_abc123 --state resolved

# Dismiss a bug as not a bug
detail bugs close bug_abc123 --state dismissed --dismissal-reason not-a-bug

# Dismiss with a reason and a note
detail bugs close bug_abc123 --state dismissed --dismissal-reason wont-fix --notes "Intentional behavior, see ADR-42"

# Dismiss a duplicate (non-interactive, e.g. in CI)
detail bugs close bug_abc123 --state dismissed --dismissal-reason duplicate
```

<Tip>
  When running in a terminal, you can omit all flags and Detail will walk you through the prompts step by step.
</Tip>

***

## `detail bugs reopen <BUG_ID>`

Reopen a previously resolved or dismissed bug, flipping it back to `pending`. Use this when a fix is reverted or a "won't fix" decision is overturned.

```bash theme={null}
detail bugs reopen <BUG_ID>
```

**Arguments**

| Argument | Description                 |
| -------- | --------------------------- |
| `BUG_ID` | Bug ID in `bug_...` format. |

**Examples**

```bash theme={null}
detail bugs reopen bug_abc123
```
