fallow

安装量: 740
排名: #5249

安装

npx skills add https://github.com/fallow-rs/fallow-skills --skill fallow

Fallow: codebase intelligence for JavaScript and TypeScript Codebase intelligence for JavaScript and TypeScript. The free static layer finds unused code, circular dependencies, code duplication, complexity hotspots, architecture boundary violations, and feature flag patterns. The optional paid runtime layer (Fallow Runtime) merges production execution data into the same fallow health report for hot-path review, cold-path deletion confidence, and stale-flag evidence. 90 framework plugins, zero configuration, sub-second static analysis. When to Use Finding dead code (unused files, exports, types, enum/class members) Finding unused or unlisted dependencies Detecting code duplication and clones Checking code health and complexity hotspots Cleaning up a codebase before a release or refactor Auditing a project for structural issues Setting up CI checks for dead code or duplication thresholds Auto-fixing unused exports and dependencies Detecting feature flag patterns (environment gates, SDK calls, config objects) Investigating why a specific export or file appears unused When NOT to Use Runtime error analysis or debugging Type checking (use tsc for that) Linting style or formatting issues (use ESLint, Biome, Prettier) Security vulnerability scanning Bundle size analysis Projects that are not JavaScript or TypeScript Prerequisites Fallow must be installed. If not available, install it: npm install -g fallow

prebuilt binaries (fastest)

or

npx fallow dead-code

run without installing

or

cargo install fallow-cli

build from source

Agent Rules
Always use
--format json --quiet 2>/dev/null
for machine-readable output. The
2>/dev/null
discards stderr so progress messages and threshold warnings don't corrupt the JSON on stdout. Never use
2>&1
Always append
|| true
to every fallow command. Exit code 1 means "issues found" (normal), not a runtime error. Without
|| true
, the Bash tool treats exit 1 as failure and cancels parallel commands. Only exit code 2 is a real error (invalid config, parse failure)
Use
--explain
to include a
_meta
object in JSON output with metric definitions, ranges, and interpretation hints
Use issue type filters
(
--unused-exports
,
--unused-files
, etc.) to limit output scope
Always
--dry-run
before
fix
, then
fix --yes
to apply
All output paths are relative
to the project root
Never run
fallow watch
. It is interactive and never exits
Commands
Command
Purpose
Key Flags
fallow
Run all analyses: dead code + duplication + complexity (default)
--only
,
--skip
,
--production
,
--production-dead-code
,
--production-health
,
--production-dupes
,
--ci
,
--fail-on-issues
,
--group-by
,
--summary
,
--fail-on-regression
,
--tolerance
,
--regression-baseline
,
--save-regression-baseline
,
--score
,
--trend
,
--save-snapshot
dead-code
Dead code analysis (
check
is an alias)
--unused-exports
,
--changed-since
,
--changed-workspaces
,
--production
,
--file
,
--include-entry-exports
,
--stale-suppressions
,
--ci
,
--group-by
,
--summary
,
--fail-on-regression
,
--tolerance
,
--regression-baseline
,
--save-regression-baseline
dupes
Code duplication detection
--mode
,
--threshold
,
--top
,
--changed-since
,
--workspace
,
--changed-workspaces
,
--skip-local
,
--cross-language
,
--ignore-imports
,
--fail-on-regression
,
--tolerance
,
--regression-baseline
,
--save-regression-baseline
fix
Auto-remove unused exports/deps
--dry-run
,
--yes
(required in non-TTY)
init
Generate config file or pre-commit hook
--toml
,
--hooks
,
--branch
migrate
Convert knip/jscpd config
--dry-run
,
--from PATH
list
Inspect project structure
--files
,
--entry-points
,
--plugins
,
--boundaries
health
Function complexity analysis (also covers Angular templates as synthetic