Skip to main content

CLI Reference

drep v3.1.0 has six command groups. The binary's --help output is authoritative for the installed version.

Command overview

CommandPurpose
drep checkRun deterministic tools and LLM review on local paths or Git-selected changes
drep lint-docsRule-based Markdown linting with no LLM or network
drep doctorReport detected languages, tools, and provider readiness
drep initWrite drep.toml and optional Git hooks
drep authManage endpoint-keyed credentials without printing them
drep acknowledgeSuppress a finding until its source context changes

drep check

bash
drep check [OPTIONS] [PATH]...
OptionMeaning
--stagedCheck files staged for commit
--diff <REF>Check changes since a base reference
--tip <REF>Choose the diff tip instead of HEAD; valid with --diff
--pre-commit-pushRead the pushed base and tip from pre-commit's environment
--format text|jsonSelect human or machine-readable output
--fail-on info|warning|errorAlso block on LLM findings at or above the chosen severity
--cache-onlyUse only cached LLM reviews; an uncached file exits 3
--push-gateWarm cold reviews and request a fresh push connection
--max-review-rounds <N>Override the repository's maximum fresh LLM review rounds; N must be at least 1
--unlimited-reviewsExplicitly permit fresh LLM review rounds without a limit for this invocation
bash
drep check --staged
drep check --diff origin/main
drep check --max-review-rounds 5
drep check --unlimited-reviews
drep check --fail-on error
drep check --format json

Authoritative staged, diff, pre-commit-push, and bare push-gate checks allow three fresh, finding-producing semantic-review rounds per branch and worktree by default. At the limit, cached reviews and deterministic tools still run, while a cold semantic miss becomes an unanalyzed result and exits 2. JSON output's review object reports counted, reset, and explicitly unlimited states.

drep lint-docs

Lint Markdown without loading an LLM configuration or contacting the network.

bash
drep lint-docs
drep lint-docs --staged --fail-on error
drep lint-docs --strict

--strict is shorthand for --fail-on info. The published hook uses --fail-on error so it blocks rendering-breaking defects without turning whitespace into a commit failure.

drep doctor

bash
drep doctor [PATH]
drep doctor --config alternate.toml

The report includes machine-level site policy, applied provider concurrency ceilings, repository refusal, protocol-key status, and the effective request-header names for each HTTP provider without printing their values. If policy refuses review or cannot be evaluated, doctor skips the auth store, credential commands, and Codex probing.

drep init

Without --provider, an interactive terminal runs the wizard. Available presets are local, openrouter, zai, minimax, kimi, openai, codex, and custom.

bash
drep init
drep init --provider codex --hooks both
drep init --provider custom --endpoint http://localhost:1234/v1 --model local-model
drep init --hooks none

--path <DIR> selects a repository, --model <MODEL> overrides the preset model, and --non-interactive or --interactive explicitly controls whether the wizard may prompt. --force authorizes replacement of an existing drep.toml or a drep-managed hook. --no-gitignore keeps drep init from adding drep.toml to the ignore file.

drep auth

bash
drep auth list
drep auth login --provider kimi
drep auth login --endpoint https://example.com/v1
drep auth logout --endpoint https://example.com/v1

No auth command prints a stored key.

drep acknowledge

bash
drep acknowledge <fingerprint> [<fingerprint>...]

Fingerprints come from LLM findings. The acknowledgement remains valid only while the surrounding source context is unchanged.

Exit codes for check

CodeMeaning
0All required analysis ran; nothing blocks
1Blocking findings
2Required analysis did not run, including site-policy refusal or credential-command failure
3Cache-only miss or successful push-gate warm requiring a fresh push