Skip to content

Repository files navigation

AI Reviewer (air)

A high-performance CLI tool for automated code reviews. It strips comments from your source code to optimize token usage and privacy, then generates detailed Markdown reports using LLMs.

Installation

Install ai_reviewer and the air shortcut with a single command :

curl -sSL https://raw.githubusercontent.com/realgetOff/AI_Reviewer/main/install.sh | bash

Note: Restart your terminal or run source ~/.zshrc after installation.

Configuration

Set your API key and preferences directly in your terminal :

air config

Commands

CommandDescription
airAnalyze current directory
air <file>Analyze a specific file or path
air configEdit global configuration (~/.ai_config.json)
air -cleanRun the cleanup script (remove reports dir.)
air -updateUpdate to the latest version from GitHub
air -deleteFully uninstall the program and its config

Options

FlagDescription
-s <style>Set review style (e.g., minimal, security, audit, crash, fix)
-l <lang>Set output language (en, fr)
-f <fmt>Set default format (md, pdf)
-t <sec>Set custom request timeout (default: 30s)
-i <n>Set max agent iterations (default: 5)
-I <sec>Set interactive program timeout (default: 10s)
-c <prompt>Use custom prompt instead of config style
-mList available AI models
-dEnable debug mode (verbose logs)
-gAnalyze all files as one (global context mode)
-aEnable agent mode (AI executes commands autonomously)
--versionShow current version
-hDisplay help menu

Output

Output is saved in the reports/ directory:

reports/*.md
reports/*.pdf
reports/error.md
reports/debug.log

AI Providers

Use this guide to configure your config.json. Copy the API URL and the Model Type corresponding to your preferred AI service.

ProviderModel TypeAPI URLKey Format
Google Geminigeminihttps://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContentURL Param
OpenAI (GPT-4o)openaihttps://api.openai.com/v1/chat/completionsBearer Token
Anthropic (Claude 3.5)claudehttps://api.anthropic.com/v1/messagesx-api-key
Mistral AImistralhttps://api.mistral.ai/v1/chat/completionsBearer Token
Zhipu AIglmhttps://open.bigmodel.cn/api/paas/v4/chat/completionsBearer Token

Note: For Gemini only, you must leave model_name: "" (empty) because the model is already specified within the API URL (ofc you can change gemini-2.5-flash by any of available models (check air -m))

Configuration Example (Gemini)

If you want to use Gemini-2.5-Flash, your config.json should look like this:

{
"api_key": "copy-your-gemini-api-key-here",
"api_url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent",
"model_type": "gemini",
"model_name": "",
"default_style": "minimal",
"language": "en",
"styles":
{
"minimal":
{
"en": "Identify critical logic bugs.",
"fr": "Identifie les bugs logiques critiques."
}
}
}

(use the chinese model, alternative to claude and almost free;)

About

A high-performance CLI tool for automated code reviews using LLMs, strips comments to optimize token usage and generates detailed Markdown reports.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages