Skip to content

CodeKnife

One binary that checks Rust, TypeScript, JavaScript, Python and Go code for dead code, clones, weak tests, security footguns and architecture drift, then fails the build only on findings that are new or worse.
13
Analysis blades, each also a standalone command
98
Rule IDs: 89 from the blades, 5 guard, 4 deep mode
5
Languages: Rust, TypeScript, JavaScript, Python, Go
7
MCP tools for coding agents over stdio
Terminal window
curl -fsSL https://raw.githubusercontent.com/robertguss/codeknife/main/scripts/install.sh | bash

Prebuilt binaries exist for Linux x86_64 and macOS on Apple silicon. On other platforms the script builds from source with Cargo. See Installation for release archives, Homebrew and source builds.

Terminal window
cd your-repo
codeknife check

codeknife check needs no configuration file. It parses the repository, runs the static blades, and exits 0 (pass), 1 (fail) or 2 (error). The Quickstart walks through a first run, a fix, and a baseline.

One quality gate

codeknife check runs ten static blades and the loosening guard in parallel. Errors and warnings fail the run; info findings do not.

The Check Gate →

Ratchet baseline

codeknife.baseline records the findings a repository already has, so the gate fails only on findings that are new or worse.

Ratchet Baseline →

Loosening guard

Raised thresholds, disabled blades, new excludes, a grown baseline and new suppression comments are compared with git and fail the gate.

Loosening Guard →

Thirteen blades

Comments, architecture, clones, dead code, slop, security, tests and CRAP, mutation testing, churn, blast radius, dependencies, docs drift and an HTML map.

Rule Catalogue →

Autofix without a model

codeknife fix plans text edits from parse trees for a fixed set of rules. It is a dry run until you pass –write.

Autofix Engine →

Mutation testing

codeknife mutate changes covered code in the functions you pick and reports the mutants your tests did not catch.

Mutation Testing →

Built for coding agents

A compact Agent output format, ranked work orders, target dossiers, a reuse search, and codeknife mcp with seven tools.

MCP Server →

Anti-tamper hooks

codeknife hook claude and codeknife hook cursor deny agent tool calls that would edit the gate’s files or skip git hooks.

Anti-Tamper Hooks →

Reports for people and CI

Human, Agent, JSON, SARIF 2.1.0 and Markdown output, plus a 0 to 100 health score with a recorded trend.

Output Formats & Exit Codes →