CLI Reference
Bop provides a powerful CLI for running code reviews from your terminal. This page documents all commands and flags.
Global Options
These options work with all commands:
| Flag | Description |
|---|---|
--version, -v | Show version and exit |
--log-level | Set log level: trace, debug, info, error |
Commands
bop review branch
Review a local git branch against a base reference.
| |
Arguments
| Argument | Description |
|---|---|
[target-branch] | Branch to review (optional, auto-detects current branch) |
Common Flags
| Flag | Default | Description |
|---|---|---|
--base | main | Base reference to diff against |
--target | Target branch (alternative to positional argument) | |
--output | out | Directory for review artifacts |
--include-uncommitted | false | Include uncommitted working tree changes |
--reviewers | Comma-separated list of reviewers to use | |
--instructions | Custom review instructions | |
--context | Additional context files (repeatable) | |
--interactive | false | Enable interactive planning mode |
--no-architecture | false | Skip loading ARCHITECTURE.md |
--no-auto-context | false | Disable automatic context gathering |
GitHub Integration Flags
Post findings directly to a GitHub PR:
| Flag | Description |
|---|---|
--post-github-review | Post review as GitHub PR review |
--github-owner | Repository owner (required with --post-github-review) |
--github-repo | Repository name (required with --post-github-review) |
--pr-number | Pull request number (required with --post-github-review) |
--commit-sha | Head commit SHA (required with --post-github-review) |
Review Action Flags
Control how findings affect PR status:
| Flag | Default | Description |
|---|---|---|
--block-threshold | high | Minimum severity to trigger REQUEST_CHANGES |
--action-critical | request_changes | Action for critical findings |
--action-high | request_changes | Action for high findings |
--action-medium | comment | Action for medium findings |
--action-low | comment | Action for low findings |
--action-clean | approve | Action when no findings |
--action-non-blocking | comment | Action when findings don’t block |
--always-block-category | Categories that always block (repeatable) |
Valid actions: approve, comment, request_changes
Verification Flags
Control finding verification:
| Flag | Default | Description |
|---|---|---|
--verify | Enable agent-based verification | |
--no-verify | Skip verification (faster, more false positives) | |
--verification-depth | medium | Depth: minimal, medium, thorough |
--verification-cost-ceiling | Max cost in dollars for verification | |
--confidence-default | Default confidence threshold (0-100) | |
--confidence-critical | Threshold for critical findings | |
--confidence-high | Threshold for high findings | |
--confidence-medium | Threshold for medium findings | |
--confidence-low | Threshold for low findings |
Examples
| |
bop review pr
Review a GitHub pull request remotely (no local clone required).
| |
Arguments
| Argument | Description |
|---|---|
<identifier> | PR reference (see formats below) |
PR Identifier Formats:
123- PR number (infers owner/repo from git remote)owner/repo#123- Owner/repo notationhttps://github.com/owner/repo/pull/123- Full URLgithub.mycompany.com/owner/repo/pull/123- GitHub Enterprise URL
Flags
| Flag | Default | Description |
|---|---|---|
--output | out | Directory for review artifacts |
--post | false | Upload findings to PR as comments |
--reviewers | Comma-separated list of reviewers | |
--instructions | Custom review instructions | |
--no-architecture | false | Skip loading ARCHITECTURE.md |
--no-auto-context | false | Disable automatic context gathering |
All review action and verification flags from review branch also apply.
Examples
| |
bop auth (Platform — Coming Soon)
Manage platform authentication. These commands are for Bop Pro platform integration, which is coming soon. They are not required for local CLI usage.
bop auth login
Authenticate with the Bop platform using GitHub.
| |
Opens a browser for GitHub OAuth authentication. Credentials are stored in ~/.config/bop/auth.json.
bop auth status
Check authentication status.
| |
bop auth logout
Clear stored credentials.
| |
bop github-action
Run code review optimized for GitHub Actions. This command is designed to be called from a GitHub Actions workflow and uses GitHub-specific environment variables.
| |
Environment Variables
| Variable | Description |
|---|---|
BOP_BASE_REF | Base branch (default: main) |
BOP_POST_FINDINGS | Post findings to PR (default: true) |
BOP_REVIEWERS | Comma-separated reviewer list |
BOP_BLOCK_THRESHOLD | Severity threshold |
BOP_LOG_LEVEL | Log level |
GITHUB_TOKEN | GitHub token for API access |
GITHUB_HEAD_REF | PR head branch |
GITHUB_REPOSITORY | Repository (owner/repo) |
GITHUB_WORKSPACE | Workspace directory |
GITHUB_PR_NUMBER | PR number |
GITHUB_PR_SHA | Head commit SHA |
See GitHub Actions for complete workflow setup.
bop feedback
Submit feedback to help improve Bop.
| |
Requires authentication (bop auth login).
bop sessions
Manage review sessions (if session management is enabled).
| |
Output Formats
Bop generates three output formats in the output directory:
| Format | Filename Pattern | Use Case |
|---|---|---|
| Markdown | review-{provider}-{timestamp}.md | Human reading |
| JSON | review-{provider}-{timestamp}.json | Automation |
| SARIF | review-{provider}-{timestamp}.sarif | CI/CD, IDEs |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success, no blocking findings |
| 1 | Error during review |
| 2 | Blocking findings detected |
Environment Variable Reference
All CLI flags can be set via environment variables with the BOP_ prefix:
| |
See Configuration for the complete list.