Ratchet finds the highest-impact fix in your codebase, ships it only if tests pass, and repeats. Your score only goes up.
How It Works
Ratchet automates the tedious parts of code improvement so you can focus on building.
Get an instant quality score across 6 dimensions — security, testing, type safety, performance, and more.
Let AI apply fixes automatically. It analyzes, proposes, builds, and tests each change before committing.
Your quality score climbs with every successful fix. If a change breaks tests, The Pawl instantly reverts it.
The Core Mechanic
A ratchet only turns one way. Each click advances the socket — it can never slip back. Ratchet works the same way on your code.
The Pawl is Ratchet's anti-rollback mechanism. Every proposed change runs your full test suite before it commits. If tests fail, the change is automatically reverted and the click doesn't count.
The result: a branch of commits that only ever moves forward. Every merged click is a proven improvement — no exceptions.
Real Transformation
This is a real fix from Click 1 — removing an empty catch that silently swallows errors. Ratchet found it, fixed it, ran tests, and committed.
Commands
Ratchet covers the full improvement lifecycle — from scoring where you stand, to finding your highest-impact fixes, to autonomously shipping them, to tracking progress in CI.
Get an objective quality score across six dimensions — code quality, testing, security, error handling, performance, and type safety. Auto-detects your language. Use --baseline to save your score and track deltas over time. Use --diff main to scan only changed files for PR-scoped reviews.
The main loop. Ratchet reads your codebase, identifies the highest-impact fix available, applies it, runs your test suite, and only commits if everything passes. Give it 7 clicks and watch your score climb. Failed tests mean zero regression — the bad click simply vanishes.
ratchet torque --clicks 7Targeted single-file or single-function fixes without spinning up a full torque session. Perfect for addressing that one function your code review flagged, or patching a security issue before it reaches production.
ratchet improve --file auth.tsGenerate a self-contained interactive HTML dependency graph — every file, every import, color-coded by health and sized by blast radius. Find circular dependencies, identify oversized modules, and get a spatial sense of your codebase at a glance.
ratchet vision --openSee your top 3 highest-impact issues with exact point predictions — "fixing X would improve your score to Y." Know where to focus before spending a single AI credit. Free, instant, zero config.
ratchet quick-fixGitHub Action drops your score + delta into every PR comment automatically. Use --diff main to scan only changed files. Use --baseline to track improvement over time. One line in your workflow.
Stop guessing what "clean code" means on your project. Ratchet produces an objective, reproducible quality score across every dimension that matters for production systems.
Run it before a sprint to find your biggest risks. Run it after torque to measure progress. Track it over time to prove your codebase is improving.
Run ratchet vision --open and get a self-contained HTML file: an interactive force-directed graph of every file and dependency in your project.
Nodes glow green when healthy, amber when there are issues, red when critical. Node size reflects blast radius — the larger it is, the more your codebase depends on it.
Generated as a single HTML file. No server, no npm, no build step. Open in any browser.
FAQ
Everything you need to know before you start.
--language to specify or let Ratchet auto-detect. Python, Go, Rust, Ruby, Java, and more are supported.
--diff main to scan only changed files, --baseline to track improvement over time, and --fail-on 80 to block merges below your threshold. Available on Pro and above.
ratchet quick-fix analyzes your scan results and shows the top 3 highest-impact issues with exact point predictions — e.g., "fixing empty catches would improve your score to 89." It's free, instant, and helps you decide where to focus before spending AI credits on torque/improve.
ratchet scan --baseline to save your current score. Every future scan shows the delta — overall and per-category, color-coded green/red. It's stored locally in .ratchet/baseline.json and works great with CI to track improvement commit by commit.
Pricing
Start free. Level up when your codebase demands it.
Need more cycles? $0.75/cycle on any paid plan. · Teams? Contact us for multi-seat pricing.