Skip to content

Repository files navigation

AI Code Review

Automated code review tool with Pull Request integration for Azure DevOps and on-premise TFS and support for multiple LLM providers.

Features

  • AI Pull Request review (pr-review)
  • 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

Documentation

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 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"]

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages