Configs2026年7月2日·1 分钟阅读

Fallow — TypeScript Codebase Intelligence Analyzer in Rust

A Rust-native static analysis tool that finds unused code, duplicates, circular dependencies, and complexity hotspots in TypeScript and JavaScript projects.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Fallow Overview
直接安装命令
npx -y tokrepo@latest install 876c30b2-7658-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Fallow is a Rust-native codebase intelligence tool for TypeScript and JavaScript projects. It detects unused exports, duplicate code, circular dependencies, and complexity hotspots in sub-second time, helping teams keep large codebases clean and maintainable.

What Fallow Does

  • Identifies unused exports, dead code, and unreferenced files across a TypeScript/JavaScript project
  • Detects copy-pasted code blocks and near-duplicate implementations
  • Maps circular dependency chains and visualizes module dependency graphs
  • Calculates complexity metrics to highlight hotspots that may need refactoring
  • Enforces architecture boundaries between modules or packages in a monorepo

Architecture Overview

Fallow uses the oxc parser (a fast Rust-based JavaScript/TypeScript parser) to build an AST from source files. It constructs a dependency graph by resolving imports and exports, then runs multiple analysis passes: reachability analysis for dead code detection, token-based similarity for duplication, cycle detection for circular dependencies, and metric aggregation for complexity scoring. The Rust implementation keeps full-project analysis under one second for most codebases.

Self-Hosting & Configuration

  • Install via npm (npx fallow or npm install -g fallow) or download the Rust binary directly
  • Run fallow analyze in a project root to scan all TypeScript and JavaScript files
  • Configure analysis rules in a fallow.config.json or via CLI flags
  • Exclude paths or files with glob patterns in the configuration
  • Integrate into CI pipelines to enforce code quality thresholds on pull requests

Key Features

  • Sub-second analysis speed on most projects thanks to the Rust implementation
  • Zero configuration needed for basic unused code and circular dependency detection
  • Framework-aware analysis understands Next.js, React, and common project structures
  • Architecture boundary enforcement prevents unwanted cross-module dependencies
  • JSON and human-readable output formats for CI integration and developer workflows

Comparison with Similar Tools

  • ESLint — Rule-based linter for code style; Fallow focuses on structural analysis like dead code and duplication
  • Knip — JavaScript dead code finder; Fallow adds duplication detection and complexity analysis in a faster runtime
  • Madge — Circular dependency visualization; Fallow includes this plus dead code and duplication analysis
  • SonarQube — Enterprise code quality platform; Fallow is lighter and specialized for TypeScript
  • depcheck — Finds unused npm dependencies; Fallow analyzes source-level exports and imports

FAQ

Q: Does it support plain JavaScript or only TypeScript? A: Both. Fallow analyzes .ts, .tsx, .js, .jsx, .mjs, and .cjs files.

Q: How fast is it on large codebases? A: Most projects analyze in under one second. The Rust implementation and oxc parser make it significantly faster than Node.js-based alternatives.

Q: Can I use it in a monorepo? A: Yes. Fallow supports monorepo structures and can enforce architecture boundaries between packages.

Q: Does it support auto-fixing issues? A: Fallow reports findings but does not auto-remove code. Deletion is left to the developer to avoid unintended side effects.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产