Skip to content

Commit 6914e1d

Browse files
Marketer: full README marketing rewrite — pricing table, why hook, scanner docs, Revenue Holdings branding
1 parent 706e018 commit 6914e1d

1 file changed

Lines changed: 107 additions & 40 deletions

File tree

README.md

Lines changed: 107 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,154 @@
11
# DeadCode
22

3-
CLI tool to detect and auto-remove unused exports, dead routes, orphaned CSS, and unreferenced components in TypeScript/React/Next.js projects.
3+
**Detect and remove unused exports, dead routes, orphaned CSS, and unreferenced components in TypeScript/React/Next.js projects.**
44

5-
[![CI](https://github.com/Coding-Dev-Tools/deadcode/actions/workflows/test.yml/badge.svg)](https://github.com/Coding-Dev-Tools/deadcode/actions/workflows/test.yml)
65
[![PyPI](https://img.shields.io/pypi/v/deadcode)](https://pypi.org/project/deadcode/)
6+
[![Python](https://img.shields.io/pypi/pyversions/deadcode)](https://pypi.org/project/deadcode/)
7+
[![License](https://img.shields.io/pypi/l/deadcode)](https://github.com/Coding-Dev-Tools/deadcode/blob/main/LICENSE)
8+
[![CI](https://github.com/Coding-Dev-Tools/deadcode/actions/workflows/test.yml/badge.svg)](https://github.com/Coding-Dev-Tools/deadcode/actions/workflows/test.yml)
79

8-
## Features
9-
10-
- **Unused exports** — find functions, classes, constants, types that are exported but never imported
11-
- **Dead routes** — find Next.js pages/api routes with no internal links
12-
- **Orphaned CSS** — find CSS classes defined but never used in JSX
13-
- **Unreferenced components** — find React components defined but never imported
14-
- **Safe auto-removal** — preview with `--dry-run` before making changes
15-
- **Monorepo support** — handles large projects efficiently
16-
- **CI integration** — JSON output for automated pipelines
10+
**Why DeadCode?** Every TypeScript/React codebase accumulates dead code — exports nobody imports, page components replaced but never deleted, CSS classes refactored out but still sitting in `.module.css` files. ESLint catches unused variables but misses the structural decay: orphaned exports bloat your bundles, stale routes confuse new teammates, and orphaned styles silently accumulate. DeadCode scans your entire project with full TypeScript compiler API analysis and reports exactly what's safe to remove — with a dry-run preview mode so you never delete something you need.
1711

18-
## Installation
12+
## Quick Start
1913

2014
```bash
2115
pip install deadcode
22-
```
2316

24-
## Usage
25-
26-
### Scan for dead code
27-
28-
```bash
17+
# Scan current project
2918
deadcode scan
19+
20+
# Scan a specific project
3021
deadcode scan -p /path/to/project
31-
deadcode scan --json-output
32-
deadcode scan -c unused_export # Filter by category
22+
23+
# Preview removable dead code
24+
deadcode remove --dry-run
25+
26+
# Remove confirmed dead code
27+
deadcode remove
3328
```
3429

35-
### Preview removal (dry run)
30+
## Commands
31+
32+
### `deadcode scan`
33+
34+
Scan a TypeScript/React/Next.js project for all categories of dead code.
3635

3736
```bash
38-
deadcode remove --dry-run
37+
deadcode scan # Scan current directory
38+
deadcode scan -p /path/to/project # Scan specific project
39+
deadcode scan --json-output # Machine-readable JSON
40+
deadcode scan -c unused_export # Filter by category
41+
deadcode scan -i "generated/" # Ignore paths
3942
```
4043

41-
### Remove dead code
44+
### `deadcode remove`
45+
46+
Remove dead code after previewing. Always preview with `--dry-run` first.
4247

4348
```bash
44-
deadcode remove
45-
deadcode remove -c orphaned_css
49+
deadcode remove --dry-run # Preview changes (no writes)
50+
deadcode remove # Apply removals
51+
deadcode remove -c orphaned_css # Remove only orphaned CSS
4652
```
4753

48-
### View stats
54+
### `deadcode stats`
55+
56+
Quick overview of dead code in your project.
4957

5058
```bash
5159
deadcode stats
5260
```
5361

5462
## Categories
5563

56-
| Category | Description |
57-
|----------|-------------|
58-
| `unused_export` | Exported names never imported elsewhere |
59-
| `dead_route` | Next.js routes with no internal links |
60-
| `orphaned_css` | CSS classes not referenced in JSX |
61-
| `unreferenced_component` | React components never imported |
64+
| Category | Description | Example |
65+
|----------|-------------|---------|
66+
| `unused_export` | Exported names never imported elsewhere | `export function oldHelper()` with zero consumers |
67+
| `dead_route` | Next.js routes with no internal links | `app/legacy/page.tsx` no longer linked from navigation |
68+
| `orphaned_css` | CSS classes not referenced in JSX | `.oldClass` in `styles.module.css` with zero usages |
69+
| `unreferenced_component` | React components defined but never imported | A `<LegacyWidget>` component with no import sites |
6270

63-
## Ignore Patterns
71+
## Features
6472

65-
Use `--ignore` to exclude paths (gitignore-style):
73+
- **Unused export detection** — finds functions, types, classes, interfaces, enums, and consts that are exported but never imported within your project
74+
- **Dead route detection** — detects unreachable page components in Next.js App Router projects
75+
- **Orphaned CSS detection** — finds CSS module classes that are defined but never referenced in TSX/JSX files
76+
- **Safe auto-removal**`--dry-run` preview mode shows exactly what will be deleted before making changes
77+
- **TypeScript compiler API** — uses the real TS compiler for 100% accurate parsing, not regex heuristics
78+
- **Monorepo support** — handles large projects efficiently with ignore patterns
79+
- **CI integration** — JSON output for automated pipelines and gating
80+
81+
## Ignore Patterns
6682

6783
```bash
6884
deadcode scan -i "generated/" -i "**/*.generated.ts"
6985
```
7086

7187
Default ignores: `node_modules/`, `.git/`, `.next/`, `dist/`, `build/`, `public/`, `static/`
7288

73-
## CI Integration
89+
## Pricing
90+
91+
DeadCode is one of eight tools in the Revenue Holdings suite. One license covers all CLI tools.
92+
93+
| Plan | Price | Best For |
94+
|------|-------|----------|
95+
| **Free** | $0 | Individual devs, OSS — CLI only, rate-limited |
96+
| **DeadCode Individual** | **$12/mo** ($10 billed annually) | Professional devs — unlimited scans, auto-removal, CI integration |
97+
| **Suite (all 8 tools)** | **$49/mo** ($39 billed annually) | Full Revenue Holdings toolkit — 40% savings |
98+
| **Team** | **$79/mo** ($63 billed annually) | Up to 5 devs — trend analytics, shared baselines, alerts |
99+
| **Enterprise** | Custom | SSO, RBAC, compliance reports, dedicated support |
100+
101+
🔹 **No lock-in**: CLI works fully offline on the free tier — no telemetry, no phone-home.
102+
🔹 **Annual billing**: Save 20%.
103+
104+
### Per-Tier Features
105+
106+
| Feature | Free | Individual | Suite | Team | Enterprise |
107+
|---------|:----:|:----------:|:-----:|:----:|:----------:|
108+
| CLI: scan, stats ||||||
109+
| All 3 scanner categories ||||||
110+
| Auto-removal (`deadcode remove`) ||||||
111+
| Unlimited file scanning ||||||
112+
| CI/CD integration (JSON output) ||||||
113+
| Project trend baselines ||||||
114+
| Dashboard & analytics ||||||
115+
| Compliance reports ||||||
116+
| RBAC / SSO / SAML / OIDC ||||||
117+
| Priority support | Community | 24h | 24h | 8h | Dedicated |
118+
119+
---
120+
121+
<p align="center">
122+
<sub>Part of <a href="https://coding-dev-tools.github.io/revenueholdings.dev/">Revenue Holdings</a> — CLI tools built by autonomous AI.</sub>
123+
</p>
124+
125+
## CI/CD Integration
74126

75127
```bash
128+
# Generate report for CI
76129
deadcode scan --json-output > deadcode-report.json
77-
```
78130

79-
Exit with findings:
131+
# Fail CI if any dead routes found
132+
deadcode scan -c dead_route && exit 1
80133

81-
```bash
82-
deadcode scan -j | python3 -c "import sys,json; d=json.load(sys.stdin); sys.exit(1 if d['findings'] else 0)"
134+
# Track dead code trends over time
135+
deadcode scan --json-output > baseline-$(date +%Y-%m-%d).json
83136
```
84137

138+
## Storage
139+
140+
- `.deadcode.yml` — project configuration (ignore patterns, categories)
141+
- `deadcode-baseline.json` — saved scan results for trend tracking
142+
143+
## Roadmap
144+
145+
- [ ] VS Code extension with inline decorations showing dead code
146+
- [ ] ESLint plugin integration with auto-fix
147+
- [ ] Webpack/Rollup bundle analysis hooks
148+
- [ ] MCP server for AI-assisted cleanup
149+
- [ ] Incremental scanning with cache
150+
- [ ] GitHub Actions annotator for PR comments
151+
85152
## License
86153

87-
MIT
154+
MIT — see [LICENSE](LICENSE)

0 commit comments

Comments
 (0)