Skip to main content
Fallow works across three tracks: agents, humans, and CI. Pick your starting point.
1

Run your first analysis

Any agent that can execute shell commands can run fallow. Use --format json for structured output:
npx fallow check --format json
Fallow auto-detects your frameworks via package.json and returns unused files, exports, dependencies, types, and more as structured JSON.
84 built-in plugins cover Next.js, Vite, Jest, Tailwind, and 75+ more. No configuration needed. Agents can run fallow on any project immediately.
2

Find duplicated code

npx fallow dupes --format json
This finds copy-pasted code blocks across your codebase.
3

Auto-fix

Preview what would be removed:
npx fallow fix --dry-run --format json
Apply fixes (use --yes to skip confirmation in agent workflows):
npx fallow fix --yes --format json
4

Add MCP (optional)

For agents that support MCP, add structured tool calling:
{
  "mcpServers": {
    "fallow": {
      "command": "fallow-mcp"
    }
  }
}
This exposes analyze, find_dupes, fix_preview, fix_apply, and project_info as typed tools. Full MCP setup

Create a config (optional)

For customization, generate a config file:
fallow init
{
  "$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"
  }
}
Configuration is shared across all three tracks. The same .fallowrc.json applies whether fallow is invoked by an agent, a developer, or CI.
Migrating from knip or jscpd? Fallow can auto-migrate your existing config. See the knip migration guide or jscpd migration guide.

Next steps

Agent integration

Full guide for CLI and MCP agent workflows.

Dead code analysis

Learn about the 11 issue types fallow detects.

Code duplication

Explore detection modes and clone families.

Configuration

Customize entry points, rules, and ignore patterns.