Automated code review solution based on Git integration
Traditional manual code review suffers from time-consuming and inconsistent standards. easy-llm-cli automates and improves it with the following features:
- Git Change Analysis::
Execute in the project directory
elc "总结昨天Git提交的代码质量"
The tool will automatically:
- Scanning the .git history
- Extracting diff content as context
- Generate reports by dimensions such as "Functional Changes", "Bug Fixes", "Security Risks", etc. - Deep Code Interpretation::
Pass the file through the pipe to the CLI:
cat server.js | elc "解释这段Express中间件的工作原理"
Output contains:
- Core logic flowchart
- Potential performance bottlenecks
- Recommendations for improvement - Review of the Combo model::
Combination commands can be used for complex changes:
git diff HEAD~3 | elc "按代码规范检查最近三次提交" > review.md
A Markdown report is automatically generated with the location of the violation and suggestions for improvement.
Best Practice Tip:
1. SettingCUSTOM_LLM_MODEL_NAME="gpt-4o"
Optimal analysis results are obtained
2. For large projects, add--max-tokens 16000
Parameters guarantee complete analysis
3. It is recommended that frequently used review commands be written into the Makefile for one-click invocation.
This answer comes from the articleeasy-llm-cli: enable Gemini CLI support for calling multiple large language modelsThe