You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodeState is designed to be instantly useful for different daily scenarios.
49
49
50
50
### 1. Basic Scan: How big is this project?
51
+
51
52
Just run the tool without any arguments to get a blazingly fast overview of the language distribution, total lines of code, and comment density.
52
53
53
54
```bash
54
55
codestate
55
56
```
56
57
57
58
### 2. Code Health Check: What needs refactoring?
59
+
58
60
Use the summary flag to get a detailed breakdown of codebase health, including average function complexity and TODO counts.
59
61
60
62
```bash
61
63
codestate --summary
62
64
```
63
65
64
66
### 3. Find Bug Hotspots: Where should I focus my code review?
67
+
65
68
CodeState integrates directly with Git to find "Hotspots"—files that are modified most frequently. Files with high complexity *and* high churn are prime candidates for bugs.
66
69
67
70
```bash
@@ -94,21 +97,137 @@ This action will automatically run CodeState and post a beautiful report as a PR
94
97
95
98
CodeState's new Rust engine focuses on speed and simplicity.
96
99
97
-
| Flag | Description |
98
-
|---|---|
99
-
| `(no flags)` | Scan current directory and print basic language distribution & LOC. |
100
-
| `--hotspot` | Analyze git history and show the files with the most commits. |
101
-
| `--summary` | Generate a health summary of the project. |
102
-
| `--details` | Show file-by-file metrics (complexity, TODOs, comments). |
103
-
| `--runall` | Run a self-test suite of all features. |
# Analyze multiple directories (requires at least one directory)
215
+
codestate --multi src tests
216
+
217
+
# List all file extensions with count and percentage
218
+
codestate --list-extensions
219
+
```
220
+
221
+
## Why CodeState?
106
222
107
-
Why use CodeState when traditional counting tools already exist?
223
+
- Instant understanding: go beyond LOC to highlight duplicates, complexity hotspots, refactor candidates, naming issues, and dead code — right in your terminal.
224
+
- Visual by default: ASCII pie/heatmap/bar charts make trends obvious during reviews, without leaving the CLI.
225
+
- History-aware decisions: git hotspots/churn help you prioritize the files that matter most.
226
+
- Team visibility: contributors and blame insights per file unlock ownership and onboarding context.
227
+
- CI-ready artifacts: export HTML/Markdown/JSON/CSV/Excel for reports, dashboards, and pipelines.
228
+
- Faster repeat runs: built-in caching and .gitignore support keep large repositories snappy over time.
108
229
109
-
1. **Beyond Lines of Code:** Pure line counters tell you how big a project is, but CodeState tells you how *healthy* it is by calculating cyclomatic complexity, extracting TODOs, and tracking comment density.
110
-
2. **Git Hotspot Analysis:** CodeState natively reads your `.git` history to find files that are churning the most. It helps teams identify which legacy files are causing the most friction.
111
-
3. **CI/CD Ready & Beautiful UI:** With built-in GitHub Actions support and a gorgeous `comfy-table` terminal UI, it goes from local terminal to automated PR reviews with zero friction.
230
+
Tip: Combine CodeState with a GitHub Action to post a compact Markdown summary on every PR.
0 commit comments