The AI Review CLI provides a simple interface to run reviews, inspect configuration, and integrate with CI/CD pipelines.
It is built with Typer and fully supports async execution of all review modes.
After installing AI Review:
pip install xai-reviewRun any command from your terminal:
ai-review runOr display help:
ai-review --help| Command | Description | Typical Usage |
|---|---|---|
ai-review run |
Runs the full review pipeline (inline + summary). | ai-review run |
ai-review run-inline |
Runs only inline review (line-by-line comments). | ai-review run-inline |
ai-review run-context |
Runs context review across multiple files for architectural feedback. | ai-review run-context |
ai-review run-summary |
Runs summary review that posts a single summarizing comment. | ai-review run-summary |
ai-review run-inline-reply |
Generates AI replies to existing inline comment threads. | ai-review run-inline-reply |
ai-review run-summary-reply |
Generates AI replies to existing summary review threads. | ai-review run-summary-reply |
ai-review clear-inline |
Removes all AI-generated inline comments from the review. | ai-review clear-inline |
ai-review clear-summary |
Removes all AI-generated summary comments from the review. | ai-review clear-summary |
ai-review show-config |
Prints the currently resolved configuration (merged from YAML/JSON/ENV). | ai-review show-config |
Runs the complete review cycle β inline + summary:
ai-review runFor quick line-by-line comments:
ai-review run-inlineTypical in CI/CD pipelines for fast feedback on changed files.
For broader architectural or cross-file feedback:
ai-review run-contextThe model receives the entire diff set and can highlight inconsistencies between modules.
Posts one concise summary comment under the merge/pull request:
ai-review run-summaryUseful when inline feedback isnβt required but a global analysis is.
Generate AI-based follow-ups to existing discussion threads:
ai-review run-inline-reply
ai-review run-summary-replyReplies only to comments originally created by AI Review.
Removes all AI-generated inline comments:
ai-review clear-inline
β οΈ WarningThis command permanently deletes all inline review comments created by AI Review in the current merge / pull request.
- The operation cannot be undone
- Only comments marked with the AI Review inline tag are affected
- Developer and user comments are not touched
It is recommended to run this command manually and only when you are sure that existing AI comments are no longer needed.
Removes all AI-generated summary comments:
ai-review clear-summary
β οΈ WarningThis command permanently deletes all summary review comments created by AI Review.
- The operation cannot be undone
- Only AI Review summary comments are removed
- No new comments are created as part of this command
Use with caution, especially in shared or long-running pull requests.
Display the resolved configuration used by the CLI:
ai-review show-configOutput (formatted JSON):
{
"llm": {
"provider": "OPENAI",
"meta": {
"model": "gpt-4o-mini",
"temperature": 0.3
}
},
"vcs": {
"provider": "GITLAB",
"pipeline": {
"project_id": 1
}
}
}- Each command runs asynchronously and handles exceptions internally.
- All reviews report token usage and LLM cost after completion.
- The CLI is designed for non-interactive use β perfect for CI/CD jobs.