Skip to main content

A Local Commit Gate for Code Quality

v2.5.0 — Rust, local, and focused

drep runs the linters and formatters your repository already configures, then sends only the code that changed to an LLM for review. It works at commit and push time as a single Rust binary.

Get Started View on GitHub
GitHub stars crates.io version Homebrew Latest GitHub release License

One Gate, Two Kinds of Evidence

Repository-Native Tools

drep discovers and runs the tools your repository already chose: ruff, ESLint, tsc, gofmt, go vet, and clippy. Their findings always block.

Changed-Code Review

The LLM sees the staged files or pushed diff, not an entire hosted repository. Findings are advisory unless you opt into a severity gate.

Local by Design

There is no server, database, platform account, or background service. Configuration, credentials, acknowledgements, and cached reviews stay on your machine.

Flexible LLM Backends

Use a local OpenAI-compatible endpoint, OpenRouter, Z.AI, MiniMax, Kimi, the OpenAI API, or the Codex CLI with a ChatGPT subscription. Ordered providers can fail over.

Review the Change Before It Leaves

Install a native Git hook once. drep runs locally when you commit or push, using the repository and credentials already on your machine.

git commit → inspect staged files
✓ Run configured deterministic tools
✓ Review the staged code with your provider
git push → inspect the pushed diff
✓ Compare the actual remote base and tip
✓ Warm review cache, then reconnect safely
drep acknowledge → quiet accepted findings
✓ Suppress by source-context fingerprint
✓ Re-report when the surrounding code changes

A Small, Explicit Scope

  • Deterministic checks — always block when configured tools fail
  • LLM review — advisory by default, optionally gated by severity
  • Content cache — avoids paying twice for the same review
  • Your provider choice — local, API-based, or ChatGPT-backed Codex

Get Started in Seconds

bash
# Homebrew (macOS or Linux)
brew install slb350/tap/drep

# Cargo
cargo install drep-ai
bash
# Configure the repository and its default pre-push hook
drep init

# See what drep will run
drep doctor

# Check staged changes now
drep check --staged

Read the Documentation