A tool to fetch Git/SVN diffs, send them to an AI reviewer, and generate configurable code review reports.
Kodevu is a Node.js tool that fetches Git commits or SVN revisions, sends the diff to a supported AI reviewer CLI, and writes review results to report files. It supports an optional persistent config file at ~/.kodevu/config.json for settings that should survive across sessions.
Use npx kodevu to review a codebase.
npx kodevu .
npx kodevu . --rev <commit-hash>
npx kodevu . --last 3
npx kodevu . --uncommitted
kodevu supports several AI reviewer backends: auto, openai, gemini, codex, copilot. The default is auto, which probes available CLI tools in your PATH.
Example using OpenAI:
npx kodevu . --reviewer openai --openai-api-key <YOUR_API_KEY> --openai-model gpt-5-mini
By default, review reports are generated as Markdown files in ~/.kodevu/. You can specify --format json or change the output directory using --output <dir>.
npx kodevu . --format json --output ./reports
You can provide additional instructions to the reviewer using --prompt:
npx kodevu . --prompt "Focus on security issues and suggest optimizations."
Or from a file: --prompt @my-rules.txt
All options can also be set via environment variables to avoid repetitive flags:
KODEVU_REVIEWER – Default reviewer.KODEVU_LANG – Default output language.KODEVU_OUTPUT_DIR – Default output directory.KODEVU_PROMPT – Default prompt instructions.KODEVU_OPENAI_API_KEY – API key for openai.KODEVU_OPENAI_BASE_URL – Base URL for openai.KODEVU_OPENAI_MODEL – Model for openai.For persistent settings that survive across shells and AI tool invocations, create ~/.kodevu/config.json:
{
"reviewer": "openai",
"openaiApiKey": "sk-...",
"openaiBaseUrl": "https://your-gateway.example.com/v1",
"openaiModel": "gpt-4o",
"lang": "zh"
}
The file is optional and silently ignored if absent. Priority: CLI flags > ENV vars > config file > defaults.
target must be a local repository or subdirectory.target can be a working copy path or repository URL.npx kodevu /path/to/project --last 1