● livePython · JS · TS · Java · Go · PHP·GPLv3

Code review, rules first, model second.

Paste code and press Review. 31 static rules flag secrets, injection and common bugs in under a millisecond. Then an AI review streams in, issue by issue, looking for what the rules can't see, and every fix is shown as a diff.

Demo password: demo1234. Pick one of the samples (each has planted bugs) and press Review.

The X factor

Two passes, each doing what it's good at.

Rules are instant, free and give the same answer every time. A model can follow logic. BugLens runs both, and tells the model what the rules already found.

⚡

Static rules, instantly

Hardcoded secrets, SQL and shell injection, eval, unsafe YAML and pickle, disabled TLS checks, == in JavaScript. Where the fix is mechanical (== None → is None), the rule makes it.

≋

AI review, streamed

Issues arrive one by one over Server-Sent Events: logic errors, edge cases, missing error handling, and the fixes rules can't make, like a parameterised query.

±

Fixes as diffs

Each fix is a find/replace that's applied only if it matches exactly one place. The result is shown side by side or unified, with changed words highlighted.

Preview

What it looks like

A finished review with the annotated code and issue list, one issue opened with its own before and after, and the full suggested diff.

Review
A finished review: annotated code on the left, issues by severity on the right
One issue
An issue card opened, showing the explanation and its fix
Suggested diff
Side-by-side diff of the original and suggested code
Under the hood

Key concepts & stack

React 19TypeScriptViteFastAPISSESQLAlchemyLangChainGroqgpt-oss-120bPostgreSQLpytestVitest

Masked scanning

Rules match against a copy of the code with strings and comments blanked out, same length, so eval( in a docstring isn't flagged and line numbers still match.

Find/replace fixes

Asked for the whole corrected file, the model reformatted everything. Now each issue carries find and replace, and a fix that doesn't match is dropped instead of guessed.

Repeats become fixes

When the model re-reports a rule finding anyway, it's merged into that finding as its fix instead of showing up twice.

Own diff and SSE parser

An LCS line and word diff and a small SSE reader over fetch, so the review can be POSTed and streamed.

Works without a key

With no LLM key, or the AI box unticked, you still get the rules and their fixes.

Any OpenAI-compatible model

Groq by default, or OpenAI, or a local Ollama, through one LangChain ChatOpenAI client.

Run it

Run your own

A Groq key is free; without one, BugLens still runs the static rules.

API

  1. 1
    Install, then set APP_PASSWORD and LLM_API_KEY in .env:
    cd backend && uv sync
    cp .env.example .env
  2. 2
    Start it on port 8000:
    uv run uvicorn app.main:app --reload

App

  1. 1
    Install and start Vite:
    cd frontend && npm install
    npm run dev
  2. 2
    Open it, pick a sample and press Review:
    http://localhost:5173