{"id":50817199,"url":"https://github.com/massimilianoviola/llm-code-review","last_synced_at":"2026-06-13T10:33:13.036Z","repository":{"id":343101524,"uuid":"1176080637","full_name":"massimilianoviola/llm-code-review","owner":"massimilianoviola","description":"Pre-commit hook that reviews staged changes using a local LLM via Ollama","archived":false,"fork":false,"pushed_at":"2026-03-08T22:12:11.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-09T02:22:16.028Z","etag":null,"topics":["code-review","developer-tools","ollama","pre-commit-hook","qwen"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/massimilianoviola.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-08T15:38:46.000Z","updated_at":"2026-03-08T22:15:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/massimilianoviola/llm-code-review","commit_stats":null,"previous_names":["massimilianoviola/llm-code-review"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/massimilianoviola/llm-code-review","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massimilianoviola%2Fllm-code-review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massimilianoviola%2Fllm-code-review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massimilianoviola%2Fllm-code-review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massimilianoviola%2Fllm-code-review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/massimilianoviola","download_url":"https://codeload.github.com/massimilianoviola/llm-code-review/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massimilianoviola%2Fllm-code-review/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34281700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-review","developer-tools","ollama","pre-commit-hook","qwen"],"created_at":"2026-06-13T10:33:12.278Z","updated_at":"2026-06-13T10:33:13.025Z","avatar_url":"https://github.com/massimilianoviola.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔍 LLM Code Review\n\nA git pre-commit hook that reviews your staged changes using a local LLM via [Ollama](https://ollama.com). No API keys. No cloud. Your code never leaves your machine.\n\n![demo](images/demo.png)\n\n### How it works\n\n1. You run `git commit`, the pre-commit hook kicks in\n2. Your staged diff is sent to a local Ollama model\n3. The model reviews your code for bugs, security issues, and style\n4. You get a verdict: ✅ PASS / ⚠️ WARN / ❌ FAIL\n5. You choose whether to proceed or abort as normal\n\nYou can also run `llm-code-review run` manually at any time.\n\n## 🚀 Quick start\n\n### 1. Install Ollama\n\nDownload from [ollama.com/download](https://ollama.com/download) or `curl -fsSL https://ollama.com/install.sh | sh` (macOS, Linux).\n\n```bash\nollama serve        # start the server\nollama pull qwen3.5:4b  # grab a model\n```\n\n### 2. Install llm-code-review\n\n📌 Requires Python 3.11+\n```bash\ngit clone https://github.com/massimilianoviola/llm-code-review.git\ncd llm-code-review\npip install -e .\n```\n\n### 3. Hook it up\n\n```bash\ncd your-repo\nllm-code-review install\n```\n\n### 4. Just commit\n\n```bash\ngit add . \u0026\u0026 git commit -m \"your message\"\n```\n\nThe review streams live to your terminal. You choose whether to proceed.\n```\n=== LLM Code Review ===\n\nVERDICT: PASS\nISSUES: None detected\nSUMMARY: README.md content updated successfully; no code or security issues found.\n\n  Verdict: PASS\n\n  Proceed with commit? [y/N]\n```\n\n### VS Code sidebar\n\nThe hook also runs (in non-interactive mode) when committing from the VS Code Source Control sidebar (takes its time). The review output is saved to `.llm-code-review.log`. On FAIL, the commit is blocked. Run `git commit` from the terminal to review interactively and accept anyway.\n\n## 🛠️ Commands\n\n| Command | Description |\n|---|---|\n| `llm-code-review run` | 📝 Review staged changes |\n| `llm-code-review check` | 🏥 Verify Ollama server \u0026 model |\n| `llm-code-review benchmark` | ⏱️ Compare model speeds — default: `qwen3.5:0.8b,2b,4b` |\n| `llm-code-review install` | 🪝 Install the pre-commit hook |\n| `llm-code-review uninstall` | 🗑️ Remove the pre-commit hook |\n\n### Options for `run`\n\n| Flag | Default | Description |\n|---|---|---|\n| `--model` | `qwen3.5:4b` | Ollama model to use |\n| `--url` | `http://localhost:11434` | Ollama server URL |\n| `--strict` | off | Also fail on ⚠️ WARN |\n| `--no-interactive` | off | Skip prompt, auto-decide |\n\n### Options for `benchmark`\n\n| Flag | Default | Description |\n|---|---|---|\n| `--models` | `qwen3.5:0.8b,qwen3.5:2b,qwen3.5:4b` | Comma-separated list of models |\n| `--url` | `http://localhost:11434` | Ollama server URL |\n\n### Options for `check`\n\n| Flag | Default | Description |\n|---|---|---|\n| `--model` | `qwen3.5:4b` | Model to check |\n| `--url` | `http://localhost:11434` | Ollama server URL |\n\n### Options for `install` / `uninstall`\n\n| Flag | Default | Description |\n|---|---|---|\n| `--repo` | cwd | Path to git repository (install hook remotely without cd-ing) |\n\n\n## ⚙️ Configuration\n\nOptionally drop a `.llm-code-review.toml` in your repo root to override defaults:\n\n```toml\nmodel = \"qwen3.5:4b\"\nollama_url = \"http://localhost:11434\"\nstrict = false\ntimeout = 120\n```\n\n**Precedence** (each layer overrides the previous): defaults → `.llm-code-review.toml` → CLI flags\n\n\n## 🧑‍💻 Development\n\n```bash\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install -e \".[dev]\"\n```\n\n```bash\npytest\nruff check --fix\nruff format\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassimilianoviola%2Fllm-code-review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmassimilianoviola%2Fllm-code-review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassimilianoviola%2Fllm-code-review/lists"}