Skip to main content

About drep

The project was rebuilt in Rust and deliberately narrowed to one job: review a local change before it becomes someone else's problem.

What is drep?

drep is a local commit gate. It discovers the linters, formatters, compilers, and analyzers a repository already configures, runs the applicable checks over changed files, and sends those changes to an LLM for a second kind of review.

It runs on git commit and git push, or directly through drep check. It is a single Rust binary with no server, background service, hosted-platform client, or drep account.

Deterministic First

drep runs the configured tools each supported ecosystem actually ships. Their findings remain authoritative, and a configured check that cannot run is never called a pass.

Semantic Second

The model looks for concrete, reachable defects in the changed code. Its findings advise by default because model judgment is not deterministic.

Local Control

Repository state, credentials, acknowledgements, and cache stay on the machine. Administrators can enforce a site policy above repository configuration.

Provider Choice

Use local endpoints, hosted APIs, coding-plan endpoints, the OpenAI API, or the Codex CLI authenticated through ChatGPT.

Why two layers?

LayerGood atDefault gate behavior
Repository-native toolsSyntax, types, formatting, and codified project rulesBlocking
LLM reviewCross-line reasoning and concrete defects that are difficult to encode as rulesAdvisory; opt into gating with --fail-on

The split is by source rather than by severity. A linter error is repeatable; an LLM's “error” label still reflects a probabilistic judgment.

Language and tool support

LanguageFilesDeterministic tools
Python.pyruff
JavaScript.js, .jsx, .mjs, .cjsESLint
TypeScript.ts, .tsx, .mts, .ctsESLint and tsc
Go.gogofmt and go vet
Rust.rsclippy
Java.javacheckstyle
Kotlin.kt, .ktsktlint
Scala.scala, .scNone
Groovy.groovy, .gradleNone
Shell.sh, .bashshellcheck
Swift.swiftswiftlint
C.c, .hcppcheck
C++.cpp, .hpp, .cc, .hh, .cxx, .hxxcppcheck
C#.csdotnet format
Ruby.rb, .rake, .gemspec, Gemfile, Rakefilerubocop
PHP.phpphpcs
Vue.vueESLint
Svelte.svelteESLint
Terraform.tf, .tfvarstflint
Elixir.ex, .exscredo
SQL.sqlsqlfluff
DockerDockerfile, Containerfile, .dockerfilehadolint
Lua.lualuacheck

Scala and Groovy still receive semantic review. They have no deterministic tool because scalafmt, scalafix, and CodeNarc are build-plugin-first rather than standalone command-line tools drep can invoke.

Extensionless Dockerfile, Gemfile, and Rakefile names are recognized directly. Dockerfile and Containerfile variants such as Dockerfile.dev and Containerfile.prod are recognized too, while an actual extension still takes precedence.

Repository-local executables take precedence over PATH, and configuration is resolved from the nearest applicable ancestor. This lets monorepo packages use their own configs while sharing hoisted tools.

What drep keeps

  • drep.toml for provider and model configuration
  • An optional machine-level site.toml for concurrency ceilings and repository refusal markers
  • A private, endpoint-keyed credential store for HTTP API keys
  • Model metadata used by interactive setup
  • Source-context acknowledgement fingerprints
  • Content-addressed response cache entries
  • Worktree-local semantic-review round state under Git metadata

There is no application database and no remote drep service.

What changed from 1.x

This was not a line-for-line language port. The former Python application centered on hosted Git platforms, pull requests, webhooks, and a long-running service. The Rust project centers on local Git state and a short-lived commit gate. Old commands and configuration files do not map directly to the current CLI.

Current release

v3.1.0 adds Lua .lua files and their configured luacheck gate without changing the six-command CLI. Luacheck runs only when the repository opts in with .luacheckrc; a repository-local lua_modules/bin/luacheck takes precedence over PATH. The release is available as native macOS and Linux archives, through Homebrew, and from crates.io.

Ready to try the current drep?

Install drepQuick Start