Check code against requirements written in Markdown.
curl -fsSL https://tenet-contracts.com/install.sh | bash
export OPENROUTER_API_KEY='your-key'Binaries support macOS and Linux on ARM64 and x86-64. Provider setup also covers TypeSafe.
Write numbered contracts under .contracts/, then run:
tenet validate # Check contract documents offline
tenet check # Assess the current repository
tenet check --base origin/main # Assess changes, assuming a valid baseFor example, a contract can require database failures to reach the caller rather than become empty results. Tenet checks relevant files and their combined context, then reports one conclusion per contract. Each model conclusion includes confidence. Unresolved contracts need follow-up but do not fail the command.
Read every applicable contract during a review. Tenet helps choose where to investigate first; the outer reviewer owns the final judgment. See Reviews.
tenet eval --contract database-failures
tenet eval fixtures/cache --case broken-cache-hit --strictEvaluations compare judgments with expected answers. Use inline examples for a small code fragment, or repository fixtures for a full directory and optional patch. Expected answers are never sent to the model.
tenet check --base origin/main --json > review.jsonlA reviewer investigates failures and unresolved contracts with ordinary repository tools. Model judgments can be wrong; a successful exit does not mean every contract was verified. Selected code and contract rules go to the configured provider, using your API key.
Read commands, output, and reviewing with an agent. The same docs are at tenet-contracts.com/docs.
cargo build --release --locked -p tenet
cargo install --path crates/tenet --lockedMIT.