Skip to main content

A local LLM-powered code review CLI tool

Project description

🤖 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_review-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_review-1.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file llm_review-1.0.1.tar.gz.

File metadata

  • Download URL: llm_review-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for llm_review-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8c695d2a791dc0715801ca75c5d8a9937a12f0ccb3740185d547925c23082bd4
MD5 247a0ac6ae45c352ecbd873df52266c4
BLAKE2b-256 69c812ce5782c3483a4688b2ff1e70604daf677c05bd67e441dded63ddeabf2f

See more details on using hashes here.

File details

Details for the file llm_review-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: llm_review-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for llm_review-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f812418ffb2fcd51edb7a6381c37032141ebf126d4d66b33a2bb599f4db4d08
MD5 3fdfc899f9c604425cdc524793fc6ae0
BLAKE2b-256 b2d90eaa8fe6ece10063311ffdbb576021c1fce3073bf4a87b388dad4bba1abd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page