similar-code 需先下载一次本地模型;type-aware 分析是可选额外步骤;CI 中 audit 只分析改动文件,结果可能与本地全量运行不同
fallow
fallow-rsMIT活跃维护用一张依赖图分析 TypeScript/JavaScript 代码库的健康度、复杂度热点、重复代码、循环依赖和未使用代码,提供 CLI、GitHub Action、LSP 和 MCP 多种接入方式。
Codebase intelligence for TypeScript and JavaScript. Health, complexity hotspots, duplication, architecture boundaries, circular dependencies, design-system drift, and unused code, from one graph. CLI, GitHub Action, LSP, MCP, and VS Code. Rust, MIT licensed.
npx fallowREADME 未说明硬件要求;静态分析不需要 TypeScript 编译器,也不需要 Node.js 运行时
一个 Rust 二进制,为 TS/JS 仓库建统一依赖图,查复杂度、重复、架构与死代码
用一张依赖图分析 TypeScript/JavaScript 代码库的健康度、复杂度热点、重复代码、循环依赖和未使用代码,提供 CLI、GitHub Action、LSP 和 MCP 多种接入方式。
核心能力
- 基于模块、导出、依赖、函数与样式 token 构建仓库图
- 用 audit 只对本次改动引入的问题做门禁
- 内置 100+ 框架插件,首次运行无需配置
- 支持边界预设与循环依赖检测
- 提供死代码检测与 fix 自动修复预览
容易踩的坑
- v3.41.0v3.41.0: mutation tasks and recheck, nested pnpm workspaces, fewer false positives最新正式版2026-11-07 · 2026-11-07 16:46 UTC
Features
-
fallow mutation taskslists the open tasks of a mutation report as one batch. A task is asurvivedorno_coveragemutant. Each task has its file, line, function, operator, the source lines before and after the change, and the covering test files. The human and--format markdownoutput is a numbered list that a person or a coding agent can use to write the missing tests.--format jsongives themutation-tasksJSON output. Without--report, the command reads the report of the last run. It runs no code. The new MCP toolmutation_tasksreturns the same batch. (#4269) -
fallow mutation --recheckreruns the open tasks of a report against the current tests. Write tests for the batch offallow mutation tasks, then runfallow mutation --recheck. Fallow runs eachsurvivedandno_coveragemutant of the saved report again. With--mutant, only the given ids run. In the newrecheckobject, each mutant has the outcomekilled,survived,no_coverage,tests_fail_on_originalorunsettled. A selected file that changed after the report stops the recheck withFALLOW_MUTATION_SOURCE_CHANGED. An uncommitted change to another non-test file stops it withFALLOW_MUTATION_NON_TEST_CHANGE. A recheck without--mutantreplaces the saved report, sofallow mutation tasksthen lists the mutants that are still open. (#4277) -
fallow mutation --compare <file>lists the mutants that a test change no longer detects. Save a complete report, change the tests, then runfallow mutation --compare <file>. The newcompareobject lists a mutant asregressedwhen it waskilledortimeoutbefore and issurvivedorno_coveragenow. Each regressed mutant has its earlierprevious_killing_tests, and the human output names the test that killed it before. Aflakymutant in either run isinconclusive. A mutant id in one run only isaddedorremoved. When the saved report or the run is not complete, Fallow exits with code 2 andFALLOW_MUTATION_COMPARE_INCOMPLETE. (#4306) -
Fallow analyzes the members of a nested pnpm workspace. A directory with its own
package.jsonandpnpm-workspace.yaml, which no root workspace pattern declares, is an independent pnpm project. Its members are now workspaces, andfallow list --workspacesshows them under the nested project root. Acatalog:reference in the nested project resolves against the nestedpnpm-workspace.yaml. The catalog findings andfallow fixuse the nested file. A missing member directory gives aworkspace-pattern-dir-missingdiagnostic, and Fallow then reports no unused entries of the nested catalog. A member that a root workspace pattern declares keeps the root catalog, and the root catalog checks do not change. Fallow does not read nested npm and yarn workspaces. (#4307) -
fallow list --entry-pointsand--trace-filename the package.json script of a script entry point. The human output shows the script key, for examplescripts/build.js (package.json script `build`). The JSON output adds the optional fieldscriptto eachentry_points[]item andentry_scriptto the file trace. (#4300)
Changed
-
fallow mutation --kill-matrix-forgives each target its own evidence status. Each entry ofkill_matrix.targetsnow has astatus(completeorincomplete) and itsreasons. A mutant with incomplete evidence now removes only the candidates of the targets that cover it. The run-wide reasonspartial-mutation-run,baseline-failureandmissing-test-file-metadatastill remove all candidates. The top-levelstatuskeeps its meaning, socandidatescan be nonempty whilestatusisincomplete. (#4317) -
An audit review comment of an inherited complexity finding names the base values. This applies to
--format review-github,review-gitlabandcodeclimate. The comment names each exceeded metric with its base and head values. For example: `(inherited from the b
-
- v3.40.0v3.40.0: Namespace checks, workspace settings and runtime context2026-11-05 · 2026-11-05 20:36 UTC
查看更新说明
Fallow 3.40.0 adds checks for unused namespace members, duplicate export aliases and missing command-line tools, plus workspace-specific settings and targeted mutation analysis.
New analysis and configuration
unused-namespace-members,duplicate-export-aliasesandunlisted-binariesreport through the CLI and integrations. These rules default to warnings. With--fail-on-issues, new warnings can fail CI. Disable a rule in top-levelrulesto retain the previous result.ignoreBinariesexcludes intentional external commands.workspaces.settingsconfigures dependency exclusions and entry exports per workspace.supportEntryseparates development entry points from production analysis. Migration preserves these settings.- Security analysis recognizes more command, template, network, file and deserialization sinks within existing categories, also when a destructured
require()binds the sink. mutation --kill-matrix-forchecks named tests for redundant mutant kills without running a full kill matrix. Vitest mutation runs now forward the active mutant to Node child processes. Audit counts@effect/vitesttests.
Runtime context and integrations
- Inventory uploads with
--with-callersinclude the entry routes that can reach each function. coverage analyze --cloudretains error and performance context.inspect --file --cloudretains browser and caller context. These fields do not change verdicts.- The MCP server routes Rust workspaces to
cargo-fallow. Packaged skill guidance also documents the hosted Fallow Cloud MCP server. - VS Code keeps sidebar groups expanded after refresh and updates its language client.
Correctness and maintenance
Dead-code analysis fixes false positives involving inherited method results, inline import types, calls with arguments and re-exported schemas. Resolution fixes cover URL-loaded modules, package assets, build-output imports and workspace folder dependencies. Configuration fixes cover project wrappers and framework aliases. Dependency checks recognize config-required packages. Migration handles namespace issue types, and declaration merges avoid duplicate-export findings.
fallow doctoruses the project's package manager for dependency-install commands. Packaged skill guidance now starts with this readiness check.Graph caches invalidate after dependency installs and after Yarn Plug'n'Play changes. Audit comments explain attribution and gate effects. Initial analysis rebuilds caches after this upgrade. Contributors can set up a checkout with
pnpm bootstrap. Shared report types retain their JSON shape. This release also updates dependencies.Thanks @Smrtnyk for the reports and @cr101 for the targeted mutation-analysis proposal.
https://github.com/fallow-rs/fallow/compare/v3.39.0...v3.40.0
- v3.39.0v3.39.0: fewer false positives, Effect schema option, banned-import allowNames2026-11-03 · 2026-11-03 20:43 UTC
查看更新说明
Features
-
banned-importrules acceptallowNames. A rule can ban a package and keep some of its exports, for example{ "kind": "banned-import", "specifiers": ["three"], "allowNames": ["Vector3", "Quaternion"] }. Each entry is an exact imported name, anddefaultallows a default import. A namespace import, a star re-export and a side-effect import always report. A finding of such a rule hasmatchedset to<specifier>: <binding>, for examplethree: Mesh. AddingallowNameschanges the baseline keys and finding ids of that rule, so re-save the baseline in the same commit. Thanks @Smrtnyk for the report. (#4072) -
An explicit flag now says when its rule is off in config. Before,
fallow dead-code --unused-depswithunused-dependenciesatoffprintedNo issues found. Now fallow prints a note on stderr that the flag did not check the rule. JSON gets the newworkspace_diagnosticskindrequested-rule-off, withruleandflag. SARIF, Markdown, MCP, the GitHub Action and the GitLab template also show the note. The exit code does not change, so set the rule to "error" to fail on a finding. Thanks @Smrtnyk for the report. (#4067) -
The MCP tool
inspect_targetreturns thecloudsection and the compact text. Setcloud: trueon a file target to run the same path asfallow inspect --file <path> --cloud. The CLI reads the key fromFALLOW_API_KEYin the server environment, then the keychain, then the credentials file. The key is never a tool parameter. A status other thanokdoes not fail the call. Setformat: "compact"to get the plain text offallow inspect --format compactinstead of the JSON bundle. (#4001) -
fallow securityreports more sinks. These shapes are now candidates when the value is not a literal:- iframe
srcdocasdangerous-html, through assignment,setAttribute, JSXsrcDoc, Vue:srcdoc, Sveltesrcdocand Angular[srcdoc]; - an assignment to
src,text,textContentorinnerTexton a local bound todocument.createElement("script")ascode-injection, with the calleeHTMLScriptElement.<property>. The same property on another element stays quiet; - a non-literal argument to
Range.createContextualFragment()asdangerous-html.
- iframe
-
The review brief reports security sink substitution. A change that removes a security sink and adds a different sink of the same class in the same file gives a
security-check-removedsignal. The signal appears inweakening[]offallow audit --briefandfallow review. The classes are code execution, such asnew Functionandvm.runInNewContext, and HTML, such asinnerHTMLanddangerouslySetInnerHTML. A sink that only moves in the file, or goes away, gives no signal. Test files do not take part. -
A
graphql-configplugin keeps GraphQL schema and operation files used. The plugin reads theschemaanddocumentsglobs ofgraphql.config.*,.graphqlrc,.graphqlrc.*or thegraphqlkey inpackage.json. It marks the matching.graphql,.gqland.graphqlsfiles as used, and the config file too. A glob is relative to the directory of the config file. A URL, a negated glob, and a glob for source files get no credit. -
fallow auditshows the reason of an addedfallow-ignorecomment. Anadded-suppressionfinding now has asuppressionobject withkinds,reasonandsecurity_without_reason. Write the reason after--, for example// fallow-ignore-next-line security-sink -- the HTML is a constant template. When the comment hidessecurity-sinkorsecurity-client-server-leakwithout a reason,security_without_reasonistrue. The signal does not change the severity, the verdict or the exit code. To find existing security suppressions without a reason, runfallow suppressions --format jsonand selectreason_present: false. -
effect.schemaExportsAsTypesreports unused Effect schemas as unused types. With `{ "effect": { "schemaExportsAsTypes":
-
- v3.38.1v3.38.1: audit cache fixes and the VS Code extension back on the marketplaces2026-10-31 · 2026-10-31 11:12 UTC
查看更新说明
Changed
fallow auditscans the temp dir for old base-snapshot caches at most once per hour. Before, each audit scanned everyfallow-audit-base-cache-*entry in the temp dir. Entries of deleted repos stay until they age out, so a long-lived CI runner or developer machine can collect tens of thousands of them. With 59,000 entries, one audit of a small project took about 2.5 s instead of 0.3 s. Now the first audit in each hour scans the temp dir. The other audits sweep only the cache of their own project root. Old entries of other repos are reclaimed at most one hour later.fallow audit-cache prunestill scans every entry on each run, and its output does not change. (#4020)
Bug fixes
- The audit cache sweep removes the
.lockfile of a cache that it reclaims (Unix). The sweep used to keep these.lockfiles for ever. They grew without limit, and one host had more than 15,000 of them. Every full sweep and everyfallow audit-cache pruneread each one.fallow audit-cache prune --format jsonreports a bare lock file that it removes. The report gives the new reasonorphaned-lock. Windows keeps the.lockfile and reportslock-onlyas before. (#4021) - The VS Code extension is on the VS Code Marketplace and Open VSX again. The 3.38.0 release did not publish it, so the marketplaces still offered 3.37.0. This release publishes 3.38.1. (#4025)
- The VS Code extension bundles minimatch 11.0.3. The language client requested minimatch 10, which has a denial of service through glob pattern amplification (GHSA-g3hv-75wg-m249). The extension only matches globs that the fallow language server sends. (#4031)
- The output schema names
fallow dead-code --impact-closureforaffected_not_shown. The field description in the audit brief, indocs/output-schema.jsonand in the output contract types namedfallow check --impact-closure, a command that does not exist. (#4028)
Full Changelog: https://github.com/fallow-rs/fallow/compare/v3.38.0...v3.38.1
- v3.38.0v3.38.0: file-length limit, Fallow Cloud setup and login, lean JSON for agents2026-10-30 · 2026-10-30 19:47 UTC
查看更新说明
Features
-
fallow healthcan report files that are too long. Sethealth.maxFileLinesor pass--max-file-lines <N>. Fallow then reports each file with more physical lines than the limit, blank and comment lines included. The default is0, so the check is off. The newcomplexity-file-linesrule (defaulterror) decides if a long file fails the run. SARIF and CodeClimate use the rule idfallow/long-file.thresholdOverrides[].maxFileLinessets a different limit for some files. Infallow audit, an existing long file stays inherited until it grows by 5 lines or more. Set the limit in an old project to stop further growth. The MCPcheck_healthand Code Modecombinedtools and the Node bindings accept the limit. The GitHub Action has amax-file-linesinput, the GitLab template hasFALLOW_MAX_FILE_LINES, and the VS Code Health view shows long files. (#3977) -
fallow coverage setup --cloudplans a Fallow Cloud setup in one command. Fallow Cloud joins runtime coverage to the static inventory only when every step uses the same commit SHA. The plan gives beacon snippets that read the SHA from an environment variable, such asVERCEL_GIT_COMMIT_SHAorVITE_FALLOW_COMMIT_SHA. It also gives GitHub Actions steps incloud.ci.steps: a full-history checkout, the inventory upload, the source-map uploads and the deployment registration for$GITHUB_SHA. The plan names the key variables and never a key value. It writes no file.--jsonadds acloudobject.--waitpolls Fallow Cloud until every step is done. It exits 0 on success, 1 on a timeout and 2 on an authentication, key scope or input error. (#3976) -
fallow cloud loginstores a read-only Fallow Cloud key without copy and paste. The command shows a code and a URL. After an organization owner approves the code, fallow stores the key in the OS keychain. With no keychain, fallow stores it in~/.config/fallow/credentialswith mode 0600.fallow cloud logoutremoves the key. Commands that read production data, and the MCP cloud tools, search for a key in this order:--api-key,$FALLOW_API_KEY, the keychain, the credentials file. Upload commands still read only--api-keyand$FALLOW_API_KEY, because the stored key is read-only. (#4000) -
fallow inspect --file <path> --cloudshows production data for each function in a file. For each function you get its state in the deployment, its state over the period, calls, error groups, CPU milliseconds per hour and never-run branch ranges. Fallow pairs each local function with its deployed function by stable id, then by its name and position among functions with the same name. A missing key, a plan limit or an unreachable cloud prints a status in thecloudsection, and the run does not fail. The new--format compactprints about 1 KB of plain text per file, which an editor hook can add to the context as it is. (#4000) -
--leanmakes the JSON report smaller for agent context. Use it with--format jsononfallow dead-code,fallow healthor the barefallowrun. The lean report omits empty arrays and dead-code summary counts that are zero. The lean report keeps one workspace diagnostic per kind and the first 10 rows of thehotspots,file_scoresandlarge_functionstables.<table>_omittedgives the number of rows left out.--full-tableskeeps every row. The root fieldprofile: "lean"marks a lean report. Runs without--leando not change. (#4007, #3992) -
fallow mutation --kill-matrixlists tests that may be redundant. This opt-in mode runs every covering test of each mutant, so the run can take longer. It reports a test when other tests also kill every mutant that the test kills. Review each reported test before you remove it. (#3997) -
Source-map uploads record where each generated line starts.
fallow coverage upload-source-mapsaddsx_fallow_line_startsto each map. Fallow Cloud uses this field to find the function behind a browser Long An
-
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Run it in the root of any JS or TS project:
npx fallow
A pull request gate on a fictional storefront monorepo might look like this:
$ npx fallow audit --base HEAD~15
Audit scope: 73 changed files vs HEAD~15
● Circular dependencies (24)
packages/storefront/src/orders/process.ts (6 cycles)
→ payment.ts → context.ts → process.ts
── Duplication ────────────────────────────────────
⚠ 185 lines (0.2%) duplicated across 6 files
● High complexity functions (28)
packages/storefront/src/orders/payment.ts
:566 processPayment CRITICAL
32 ! cyclomatic 47 ! cognitive 203 lines
── Styling ────────────────────────────────────────
font sizes mix 3 units (3 px, 2 rem, 1 em; candidate, standardize unless intentional)
✗ dead code: 68 issues · complexity: 28 findings · duplication: 7 clone groups · 73 changed files
audit gate excluded 98 inherited findings (run with --gate all to enforce)
Illustrative output for a fictional project. The gate fails (exit code 1) on findings in changed files. Findings that existed before the change are excluded.
fallow builds a repository graph of modules, exports, dependencies, functions, and styling tokens. Its analyses use that graph to find complexity, architecture drift, duplication, unused code, and risks in a pull request.
fallow runs in four places. All four read the same config file and use the same analysis engine.
| Where | Start with |
|---|---|
| Your terminal | npx fallow |
| Pull requests | uses: fallow-rs/fallow@v3 |
| Your editor | The VS Code extension or fallow-lsp |
| Coding agents | npx fallow agent install |
What fallow finds
| Question | Analysis | Command |
|---|---|---|
| Is this change safe to merge? | Changed-file gate over complexity, duplication, unused code, and styling drift, with a pass, warn, or fail result | fallow audit |
| Where is the code hard to change? | Complexity hotspots, a 0 to 100 health score, and refactoring targets, with git churn and ownership | fallow health |
| Does the architecture hold? | Boundary violations with bulletproof, layered, hexagonal, and feature-sliced presets, and circular dependencies | fallow architecture, fallow guard |
| What is copied? | Code duplication in JS, TS, CSS, and Vue, Svelte, and Astro components | fallow dupes |
| Does the UI follow the design system? | Styling drift in CSS and CSS-in-JS | fallow health --css |
| What does nothing use? | Unused files, exports, types, class and enum members, and dependencies, with an auto-fix and a dry-run preview | fallow dead-code, fallow fix |
| Do the tests detect a code change? | Mutation testing: small changes in the source that no test detects (opt-in, runs the project tests) | fallow mutation |
| Which code paths are risky? | Security candidates, ranked by reachability from entry points (opt-in) | fallow security |
| Which functions do the same job? | Functions with the same intent and different syntax (opt-in, uses a local model that you download once) | fallow similar-code |
| Where are the feature flags? | Feature-flag patterns across the codebase | fallow flags |
npx fallow viz opens an interactive HTML map of the project with lenses for health, duplication, architecture, and unused code.
Add --type-aware for exact TypeScript symbol identity across aliases, re-exports, and packages. This optional pass removes false positives from interfaces and base classes (how type-aware analysis works). Runtime coverage from production is an optional add-on that fallow merges into health and audit reports.
The CLI reference lists every command. fallow schema prints all commands, flags, output formats, and exit codes as JSON.
Why teams can depend on fallow
fallow keeps these properties from release to release:
- The same input gives the same output, with a stable fingerprint for each finding. There is no AI inside the analyzer. Only the opt-in
similar-codecommand uses a pinned local model. fallow auditfails only on findings that a change introduces. Existing findings do not fail the check.- It is fast on large codebases. fallow finds the unused code in the next.js monorepo (20,558 files) in 2.95s. Measured on fallow 2.100.0. BENCHMARKS.md has the method and all results, and CodSpeed tracks performance on each change.
- fallow reads npm, yarn, and pnpm workspaces, and
--workspace <name>scopes a run to one package. - Over 100 built-in framework plugins find entry points and framework conventions, so the first run needs no config.
- Each command has a typed JSON output, documented exit codes, and a published output schema.
- Analysis runs on your machine or CI runner. Telemetry is opt-in (what fallow collects).
- The project has a public issue tracker, a public roadmap, and a security policy.
The analyzer is written in Rust and uses Oxc for syntactic analysis. Static analysis needs no TypeScript compiler and no Node.js runtime.
In your terminal
npx fallow # health, duplication, and unused code in one run
npx fallow audit # only the findings that your change introduces
npx fallow fix --dry-run # preview the auto-fixes, then run `npx fallow fix`
npx fallow health --score # health score with the largest deductions
npx fallow dead-code --trace src/api.ts:client # prove an export is unused before you delete it
To keep fallow in the project, install it as a dev dependency:
npm install --save-dev fallow
The npm package includes the fallow, fallow-lsp, and fallow-mcp launchers. For pnpm, yarn, cargo install fallow-cli, and Docker, see the installation guide.
To check each commit before it leaves your machine, install the managed pre-commit hook:
npx fallow hooks install --target git
Adopt fallow on an existing codebase
You do not have to fix every finding before you add fallow to CI.
- Run
npx fallow recommend. It detects the stack and proposes a config. It changes no files. - Use
fallow auditin pull requests. It compares each pull request with its base branch and blocks only the findings that the pull request adds. It needs no baseline file. - For full runs of
fallow,dead-code,dupes, orhealth, save a baseline once withnpx fallow --save-baseline fallow-baseline.json. Pass--baseline fallow-baseline.jsonon each later run, so that only new findings fail. - Reduce the backlog when your team has time.
fallow fix --dry-runshows the fixes and changes no files.fallow fixapplies them.
If findings are caused by missing entry points or generated files, add the missing entry points and exclude the generated files in the config:
{
"$schema": "./node_modules/fallow/schema.json",
"entry": ["src/cli.ts"],
"ignorePatterns": ["**/*.generated.ts"]
}
To keep an intentional export, add a suppression comment:
// fallow-ignore-next-line unused-export -- kept for plugin consumers
export const keepThis = 1;
// fallow-ignore-file <issue-type> suppresses a whole file. JSDoc tags (@public, @internal) keep intentional library API quiet. npx fallow suppressions lists every suppression in the project.
The adoption guide shows the staged path. Configuration has the full reference.
In pull requests
GitHub Actions:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fallow-rs/fallow@v3
with:
command: audit
GitLab CI:
include:
- remote: 'https://raw.githubusercontent.com/fallow-rs/fallow/v3.41.0/ci/gitlab-ci.yml'
fallow:
extends: .fallow
fetch-depth: 0 is the recommended setup. A default shallow checkout also works for command: audit: the Action fetches the commits that it needs to find the merge base.
To start in report-only mode, add fail-on-issues: false. Remove it when the team is ready for a gate. With command: audit, a pull request fails only on findings that it introduces. Without command: audit, the Action runs the full pipeline, and any finding fails the job (fail-on-issues defaults to true). In a pull request, the Action scopes the analysis to the changed files, so its output can differ from a full local run.
The Action installs the fallow version that the project's package.json names. Pin an exact version there to use the same version in CI and on your machine. It can post a PR comment and inline review comments, and it can upload SARIF to GitHub Code Scanning. Other output formats are CodeClimate, GitHub annotations, and Markdown. The GitLab template URL names a release tag, because GitLab includes a file from a fixed ref. The CI guide covers inputs, permissions, and a staged rollout.
For a PR comment or review comments, give the job these permissions. id-token: write is optional: it lets the Action post as the fallow bot. Without it, the comments come from github-actions[bot].
permissions:
contents: read
id-token: write
pull-requests: write
checks: write
Exit code 0 means no error-severity findings, or an audit result of pass or warn. Exit code 1 means error-severity findings, or an audit result of fail. In CI, exit code 1 fails the job, and that is the gate. The rule severity in the config (error, warn, off) sets which findings count. Exit code 2 means invalid input or an execution error. A script that reads the JSON output can treat 0 and 1 as a completed run, but must not hide exit code 2 with || true.
| Exit code | Meaning |
|---|---|
| 0 | Clean, or audit result pass or warn |
| 1 | Findings, or audit result fail (a normal outcome) |
| 2 | Validation or runtime error (JSON error on stdout with --format json) |
| 3 | A requested resource is unavailable, for example when config --path finds no config |
| 8 | Security gate hit (fallow security --gate) |
| 4 to 7, 10 to 13 | Runtime coverage, license, network, and upload errors |
With --format json, an error arrives on stdout as {"error": true, "message": "...", "exit_code": 2}, not as a stack trace.
Editors and integrations
- The VS Code extension shows findings in the editor.
fallow-lspgives diagnostics, hover, code actions, and code lenses in any LSP editor.editors/has setups for Zed and Neovim.- The Node API
@fallow-cli/fallow-nodeexportsdetectDeadCode,detectCircularDependencies,detectBoundaryViolations,detectArchitecture,detectDuplication,detectSimilarCode,detectFeatureFlags,computeComplexity, andcomputeHealth. The package API reference has the options and return types. fallow health --format badge > badge.svgwrites a health badge for your README.
With coding agents
npx fallow agent install --dry-run # show the plan
npx fallow agent install # apply it
fallow agent install sets up the agents that it detects (Claude Code, Codex, and Cursor) in one pass. It writes an AGENTS.md task map, installs the fallow and fallow-setup skills, registers the MCP server, and adds a gate on git commit and git push. Run npx fallow agent status to see these changes. Run npx fallow agent uninstall to remove them.
To register only the MCP server:
{ "mcpServers": { "fallow": { "command": "npx", "args": ["--yes", "--package", "fallow", "fallow-mcp"] } } }
--package fallow selects the npm package that provides the fallow-mcp launcher.
Scripts and agents that call the CLI directly add --format json --quiet. Each command then writes one typed JSON document to stdout:
- A root
kindfield names the analysis that made the document. - Each finding has an
actions[]array and anauto_fixableflag, so a script knows whatfallow fixcan do. - Root
next_steps[]suggestions are commands that run as written. - The types ship as
fallow/types, and docs/output-schema.json is the full schema.
Do not run fallow watch in an agent loop, because it does not exit.
Exit codes and the JSON error format are in In pull requests. The agent skills guide has the details.
Migrate existing config
npx fallow migrate converts knip, jscpd, and stylelint config into fallow config. The migration guides for knip and jscpd show each step.
Contributing
To report a missing framework plugin or a false positive, open an issue. CONTRIBUTING.md covers the development setup. docs/README.md is the entry point for maintainer documentation.
Thank you to everyone who contributes code, bug reports and ideas.
License
MIT. See LICENSE.
If fallow helps you or your team, you can support its development through GitHub Sponsors.