Verify what a linter cannot.
Codelight turns the architectural rules you repeat in code review into focused checks for every diff. Each verifier asks one model one yes-or-no question about the files its path globs match.
- id: no-silent-except
paths: ["**/*.py"]
severity: warn
assert: >
No exception handler discards an exception without either logging it or
re-raising.$ codelight
uncommitted changes - 2 changed file(s)
→ no-silent-except [warn]
app/ingest/worker.py
judging 1 verifier(s) with claude-opus-5
[WARN] no-silent-except
The added handler at app/ingest/worker.py:88 catches OSError and its body
is `pass`, so a failed fetch leaves no record.
→ app/ingest/worker.pyTests tell you if code works. Linters enforce rules that a program can decide. Neither can tell you if a change follows the local design choices that make your codebase coherent:
- handlers do not swallow exceptions;
- new endpoints declare a timeout;
- migrations are reversible;
- logs never contain credential values.
These rules often live only in the heads of experienced maintainers. That does not scale when agents write and merge more code.
Codelight gives each rule a small, readable check. Path globs select the right diffs. One assertion stays easier to predict than a broad review prompt with many competing priorities.
| Need | Best tool |
|---|---|
| Formatting, types, fixed lists, or exact structure | Linter, type checker, or test |
| One contextual convention on a diff | Codelight verifier |
| Broad review of a risky change | Agentic code review |
Codelight does not replace deterministic checks or human judgment. A verifier is a model judgment, not a proof. Test every verifier in both directions before you trust it.
Install the CLI:
go install github.com/oliverwehrens/codelight/cmd/codelight@latestAsk your coding agent to create rules grounded in your repository:
Read the output of
codelight --specin full, then propose verifiers for this repository. Ground every verifier in a convention this codebase already holds. Test each verifier in both directions, three runs each.
Review the generated files in .codelight/verifiers/, then check that their
globs match real files without making a model call:
codelight --auditRun Codelight against uncommitted changes:
codelightIt can also judge staged changes or a whole branch:
codelight --staged
codelight --base mainRequires Go 1.25+. Developed and tested on Linux and macOS. Windows is not supported.
- Getting started — install, create, test, and run a verifier
- Writing verifiers — the full authoring guide, also available through
codelight --spec - CLI reference — flags, exit codes, costs, and verifier fields
- Provider configuration — Anthropic, Claude CLI, Codex CLI, OpenAI, local models, and custom prompts
- Development — build, test, and understand the repository
- Examples — starter rules and examples for common stacks
Apache License 2.0. See LICENSE and NOTICE.
Claude, Codex, and Matt Pocock's skills were used to develop Codelight.