Your codebase is growing, but is it actually doing anything?
As projects evolve, they accumulate technical debt in the form of "zombie" code. Files are moved, features are deprecated, and exports are left hanging. Standard linters catch unused variables, but they miss the bigger picture:
Orphaned Files
Entire components and modules that are never imported but still bloat your bundle and slow down your build.
Dead Exports
Library functions and components that are exported "just in case" but have zero consumers.
Shadow Dependencies
Code referenced in tests or documentation but completely unreachable from your production entrypoints.
Analysis Paralysis
Static analysis tools are often too slow to run on every commit or too noisy to trust.
You’re shipping code that no one—and nothing—uses.
Precision-engineered code pruning
Prune builds a complete dependency graph of your application starting from your actual entrypoints—including resolving TypeScript path aliases like @/ and ~/. If a file, function, or export isn't reachable from the root, it's flagged as dead code.
Built in Go and powered by Tree-sitter, Prune is fast enough to run as a pre-commit hook or as a blocking gate in your CI/CD pipeline. No more manual hunting—just a clean, leaner codebase.
How It Works
Define Entrypoints
Tell Prune where your app starts (e.g., src/index.ts, app/page.tsx).
Graph Traversal
Prune parses your files into ASTs and traces every import, export, and call-site.
Reachability Analysis
Anything not connected to your entrypoints is flagged.
Actionable Results
Get a clear list of what can be safely removed or reviewed.
Run it locally or in CI — same behavior, same results.
Simple configuration. Powerful results.
Initialize your project with a single command:
prune initYour prune.yaml keeps things explicit:
project:
name: prune-docs
language: js-ts
scan:
paths: [src]
include: ["**/*.ts", "**/*.tsx"]
entrypoints:
files:
- src/main.ts
- src/api/server.ts
rules:
unused_export: enabled
unused_function: enabled
orphaned_file: enabledRun the scan and clear the noise:
prune scan --fail-on-findingsKey Features
Runs Anywhere
Cross-platform support (Linux, macOS, Windows) with a single binary.
CI/CD Ready
Drop it into your pipeline and fail builds when dead code is detected.
Confidence Scoring
Distinguishes between "safe to delete" and "review required" cases.
Tree-sitter Powered
High-performance parsing without the overhead of a full compiler.
Real-time Streaming
Use --stream to see findings as they are discovered.
Machine Readable
Output in json or ndjson for integrations and custom tooling.
Path Aliases
Resolves TypeScript path aliases like @/ and ~/ configured via ts_config.
Built for speed, not just compliance
Most tools either slow you down or give you results you can't trust. Prune does neither.
Faster than TSC: Focused on structural reachability without full type-checking overhead.
Deterministic: No black-box heuristics—Prune follows your code exactly.
Non-Intrusive: Works alongside your existing tools without requiring project changes.
We are in Beta
Prune is under active development and you can already use it in your codebases. You may encounter edge cases with dynamic imports or unconventional patterns.
We’re looking for early adopters to help refine the engine. Found a false positive? Have an idea? We want your feedback.
Find what you can delete in 60 seconds
Install Prune and see how much code you can remove today.
Join early and help shape the fastest code-pruning engine being built.