Skip to main content

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>)
  • Structured PR comments (inline + general summary)
  • dry-run mode 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

Output Review Format

Review Output Format Example

Installation

Install from PyPI: s

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 documentation
  • review_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
  scope: diff_only
  custom_prompt_file: review_prompt.md
  # file limit sent to the LLM
  max_diff_files: 50
  # per-file limit
  max_diff_lines: 2000
  # 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 PRs
  • AI 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.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for code-review-ai-cli 2.3.0
File Size Uploaded Provenance Actions
code_review_ai_cli-2.3.0.tar.gz 90.1 kB Without provenance Details for code_review_ai_cli-2.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for code-review-ai-cli 2.3.0
File Interpreter ABI Platform Actions
code_review_ai_cli-2.3.0-py3-none-any.whl Python 3 none any Details for code_review_ai_cli-2.3.0-py3-none-any.whl

Total release size: 152.0 kB

Release files / code_review_ai_cli-2.3.0.tar.gz

Download URL code_review_ai_cli-2.3.0.tar.gz
Size 90.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b70a4a5477264b2e2ec4883216979b4f73b8ce5158c3f2c0cd280e3959d9c941
BLAKE2b-256 checksum
How to use checksums
e7d17c85b2babdd1f67495e29b8b71042eb8a972f835f8d4ce70ca134235211b
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.3.0-py3-none-any.whl

Download URL code_review_ai_cli-2.3.0-py3-none-any.whl
Size 61.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a4b06506efe77cbe18bfec6f102bd16ab9781dc12f59ef908a0ea75374f76f7
BLAKE2b-256 checksum
How to use checksums
8f952f2f50bb101d20b0e06b824c2eff246c736deed2a5571486bc43db88c90e
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.3.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page