✓ Copied to clipboard
How It Works Commands Scoring Vision Pricing Sandbox Docs
Try Sandbox Get Started
v1.0.8 — Now with Vision support

Stop shipping
tech debt.

Ratchet is an AI-powered CLI that scores, fixes, and tests your code automatically — one committed improvement at a time.

$ npm install -g ratchet-run
Try it in your browser
zsh — ratchet
ratchet torque --clicks 7 Target : error-handling Path : src/ Clicks : 7 Score: 72/100 (9 issues found)
Click 1 — passed [a3f9b21] — Score: 72 → 75 (+3) Click 2 — tests failed · rolled back Click 3 — passed [7bc1d44] — Score: 75 → 78 (+3) Click 4 — passed [2e8f053] — Score: 78 → 81 (+3) Click 5 — tests failed · rolled back Click 6 — passed [9da3c17] — Score: 81 → 83 (+2) Click 7 — passed [f81b44a] — Score: 83 → 84 (+1) Done. 5 landed · 2 rolled back · 3m 47s Score: 72 → 84/100 (+12)

Three steps to better code

Ratchet automates the tedious parts of code improvement so you can focus on building.

Step 01

Scan & Analyze

Get an instant quality score across 6 dimensions — security, testing, type safety, performance, and more.

ratchet scan
🔍
Step 02

Torque & Fix

Let AI apply fixes automatically. It analyzes, proposes, builds, and tests each change before committing.

ratchet torque --clicks 7
Step 03

Watch It Climb

Your quality score climbs with every successful fix. If a change breaks tests, The Pawl instantly reverts it.

ratchet vision --open
📈

Built like a ratchet wrench.

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 — Anti-Rollback

Your score can only go up.

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.

Analyze
Propose
Build
Test
Commit ✓
Start improving →
Click 1 — removed empty catches [a3f9b21]
+3
Click 2 — tests failed · rolled back
−0
Click 3 — typed API responses [7bc1d44]
+3
Click 4 — split 80-line function [2e8f053]
+3
Click 5 — tests failed · rolled back
−0
Click 6 — added structured logging [9da3c17]
+2
Click 7 — stricter null checks [f81b44a]
+1
5 landed  ·  2 rolled back  ·  Score: 72 → 84/100 (+12)

Four commands. Every angle covered.

Ratchet covers the full improvement lifecycle — from scoring where you stand, to autonomously fixing what needs fixing, to visualizing the big picture.

📊

scan

Get an objective quality score across six dimensions — code quality, testing, security, error handling, performance, and type safety. Works on any language, any size project. Run it locally or pipe the JSON output to your own dashboards.

ratchet scan

torque

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 7
🎯

improve

Targeted 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.ts
🌐

vision

Generate 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 --open
my-api/
Production Readiness Score
84/100
Code Quality 20/24
Testing 17/20
Security 13/16
Error Handling 13/14
Performance 12/14
Type Safety 9/12
ratchet scan

A number for every file.
Not just a vibe.

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.

Code Quality
Testing
Security
Error Handling
Performance
Type Safety
ratchet vision --open

A living map of
your codebase — color-coded by health,
sized by risk.

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.

Green — Score ≥ 80. Healthy, well-tested, low risk.
Amber — Score 50–79. Issues present, improvement needed.
Red — Score < 50. Critical attention required.

Generated as a single HTML file. No server, no npm, no build step. Open in any browser.

index.ts auth.ts router.ts db.ts utils.ts config.ts Score: 84/100 14 files · 2 critical Healthy ≥80 Issues 50–79 Critical
ratchet vision — interactive graph

Questions developers ask.

Everything you need to know before you start.

What AI model does Ratchet use?
+
Ratchet works with Claude, GPT, or any OpenAI-compatible API. You bring your own API key — your models, your rate limits, your preferences. No vendor lock-in.
Will it break my code?
+
No. The Pawl mechanism reverts any change that fails your test suite. Your score can only go up — never a regression. Failed clicks don't count and leave no trace in your git history.
What languages are supported?
+
Any language. Ratchet works at the file and project level — not the AST level — so it评分 doesn't care about your language. TypeScript, Python, Go, Rust, Ruby, Java, C++, whatever you're running.
How is this different from a linter?
+
Linters flag issues. Ratchet fixes them, runs your tests against the fix, and commits it if everything passes. It's fully autonomous — you click start, it does the work, you merge the result.
Can I use it in CI/CD?
+
Yes. Run ratchet scan --fail-on 80 and Ratchet exits non-zero if your score drops below the threshold. A GitHub Action is available on the Team plan for first-class pipeline integration.
Is my code sent to the cloud?
+
Only to your chosen AI provider. Ratchet itself stores nothing — no code, no scores, no metadata. The self-hosted option on the Enterprise plan keeps everything inside your network.

Simple, honest pricing.

Start free. Level up when your codebase demands it.

Monthly Annual  Save ~20%
Free
$0
 
See your score. Feel the itch.
  • Scan: unlimited
  • Vision: 1/week
  • Quality score across 6 dimensions
  • JSON & Markdown export
Get Started
Builder
$12
/mo
BYOK. Your key, your rate.
  • 30 improvement cycles/month
  • BYOK — bring your own API key
  • ratchet improve access
  • Everything in Free
Start Building
Team
$149
/mo
Hosted. No API key needed.
  • 5 seats included
  • 500 improvement cycles/month
  • Hosted — no API key required
  • CI/CD GitHub Action
  • Slack & Discord notifications
  • Everything in Pro
Start Team Trial
Enterprise
Custom
 
Air-gapped. Your rules. Your SLA.
  • Unlimited cycles
  • Self-hosted / air-gapped
  • Custom scoring rules
  • SLA + dedicated support
  • Everything in Team
Contact Sales

Need more cycles? $0.75/cycle on any paid plan.

Get Started

Ship better code,
every single day.

Install Ratchet globally and point it at any project. No configuration required to start.

1
Install
npm install -g ratchet-run
2
Scan your codebase
ratchet scan
3
Start improving
ratchet torque --clicks 7

Prerequisites: Node.js ≥ 18, git

View Pricing See Vision →