Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fallow.tools/llms.txt

Use this file to discover all available pages before exploring further.

Fallow and knip both detect unused code in TypeScript and JavaScript projects. Knip is a mature tool with broad plugin coverage. Fallow is a Rust-native alternative that goes beyond unused code: it also covers code duplication, complexity hotspots, maintainability scoring, and architecture boundary enforcement in a single binary. Use this comparison to decide which tool fits your project.

Performance

Fallow is a compiled Rust binary with rayon-based parallelism. Knip runs on Node.js. Version 6 adopted the Oxc parser via NAPI bindings, which significantly narrowed the gap with v5, but knip remains single-threaded.
ProjectFilesfallowknip v5knip v6vs v5vs v6
zod17425ms650ms330ms26x13x
preact244200ms911ms2.15s5x11x
fastify28627ms933ms222ms34x8x
vue/core52268ms---*---*------
TanStack/query901330ms2.66s1.08s8x3.3x
vite1,420378ms---*---*------
svelte3,337363ms1.95s714ms5x2x
next.js20,4161.72s---*---*------
Benchmarked on 8 real-world open-source projects from 174 to 20,416 files against fallow 2.46.0, knip 5.87.0, and knip 6.6.1 on Apple M5, 32 GB RAM, Node 22. Median of 5 runs with 2 warmups. On small-to-medium projects, fallow is 5-34x faster than knip v5 and 2-13x faster than knip v6. On the current vite, next.js, and vue/core fixtures, knip errors out without producing valid JSON results; fallow is the only tool that completes. * knip errors on next.js, vite, and vue/core (exits without valid results).

Why fallow is faster

Factorfallowknip
LanguageCompiled Rust binaryNode.js runtime
ParserOxc (native Rust)Oxc via NAPI bindings
Parallelismrayon work-stealing across all coresSingle-threaded
StartupInstant (no JIT warmup)Node.js bootstrap + module loading
MemoryFlat contiguous data structuresGC-managed heap

Memory and large codebases

Fallow uses flat edge storage and lock-free parallel resolution, so it handles large monorepos well. Memory usage scales linearly with file count rather than with the Node.js GC heap.

Detection capabilities

Capabilityfallowknip
Unused filesYesYes
Unused exportsYesYes
Unused typesYesYes
Unused dependenciesYesYes
Unused devDependenciesYesYes
Unused enum membersYesYes
Unused class membersYesNo (dropped in v6)
Unresolved importsYesYes
Unlisted dependenciesYesYes
Duplicate exportsYesNo
Code duplicationYes (fallow dupes)No
Circular dependenciesYesYes
Complexity hotspotsYes (fallow health)No
Architecture boundary violationsYesNo
Feature flag detectionYes (fallow flags)No
CRAP score thresholds (--max-crap)YesNo
Runtime coverage (paid)Yes (--runtime-coverage)No
TS namespace declaration membersNoYes (new in v6)

Plugin coverage

Metricfallowknip
Total plugins94147
Plugins with config parsing33
Custom plugin supportYes (JSONC, JSON, TOML, or inline)Yes (JS functions)
Knip has broader plugin coverage, particularly for niche and legacy tooling. Fallow covers all major frameworks and the most popular tools across every category.
Both tools have plugins for: Next.js, Nuxt, Remix, SvelteKit, Gatsby, Astro, Angular, NestJS, Vite, Webpack, Rollup, Vitest, Jest, Playwright, Cypress, Storybook, ESLint, Biome, TypeScript, Babel, Tailwind, PostCSS, Prisma, Turborepo, Nx, semantic-release, and many more.
If your project uses a framework that fallow doesn’t have a plugin for, you can create a custom plugin in JSONC, JSON, or TOML. No code required.

Features fallow has that knip doesn’t

SARIF output

Upload results directly to GitHub Code Scanning with --format sarif. Integrated into your PR review workflow.

Baseline comparison

--save-baseline and --baseline for incremental CI adoption. Only fail on new issues, not pre-existing ones.

Inline suppression

// fallow-ignore-next-line and // fallow-ignore-file comments for granular, per-line suppression without config changes.

Code duplication

Built-in fallow dupes with four detection modes, clone family grouping, cross-language matching, and refactoring suggestions.

Complexity and health score

fallow health reports cyclomatic / cognitive complexity, CRAP score, risk profiles, and a composite health score. --max-crap, --max-cyclomatic, and --max-cognitive gate CI on per-function thresholds.

Architecture boundaries

Enforce cross-package or cross-layer import rules. Boundary violations fail the build without needing ESLint plugins.

Feature flag detection

fallow flags detects feature flag patterns across the codebase, cross-references them with dead code, and exports to SARIF, markdown, and MCP.

Combined audit

fallow audit runs dead code, health, and duplication with a single verdict. Per-analysis baselines (--dead-code-baseline, --health-baseline, --dupes-baseline) let each slice use its own reference.

Standalone rule explainer

fallow explain <issue-type> prints rule rationale, a worked example, fix guidance, and the docs URL without running analysis. Knip has no equivalent. Closest analogs are Credo (mix credo explain) for Elixir and Biome’s build-time diagnostic explainer; only fallow ships a standalone CLI subcommand plus an MCP tool (fallow_explain) that agents can call before fixing a finding.

Git-aware analysis

--changed-since <ref> for file-level scoping and --changed-workspaces <ref> for monorepo-level scoping. Perfect for PR-only CI checks.

Workspace filtering

--workspace accepts comma-separated values, globs, and ! negations (-w 'apps/*' -w '!apps/legacy'). Works across every command.

Output grouping

--group-by owner|directory|package|section partitions findings. owner and section read GitHub / GitLab CODEOWNERS so unused code is routed to the right reviewer.

Auto-fix dry run

Preview all fixes with fallow fix --dry-run before applying. JSON output for programmatic review.

Trace and debug tooling

--trace FILE:EXPORT to trace export usage chains, --trace-file PATH for file edges, --trace-dependency PACKAGE for dependency usage, --performance for pipeline timing.

CSS Modules tracking

.module.css and .module.scss class names are extracted as named exports and tracked through styles.className member accesses.

MCP server

Built-in fallow-mcp exposes analyze, find_dupes, check_health, audit, check_runtime_coverage, and more as typed tools for AI agents.

Claude Code hooks

fallow hooks install --target agent installs a PreToolUse gate that blocks git commit / git push when fallow audit fails, with a structured envelope agents can act on.
Additional features:
  • Class member detection: Knip dropped this in v6; fallow retains it with decorator-aware skip logic for NestJS, Angular, TypeORM, etc.
  • Production mode: --production excludes test/dev files and detects type-only dependencies that should be devDependencies.
  • Duplicate export detection: Finds the same symbol exported from multiple modules.
  • TOML configuration: In addition to JSONC/JSON, fallow supports fallow.toml for teams that prefer TOML.
  • Cross-reference analysis: check --include-dupes finds dead code that is also duplicated, showing high-priority cleanup targets.
  • Runtime coverage intelligence (paid): V8 runtime evidence merged with static analysis via a signed sidecar. Adds hot/cold paths, runtime-weighted health scoring, and stale-flag evidence.

Features knip has that fallow doesn’t

More plugins

147 plugins vs 94. Knip covers more niche, legacy, and ecosystem-specific tooling.

Custom reporters

Write custom reporter functions in JavaScript for fully custom output formatting.

Tags filtering

--tags flag filters results based on JSDoc @public/@internal annotations.
Additional features:
  • TS namespace declaration member detection: New in v6, detects unused members in TypeScript namespace declarations (not import * as ns, fallow already handles that via namespace import narrowing).

When to choose fallow

Speed matters

Large codebases where sub-second analysis enables watch mode and tight CI feedback loops.

CI pipelines

SARIF for GitHub Code Scanning, baselines for incremental adoption, --changed-since for PR-scoped checks.

Dead code + duplication

Replace both knip and jscpd with a single tool. Cross-reference dead code with duplication for prioritized cleanup.

Gradual adoption

Per-issue severity rules (error/warn/off) and inline suppression comments let teams adopt incrementally.

AI-assisted development

Your team uses AI coding agents. Fallow provides --format json for CLI, an MCP server for typed tool calling, and --changed-since for PR-scoped checks.

When to choose knip

Niche plugins

Your project depends on a specific tool that only knip has a plugin for, and a custom plugin isn’t worth the effort.

Already working well

Knip is already integrated and performance isn’t a pain point. No reason to migrate for the sake of it.

Custom reporters

You need fully custom output formatting via JavaScript reporter functions.

Summary table

fallowknip
LanguageRustNode.js (TypeScript)
ParserOxc (native)Oxc (NAPI bindings)
Speed vs knip v62-13x faster on common casesBaseline
ParallelismMulti-core (rayon)Single-threaded
Dead code issue types1210
Code duplicationBuilt-inNot included
Complexity and health scoreBuilt-in (fallow health)No
Architecture boundariesYesNo
Feature flag detectionYes (fallow flags)No
Combined audit verdictYes (fallow audit)No
Plugins94147
Custom pluginsJSONC/JSON/TOMLJavaScript
SARIF outputYesNo
Baseline comparisonYes (per-analysis)No
Inline suppressionYesNo
Git-aware (--changed-since, --changed-workspaces)YesPartial
CODEOWNERS groupingYes (--group-by owner, section)Yes (reporter)
Workspace filtering (globs, negation)YesYes
Circular dependenciesYesYes
Auto-fixYesYes
Config formatsJSONC, JSON, TOMLJSON, TS
Runtime dependencyNone (standalone binary)Node.js
MCP serverBuilt-in (fallow-mcp)No

Migrating from knip?

If you’re coming from knip, fallow has a one-command migration path that automatically translates your configuration.

Migrate from knip

Automatic config migration with fallow migrate.

Quick Start

Get started with fallow in 2 minutes.