Quick start
Get your first list of unused code, duplication, and complexity hotspots in under a minute. Then add fallow to VS Code, CI, MCP, or Fallow Cloud.
In under a minute, you get a list of unused code, duplication, and complexity hotspots in your project. Everyone starts with the same command. At the end, pick the integration that fits your work.
1. Run fallow
From your project root, run:
npx fallow
This command runs three analyses in one pass:
- Dead code: unused files, exports, dependencies, cycles, boundaries, and more
- Duplication: repeated logic across files
- Health: complexity hotspots and refactor targets
Built-in plugins cover Next.js, Vite, Ember, Wuchale, Jest, Tailwind, PandaCSS, Contentlayer, tap, tsd, and more. The first run needs no configuration.
2. Run the focused commands you'll use most
npx fallow dead-code # Cleanup candidates
npx fallow dupes # Repeated logic
npx fallow health # Complexity and refactor targets
npx fallow review # Advisory review brief over changed files (always exits 0)
npx fallow fix --dry-run # Preview automatic cleanup
dead-codereports unused files, exports, types, dependencies, circular dependencies, and boundary violations. See the dead code guide.dupesfinds AST-based duplicates in the defaultmildmode. To also find clones with renamed variables, add--mode semantic. See the duplication guide.healthreports complexity findings, maintainability per file, hotspots, and ranked refactor targets. See the health explanation.fix --dry-runshows the automatic cleanup without changing files. To apply it, remove--dry-run. See the auto-fix guide.
To clean up or refactor TypeScript, add --type-aware when aliases,
re-exports, class contracts, packages, or exact consumers affect the
decision. This optional semantic pass is slower. See
Type-aware TypeScript analysis.
3. Pick your next step
Does your existing repo have a backlog of findings? Follow Adopt Fallow in an existing repo for a step-by-step cleanup. Then come back here to set up CI or VS Code.
Get real-time diagnostics, Code Lens above exports, and one-click fixes.
Use fallow as a PR and merge gate, with SARIF or MR annotations.
Add MCP to give Claude Code, Cursor, and other agents structured tool calls.
Add production execution data to fallow health.
Optional: create a config
Fallow works without a config file. To customize it, run:
fallow init
fallow init detects your project structure and writes a config for it. It also adds .fallow/ to your .gitignore.
{
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/schema.json",
"entry": ["src/workers/*.ts", "scripts/*.ts"],
"ignorePatterns": ["**/*.generated.ts"],
"rules": {
"unused-files": "error",
"unused-exports": "warn",
"unused-types": "off"
}
}Optional: Fallow Cloud
The static layer of fallow is free and open source (MIT). To learn which code actually executed in production, add Fallow Cloud, the paid product. A single local capture is free. The trial below turns on continuous and multi-capture monitoring for 30 days:
npx fallow license activate --trial --email you@company.com
npx fallow coverage setup
npx fallow health --runtime-coverage ./coverage
Before you start, read Static analysis vs production data to learn how the two layers differ. Then follow the runtime coverage guide for the setup.