lenscheck-semantic-reviewer

See what a pull request actually changes — no LLM required

Git tells you what lines changed. Lenscheck tells you what they mean — and points you at the exact line to read.

A deterministic semantic PR reviewer for Python web apps. No AI black box, no LLM token bill — and your source never leaves your machine (only an abstract facts graph is sent to be ranked). Same PR in, same review out, every time.

No LLM Deterministic Your code never leaves Free in beta
reviewer pip install lenscheck-semantic-reviewer
contract pip install lenscheck-contract
★ Star on GitHub · · by Ankush Singh Gandhi · warriorwhocodes.com
The ecosystem

Two tools, one promise: always know what your backend does

Lenscheck looks at your backend from both sides — the diff from the outside and the running app from the inside. Each catches what the other structurally can't.

🔎

lenscheck-semantic-reviewer

Outside-in. A GitHub Action / CLI that reads the PR diff (AST, no LLM) and comments on what actually changed and where to look. Lives in your CI — one secret, zero code.

pip install lenscheck-semantic-reviewer · PyPI ↗

🛡️

lenscheck-contract

Inside-out. A library inside your Django app that records what it really does — routes, models, effects — fails CI on a risky change, and blocks undeclared calls at runtime.

pip install lenscheck-contract · PyPI ↗

Together they close the loop: the contract exports your app's real rules, and the reviewer enforces them on every PR — so a brand-new domain sneaking into a diff becomes a 🔴 critical alert grounded in fact, not a hunch. Explore lenscheck-contract →

The problem

A single PR can be 60 files and 18,000 lines

A normal line-diff buries the one change that matters — "user email now leaves the server" — under thousands of mechanical edits. You don't need to read all of it. You need to know what changed in behavior, how it flows, where to look, and whether it broke a promise.

$ lenscheck review . --pr 481   →   🔴 3   🟠 4   🟡 4   🟢 20
# 17,841 lines changed → 3 things to actually look at

🔴 NEW ENDPOINT  /api/companions/payment
   why: new endpoint exposes a PII path with open/unspecified auth
   flow: /api/companions/payment → CompanionPayment → {Order:write} → ext: PayTM
   investigate: payment_views.py:90  email → requests.post @ services.py:9

🟠 CHANGED       /api/orders/invoice
   why: new external call: razorpay.post  ·  money path

🟢 REFACTOR      /api/users/profile
   handler renamed, semantics unchanged — nothing to see
The whole idea, in one line

Code → facts → diff → show what matters

No running your code. No guessing. Just Python's own parser (AST) reading structure — the same three boxes, small.

ANALYZER

code → behavior facts

DIFFER

facts → what changed

SURFACE

rank + point at the line

See it

What changed → how it flows → where to look

A ranked list, an interactive flow graph for every change, and the exact file:line locations — in the terminal, a web UI, a PR comment, or your Security tab.

A finished Lenscheck review in the web UI
Why Lenscheck

Smart like a reviewer, exact like a scanner

LLM reviewers guess and bill per PR; static scanners flood you with whole-file noise. Lenscheck is deterministic and behavior-aware — it reports facts that trace to a file:line, stays silent on pure refactors, and learns the rules your code already keeps. It doesn't replace your tests — it sees a different layer: behavior at the endpoint.

LLM reviewersStatic scannersLenscheck
Deterministic · no token bill
Reviews the behavior change~
Refactor-stable (renames = no noise)
Learns your repo's own rules

See the full comparison — vs CodeRabbit, Copilot, SonarQube & Semgrep →

What it finds

One engine, the whole surface of your app

Every finding traces to an exact file:line — deterministic, honest about the unknown, and free.

🗺️

Repo map · NEW

lenscheck map — every endpoint grouped by app, worst-first. "What's here," not just "what changed."

🩸

Traced PII leaks

The exact field → the exact line where it leaves the app. Traced, not guessed.

🔒

Learned invariants

It mines the rules your code already keeps and flags the PR — and the commit — that breaks one.

📦

Dependency powers

Flags a bumped package that newly gains network / subprocess / native code.

💬

Inline + SARIF

Each finding pinned to its changed line, a sticky summary, a triage label, and the Security tab.

📊

Org roll-up

lenscheck digest — the open risky PRs across every repo, one number for leadership.

Explore all features — the map, the seven-edge lens, invariants & more →

Plans

Start free. Grow into the team features.

Lenscheck is free during the beta — request a token and go. Teams add private repos, the auto PR bot, and your own rules enforced across every repo.

Free beta

For individuals & open source.

Deterministic review + repo map
Public repos
CLI & GitHub Action
No LLM · your code never leaves
Community support
Get your free API token

Team most popular

Everything in Free, plus:

Private repos
Automatic PR review bot
Your rules — learned & enforced
Org dashboard + risk roll-up
Merge gating & higher volume
Request access

Enterprise

Everything in Team, plus:

SSO + audit logs
On-prem / self-hosted
Priority support & SLA
Security review & custom rules
Talk to us

Get your free API token

Invite-only while in beta — drop your details and I'll email your token. No card.

Prefer email? [email protected] · or read the docs

Get started

Install, add your key, review

Needs Python 3.8+ and git. Request a beta key to activate the reviewer — your source stays on your machine.

1

Install it

pip install lenscheck-semantic-reviewer
2

Add your beta key

export LENSCHECK_API_KEY=sk_live_...
3

Review a pull request

lenscheck review . --pr 481