AI Code Review
AI Code Review is an automated AI-powered code review CLI, compatible with various LLM providers, designed for integration with Azure DevOps, whether in the cloud or on-premises. It allows you to run a review on demand or as part of a pipeline triggered before a commit or when a pull request is created.
Features
- AI Pull Request review (
pr-review) - Local Git review without a PR (
local/local-review— working tree,--staged,--from <branch>,--commit <sha>) - Full Code Scan (
full-code-scan): on-demand static quality and security audit of files, folders, or glob patterns without requiring a Git diff or PR - Smart File Bundling: groups related files (interfaces, implementations, unit tests, i18n pairs, and domain folders) into cohesive bundles (
max_files_per_bundle) so large changesets are reviewed completely without context degradation - Deterministic Cross-File Symbol Resolution: resolves compact signatures and type declarations (
<referenced_symbols>) via Tree-sitter across PR/local changesets and relative/sibling imports (max_referenced_symbols) - Structured PR comments (inline + general summary)
dry-runmode to validate without posting- PR listing with filters (
list-prs) - Configuration exclusively via
config.yaml - Providers LLM: OpenAI, Azure OpenAI, Gemini, Claude, Ollama, GitHub Copilot, AWS Bedrock
- Diff filtering by excluded path prefixes (
excluded_paths) and/or file extensions (file_extensions_filter) - Prompt token consumption estimation with LiteLLM (
Total Tokens) - Validation to ensure comments are not duplicated in re-runs (CI/CD Pipelines)
Documentation
- Configuration Guide - Details on YAML parameters and settings.
- Commands Reference - Complete list of CLI commands and arguments.
- Execution Flow - Mermaid diagram of the application's lifecycle.
- Troubleshooting - Common issues and solutions.
Output Review Format
Installation
Install from PyPI:
pip install code-review-ai-cli
After installing the package, generate ready-to-edit configuration files in your working directory:
ai-review init
This copies two bundled templates:
config.yaml— all available options with inline documentationreview_prompt.md— default review style rules, injected into every LLM prompt
The tool looks for config.yaml in the current working directory at runtime. You can also pass a different path with --config:
ai-review pr-review --config ~/configs/ai-review.yaml
If you plan to run the test suite locally, also install development dependencies:
pip install "code-review-ai-cli[dev]"
Minimal Example
Example config.yaml:
llm:
provider: openai
model: gpt-4o
openai:
api_key: sk-xxxx
tfs:
base_url: https://dev.azure.com/your-organization
project: ProjectName
pat: xxxxxxxxx
verify_ssl: true
# ca_bundle: C:/certs/corporate-root-ca.pem
review:
verbosity: detailed
custom_prompt_file: review_prompt.md
# maximum related files grouped per LLM review bundle (Smart File Bundling)
max_files_per_bundle: 5
# per-file limit
max_diff_lines: 2000
# cross-file symbol declarations resolved per file (0 = disabled)
max_referenced_symbols: 10
# extension allowlist (empty list = all files)
file_extensions_filter: [".cs", ".ts", ".py"]
# exclude path prefixes from the diff (applied before file_extensions_filter)
# leading slash is optional; add trailing slash for exact folder boundary
excluded_paths: ["libs/generated"]
pr:
auto_post_comments: false
dry_run: false
comment_mode: structured
output:
format: terminal
file: ""
color: true
Available VS Code Tasks
AI Review: Pull Request (Interactive)AI Review: PR (Dry-Run)AI Review: List Active PRsAI Review: Interactive Mode
License
This project is licensed under the Apache Licence 2.0 — see the LICENSE.
Metadata
Release files for code-review-ai-cli 2.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| code_review_ai_cli-2.5.0.tar.gz | 109.2 kB | Without provenance | Details for code_review_ai_cli-2.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| code_review_ai_cli-2.5.0-py3-none-any.whl | Python 3 | none | any | Details for code_review_ai_cli-2.5.0-py3-none-any.whl |
Total release size: 186.1 kB
Release files / code_review_ai_cli-2.5.0.tar.gz
| Download URL | code_review_ai_cli-2.5.0.tar.gz |
|---|---|
| Size | 109.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8b11cdd96d332572cf7064d3972f97f57a4f027c23870824d06cc1794175310
|
|
BLAKE2b-256 checksum How to use checksums |
17f12cdcac171759daba6aae1863d32e405bbd1c8daff4f80e2666495219d75f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / code_review_ai_cli-2.5.0-py3-none-any.whl
| Download URL | code_review_ai_cli-2.5.0-py3-none-any.whl |
|---|---|
| Size | 76.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f7a2223b7a67cdc62adf39dcd37bdfdb9d353b5d6ac3bb237bfdb176ac78303
|
|
BLAKE2b-256 checksum How to use checksums |
8d4eeb95aa47a80245fb2a7e4557dac80c5eb967f0480def6151e1a7e67c7384
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for code-review-ai-cli 2.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.