Skip to main content
The codeant review command runs an AI-powered code review using an agentic architecture. The agent analyzes your code changes, reads surrounding context from your codebase, and provides detailed suggestions with severity levels.

Basic Usage

Options

Review Scope

Filtering & Thresholds

CI / Headless Mode

Use --headless when running inside CI pipelines or AI agents. In this mode:
  • All results are written to stdout as JSON
  • Progress and status messages are written to stderr
  • No interactive prompts are shown

How It Works

The review runs in a multi-phase pipeline:

Phase 1: Per-File Analysis

Each changed file is analyzed independently and in parallel. For each file, the agent:
  1. Receives the diff and full file content
  2. Can use tools to read other files, search the codebase, and explore directory structures
  3. Iterates through up to 5 conversation turns to gather context and form suggestions
  4. Returns file-specific suggestions with severity labels
Agent Tools Available:

Phase 2: Reflector

After all per-file analyses complete, the reflector phase:
  1. Combines all per-file suggestions
  2. Runs a final analysis pass to deduplicate, refine, and prioritize
  3. Produces the final set of code suggestions

Severity Levels

Each suggestion is assigned a severity based on its label: The --fail-on flag determines the exit code:
  • 0 - No suggestions at or above the threshold
  • 1 - Suggestions found at or above the threshold

File Filtering

The review automatically excludes files that are unlikely to benefit from code review: Lock files: package-lock.json, yarn.lock, pnpm-lock.yaml, composer.lock, Gemfile.lock, Cargo.lock, poetry.lock, Pipfile.lock, go.sum Binary/compiled: .exe, .dll, .so, .dylib, .bin, .o, .a, .class, .pyc, .wasm, .jar, .war Media: .png, .jpg, .jpeg, .gif, .svg, .webp, .mp3, .mp4, .wav, .avi, .mov Fonts: .woff, .woff2, .ttf, .eot, .otf Archives: .zip, .tar, .gz, .bz2, .7z, .rar Generated/minified: .min.js, .min.css, .map, .pb Documents: .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx System: .DS_Store, Thumbs.db

Size Limits

  • Maximum file size: 5,000 lines per file
  • Maximum files per review: 10 unique files
Files exceeding these limits are skipped with a warning.

Examples

Terminal UI

The review displays a live progress indicator in your terminal:
Progress steps:
  1. Init - Initializing review session
  2. Fetch - Gathering diffs and file contents
  3. Analyze - Per-file agent analysis (parallel)
  4. Reflect - Final reflector pass
When complete, suggestions are displayed with color-coded severity and file locations.