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

# Repository Scans

> Browse and query CodeAnt AI scan results interactively or from scripts and agents

CodeAnt provides two interfaces for exploring scan results - an interactive terminal UI for humans, and a set of CLI subcommands for scripts and AI agents.

## Interactive UI: `scan-center`

Browse scan results interactively in your terminal.

```bash theme={"theme":"css-variables"}
codeant scan-center
```

Launches a full-terminal interactive UI. Navigate through:

1. **Connection** - Select your organization/connection
2. **Repository** - Pick a repository
3. **Scan** - Select a scan (latest or historical)
4. **Result type** - Choose a finding category:
   * Security Issues (SAST), Anti-Patterns, Docstring Issues, Complex Functions
   * SCA, SBOM, Secrets, IaC, Dead Code
   * Dismissed Alerts, Dismissed Secrets

No options. Use arrow keys and Enter to navigate.

***

## Agent / Script Interface: `scans`

The `scans` subcommands expose the same data as structured output, designed for use in CI pipelines, AI agents, and scripts.

```bash theme={"theme":"css-variables"}
codeant scans <subcommand> [options]
```

### scans orgs

List authenticated organizations.

```bash theme={"theme":"css-variables"}
codeant scans orgs
```

**Output:** Returns your connections and user email.

***

### scans repos

List repositories for an organization.

```bash theme={"theme":"css-variables"}
codeant scans repos [options]
```

| Option | Description |
| - | - |
| `--org <org>` | Organization name (auto-picked when only one is authenticated) |

**Examples:**

```bash theme={"theme":"css-variables"}
# List repos (auto-selects org if only one)
codeant scans repos

# List repos for a specific org
codeant scans repos --org my-org
```

***

### scans history

Show scan history for a repository.

```bash theme={"theme":"css-variables"}
codeant scans history --repo <owner/repo> [options]
```

| Option | Description |
| - | - |
| `--repo <repo>` | **(required)** Repository in `owner/repo` format |
| `--branch <name>` | Filter by branch name |
| `--since <iso>` | Show scans since ISO date (e.g. `2024-01-01`) |
| `--limit <n>` | Max results (default: `20`) |

**Examples:**

```bash theme={"theme":"css-variables"}
# Show last 20 scans for a repo
codeant scans history --repo acme/backend

# Filter to a specific branch
codeant scans history --repo acme/backend --branch main

# Show scans since a date
codeant scans history --repo acme/backend --since 2024-06-01
```

***

### scans get

Show scan metadata and a severity/category summary. Does not include individual findings.

```bash theme={"theme":"css-variables"}
codeant scans get --repo <owner/repo> [options]
```

| Option | Description |
| - | - |
| `--repo <repo>` | **(required)** Repository in `owner/repo` format |
| `--scan <sha>` | Specific commit SHA to use |
| `--branch <name>` | Resolve latest scan on this branch |
| `--types <list>` | Comma-separated scan types (default: `all`) |
| `--quiet` | Suppress progress output |

**Scan types:** `sast`, `anti_patterns`, `docstring`, `complex_functions`, `sca`, `sbom`, `secrets`, `iac`, `dead_code`, `all`

**Examples:**

```bash theme={"theme":"css-variables"}
# Get latest scan summary for a repo
codeant scans get --repo acme/backend

# Get scan for a specific commit
codeant scans get --repo acme/backend --scan abc1234

# Get latest scan on a branch, only SAST and secrets
codeant scans get --repo acme/backend --branch main --types sast,secrets
```

***

### scans results

Fetch full scan findings for a repository.

```bash theme={"theme":"css-variables"}
codeant scans results --repo <owner/repo> [options]
```

| Option | Description |
| - | - |
| `--repo <repo>` | **(required)** Repository in `owner/repo` format |
| `--scan <sha>` | Specific commit SHA to use |
| `--branch <name>` | Resolve latest scan on this branch |
| `--types <list>` | Comma-separated types: `sast`, `sca`, `secrets`, `iac`, `dead_code`, `duplicate_code`, `sbom`, `anti_patterns`, `docstring`, `complex_functions`, `all` (default: `all`) |
| `--severity <list>` | Filter by severity (e.g. `critical,high`) |
| `--path <glob>` | Filter by file path glob |
| `--check <regex>` | Filter by check ID or name (regex) |
| `--filter-dismissed` | Exclude dismissed findings. Without it, dismissed findings carry `metadata.dismissed`. |
| `--no-false-positives` | Exclude false positives, including findings users marked in the app. Without it, they carry `metadata.false_positive`. |
| `--format <fmt>` | Output format: `json`, `sarif`, `csv`, `md`, `table` (default: `json`) |
| `--output <path>` | Write output to file instead of stdout |
| `--fields <list>` | Project findings to a subset of fields (comma-separated) |
| `--limit <n>` | Max findings per page (default: `100`) |
| `--offset <n>` | Pagination offset (default: `0`) |
| `--fail-fast` | Exit `3` on first category fetch failure |
| `--no-color` | Disable ANSI color (auto-disabled when not a TTY) |
| `--quiet` | Suppress progress output on stderr |

**Examples:**

```bash theme={"theme":"css-variables"}
# Fetch all findings (JSON)
codeant scans results --repo acme/backend

# Fetch only critical and high severity findings
codeant scans results --repo acme/backend --severity critical,high

# Fetch SAST findings only
codeant scans results --repo acme/backend --types sast

# Filter to a specific file path
codeant scans results --repo acme/backend --path 'src/**/*.ts'

# Filter by check name using regex
codeant scans results --repo acme/backend --check 'sql-injection'

# Output as SARIF to a file
codeant scans results --repo acme/backend --format sarif --output results.sarif

# Exclude dismissed findings
codeant scans results --repo acme/backend --filter-dismissed

# Paginate through results
codeant scans results --repo acme/backend --limit 50 --offset 100

# Project only specific fields
codeant scans results --repo acme/backend --fields id,severity,message,path
```

**Exit codes:**

| Code | Meaning |
| - | - |
| `0` | Success |
| `1` | General error |
| `3` | Category fetch failure (with `--fail-fast`) |

***

### scans dismissed

List dismissed alerts for a repository.

```bash theme={"theme":"css-variables"}
codeant scans dismissed --repo <owner/repo> [options]
```

| Option | Description |
| - | - |
| `--repo <repo>` | **(required)** Repository in `owner/repo` format |
| `--analysis-type <type>` | Analysis type: `security`, `secrets`, `sca`, `iac`, `antipatterns`, `docstring`, `complex_functions`, `dead_code`, or `duplicate_code` (default: `security`) |

**Examples:**

```bash theme={"theme":"css-variables"}
# List dismissed security alerts
codeant scans dismissed --repo acme/backend

# List dismissed secrets alerts
codeant scans dismissed --repo acme/backend --analysis-type secrets
```

***

### scans overrides

List the per-finding overrides users set in the CodeAnt app for a repository: Mark or Unmark false positive (`security`, `iac`), secrets confidence, and Change Severity (`security`, `sca`). `scans results` already applies these overrides. Use this command to explain why a finding is hidden or has a different severity.

```bash theme={"theme":"css-variables"}
codeant scans overrides --repo <owner/repo> [options]
```

| Option | Description |
| - | - |
| `--repo <repo>` | **(required)** Repository in `owner/repo` format |
| `--analysis-type <type>` | Analysis type: `security`, `secrets`, `iac`, or `sca` (default: `security`) |

**Example:**

```bash theme={"theme":"css-variables"}
codeant scans overrides --repo acme/backend --analysis-type sca
```

***

### scans start-scan

Trigger a new analysis run for a repository.

```bash theme={"theme":"css-variables"}
codeant scans start-scan [options]
```

All options are optional - `repo`, `branch`, and `commit` are auto-detected from the local git context.

| Option | Description |
| - | - |
| `--repo <repo>` | Repository in `owner/repo` format |
| `--branch <name>` | Branch to scan |
| `--commit <sha>` | Commit SHA to scan |
| `--include <paths>` | Comma-separated glob patterns to include |
| `--exclude <paths>` | Comma-separated glob patterns to exclude |

**Examples:**

```bash theme={"theme":"css-variables"}
# Zero-config - auto-detects repo, branch, and latest commit
codeant scans start-scan

# Explicit repo and branch
codeant scans start-scan --repo CodeAnt-AI/codeant-cli --branch main

# Scan only specific files
codeant scans start-scan --branch main --include "src/main.py,src/utils.py" --exclude "tests/,*.md"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.