Documentation
Installation
Quick Install (macOS/Linux)
curl -fsSL https://prunecode.ai/install.sh | sh
Cargo
cargo install prune
Manual Download
Download the latest release from GitHub Releases.
Quick Start
Navigate to your TypeScript project and run:
cd your-project
prune
This launches the interactive TUI. Use arrow keys to navigate, Enter to expand findings, p to generate a refactor plan.
Headless Mode
# JSON output for CI
prune scan --json
# Watch mode
prune scan --watch
Commands
prune
Launch interactive TUI (default).
prune scan
Scan and output findings to stdout.
prune scan # Human-readable output
prune scan --json # JSON output
prune scan --watch # Watch for changes
prune plan <id>
Generate a refactor plan for a specific finding.
prune plan abc123 # Print to stdout
prune plan abc123 --copy # Copy to clipboard
prune plan abc123 -o plan.md
prune init
Create a .prunerc configuration file.
prune init
prune init --force # Overwrite existing
prune config
Show current configuration.
prune license
Manage your license.
prune license status
prune license trial --email you@example.com
prune license activate PRUNE-SOLO-XXXXXX --email you@example.com
Configuration
Create a .prunerc file in your project root:
# .prunerc
strictness = "default" # relaxed | default | strict
# Exclude patterns (glob)
exclude = [
"node_modules/**",
"dist/**",
"**/*.test.ts",
"legacy/**"
]
# Disable specific patterns
disabled_patterns = []
# Custom thresholds (optional)
[thresholds]
god_file_max_exports = 30
god_file_max_lines = 800
interface_sprawl_similarity = 0.75
redundant_logic_similarity = 0.80
barrel_bloat_threshold = 15
Strictness Levels
| Level | Description |
|---|---|
relaxed |
Higher thresholds, fewer findings. Good for legacy codebases. |
default |
Balanced thresholds for most projects. |
strict |
Lower thresholds, more findings. For greenfield projects. |
Patterns
God File
Files with too many exports or lines of code. These become maintenance nightmares and make it hard to understand what a module is responsible for.
Default threshold: 30 exports or 1000 lines
Interface Sprawl
Multiple type definitions that are nearly identical. Common when AI generates new types instead of reusing existing ones.
Default threshold: 80% structural similarity, 3+ occurrences
Redundant Logic
Functions with similar implementations that could be consolidated.
Default threshold: 85% body similarity
Barrel Bloat
index.ts files that re-export too many modules, defeating tree-shaking and increasing bundle size.
Default threshold: 20 re-exports
Dead Exports
Symbols that are exported but never imported anywhere in the codebase.
Over-Abstraction
Wrapper functions that just call another function with no transformation. Adds indirection without value.
License
Start a Trial
prune license trial --email you@example.com
14-day free trial with all features.
Activate a License
prune license activate PRUNE-SOLO-XXXXXX-XXXXXX-XXXXXX --email you@example.com
Check Status
prune license status
Tiers
| Tier | Price | Features |
|---|---|---|
| Solo | $29 one-time | CLI, all patterns, refactor plans |
| Pro | $99/year | Solo + watch mode, desktop app |
| Team | $249/year | Pro + 5 seats, CI integration |