AI Code Review Bot

CLI

The CLI entry point is bin/aicr and exposes a single command: review.

review

php bin/aicr review [--diff-file FILE | --id ID] [--output json|summary|markdown] [--provider PROVIDER] [--comment] [--config FILE]

Options

Examples

# Analyze an existing diff and print a human summary
php bin/aicr review --diff-file examples/sample.diff --output summary

# Analyze a PR by number (GitHub) or MR IID (GitLab) and print JSON
php bin/aicr review --id 123 --output json

# Analyze an MR and post a comment using OpenAI provider
php bin/aicr review --id 456 --output summary --comment --provider openai

# Use a custom config file with Gemini provider
php bin/aicr review --id 123 --config examples/config.github.yml --output summary --provider gemini

# Analyze diff with Anthropic provider and markdown output
php bin/aicr review --diff-file examples/sample.diff --output markdown --provider anthropic