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:

FlagDescription
--version, -vShow version and exit
--log-levelSet log level: trace, debug, info, error

Commands

bop review branch

Review a local git branch against a base reference.

1
bop review branch [target-branch] [flags]

Arguments

ArgumentDescription
[target-branch]Branch to review (optional, auto-detects current branch)

Common Flags

FlagDefaultDescription
--basemainBase reference to diff against
--targetTarget branch (alternative to positional argument)
--outputoutDirectory for review artifacts
--include-uncommittedfalseInclude uncommitted working tree changes
--reviewersComma-separated list of reviewers to use
--instructionsCustom review instructions
--contextAdditional context files (repeatable)
--interactivefalseEnable interactive planning mode
--no-architecturefalseSkip loading ARCHITECTURE.md
--no-auto-contextfalseDisable automatic context gathering

GitHub Integration Flags

Post findings directly to a GitHub PR:

FlagDescription
--post-github-reviewPost review as GitHub PR review
--github-ownerRepository owner (required with --post-github-review)
--github-repoRepository name (required with --post-github-review)
--pr-numberPull request number (required with --post-github-review)
--commit-shaHead commit SHA (required with --post-github-review)

Review Action Flags

Control how findings affect PR status:

FlagDefaultDescription
--block-thresholdhighMinimum severity to trigger REQUEST_CHANGES
--action-criticalrequest_changesAction for critical findings
--action-highrequest_changesAction for high findings
--action-mediumcommentAction for medium findings
--action-lowcommentAction for low findings
--action-cleanapproveAction when no findings
--action-non-blockingcommentAction when findings don’t block
--always-block-categoryCategories that always block (repeatable)

Valid actions: approve, comment, request_changes

Verification Flags

Control finding verification:

FlagDefaultDescription
--verifyEnable agent-based verification
--no-verifySkip verification (faster, more false positives)
--verification-depthmediumDepth: minimal, medium, thorough
--verification-cost-ceilingMax cost in dollars for verification
--confidence-defaultDefault confidence threshold (0-100)
--confidence-criticalThreshold for critical findings
--confidence-highThreshold for high findings
--confidence-mediumThreshold for medium findings
--confidence-lowThreshold for low findings

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Review current branch against main
bop review branch

# Review feature branch against develop
bop review branch feature/auth --base develop

# Include uncommitted changes
bop review branch --include-uncommitted

# Use specific reviewers
bop review branch --reviewers security,performance

# Post to GitHub PR
bop review branch \
  --post-github-review \
  --github-owner myorg \
  --github-repo myrepo \
  --pr-number 123 \
  --commit-sha abc123

# Block on all security findings
bop review branch --always-block-category security

# Thorough verification
bop review branch --verify --verification-depth thorough

bop review pr

Review a GitHub pull request remotely (no local clone required).

1
bop review pr <identifier> [flags]

Arguments

ArgumentDescription
<identifier>PR reference (see formats below)

PR Identifier Formats:

  • 123 - PR number (infers owner/repo from git remote)
  • owner/repo#123 - Owner/repo notation
  • https://github.com/owner/repo/pull/123 - Full URL
  • github.mycompany.com/owner/repo/pull/123 - GitHub Enterprise URL

Flags

FlagDefaultDescription
--outputoutDirectory for review artifacts
--postfalseUpload findings to PR as comments
--reviewersComma-separated list of reviewers
--instructionsCustom review instructions
--no-architecturefalseSkip loading ARCHITECTURE.md
--no-auto-contextfalseDisable automatic context gathering

All review action and verification flags from review branch also apply.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Review PR by number
bop review pr 123

# Review and post findings to PR
bop review pr owner/repo#123 --post

# Review with security focus
bop review pr 123 --reviewers security

# Review GitHub Enterprise PR
bop review pr github.mycompany.com/org/repo/pull/456

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.

1
bop auth login

Opens a browser for GitHub OAuth authentication. Credentials are stored in ~/.config/bop/auth.json.

bop auth status

Check authentication status.

1
bop auth status

bop auth logout

Clear stored credentials.

1
bop auth logout

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.

1
bop github-action

Environment Variables

VariableDescription
BOP_BASE_REFBase branch (default: main)
BOP_POST_FINDINGSPost findings to PR (default: true)
BOP_REVIEWERSComma-separated reviewer list
BOP_BLOCK_THRESHOLDSeverity threshold
BOP_LOG_LEVELLog level
GITHUB_TOKENGitHub token for API access
GITHUB_HEAD_REFPR head branch
GITHUB_REPOSITORYRepository (owner/repo)
GITHUB_WORKSPACEWorkspace directory
GITHUB_PR_NUMBERPR number
GITHUB_PR_SHAHead commit SHA

See GitHub Actions for complete workflow setup.


bop feedback

Submit feedback to help improve Bop.

1
bop feedback

Requires authentication (bop auth login).


bop sessions

Manage review sessions (if session management is enabled).

1
2
bop sessions list
bop sessions show <session-id>

Output Formats

Bop generates three output formats in the output directory:

FormatFilename PatternUse Case
Markdownreview-{provider}-{timestamp}.mdHuman reading
JSONreview-{provider}-{timestamp}.jsonAutomation
SARIFreview-{provider}-{timestamp}.sarifCI/CD, IDEs

Exit Codes

CodeMeaning
0Success, no blocking findings
1Error during review
2Blocking findings detected

Environment Variable Reference

All CLI flags can be set via environment variables with the BOP_ prefix:

1
2
3
4
# Examples
export BOP_LOG_LEVEL=debug
export BOP_OUTPUT_DIRECTORY=./my-reviews
export BOP_REVIEW_BLOCKTHRESHOLD=medium

See Configuration for the complete list.