🤖 LLM Code Review Bot
A lightweight, fully local code reviewer powered by Ollama and Qwen/Mistral.
It parses your Python files, extracts functions, and uses an LLM to suggest improvements — just like a real dev reviewer.
✨ Features
- Extracts Python functions using regex (no AST or tree-sitter required)
- Sends each function to a local LLM (via Ollama) for review
- CLI-based — no frontend required
- Outputs reviews in your terminal
- Completely offline — free & private
🚀 Quickstart
1. Install Ollama and run the model
ollama run qwen:7b-chat
2. Clone and install requirements
git clone https://github.com/ErenErenturk/llm-code-review-bot.git
cd llm-code-review-bot
python -m venv .venv && .venv\Scripts\activate
pip install -r requirements.txt
3. Run the review tool
python review.py path/to/your_script.py
You'll see something like:
[debug] Extracted 3 functions
[debug] LLM response: "This function could benefit from more error handling..."
🛠 Tech Stack
- 🧠 Qwen via Ollama
- 🐍 Python 3.10+
- 🧪 Regex-based function extraction
- 📦 No external APIs
📌 Future Plans
- Batch review folders
- GitHub PR comments
- Save review results to Markdown or HTML
🧠 Example Output
💬 “Consider adding a docstring and improving exception handling for this function.”
Contributions welcome — feedback, PRs, and ideas are all appreciated!
Metadata
Release files for llm-review 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llm_review-1.0.1.tar.gz | 4.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_review-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / llm_review-1.0.1.tar.gz
| Download URL | llm_review-1.0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c695d2a791dc0715801ca75c5d8a9937a12f0ccb3740185d547925c23082bd4
|
|
BLAKE2b-256 checksum How to use checksums |
69c812ce5782c3483a4688b2ff1e70604daf677c05bd67e441dded63ddeabf2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Release files / llm_review-1.0.1-py3-none-any.whl
| Download URL | llm_review-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f812418ffb2fcd51edb7a6381c37032141ebf126d4d66b33a2bb599f4db4d08
|
|
BLAKE2b-256 checksum How to use checksums |
b2d90eaa8fe6ece10063311ffdbb576021c1fce3073bf4a87b388dad4bba1abd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Security for llm-review 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.