Latest updateRead the latest release note →
Recommended workflow
1. Discover
Section titled “1. Discover”Declare the real application entry points and let OptiPrune build the reachability graph. For monorepos, define workspace boundaries explicitly.
2. Review
Section titled “2. Review”Treat findings as a review queue. High-confidence findings are the safest starting point; medium and low confidence findings should be checked against dynamic imports, dispatch tables, generated files, and runtime conventions.
3. Fix
Section titled “3. Fix”Use a dry run before mutation. Keep file changes in a separate commit so the analysis result and the cleanup decision remain easy to audit.
npx optiprune ./src --entry src/index.ts --dry-runnpx optiprune ./src --entry src/index.ts --fail-on highCI principle
Section titled “CI principle”CI should block new high-confidence dead code without silently rewriting a branch. Use JSON or SARIF output when a code-scanning platform consumes the report.