devarchitect-cli 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,135 @@
1
+ # 🛡️ devarchitect-cli
2
+
3
+ > **Understand your codebase. Improve its architecture. Engineer with confidence.**
4
+
5
+ [![npm version](https://img.shields.io/npm/v/devarchitect-cli.svg?style=flat-square&color=blue&label=npm)](https://www.npmjs.com/package/devarchitect-cli)
6
+ [![VS Marketplace](https://img.shields.io/visual-studio-marketplace/v/devarchitect.devarchitect.svg?style=flat-square&color=blue&label=VS%20Code%20Extension)](https://marketplace.visualstudio.com/items?itemName=devarchitect.devarchitect)
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/Addy3131/devarchitect/blob/main/LICENSE)
8
+ [![Bundle Size](https://img.shields.io/badge/bundle%20size-68%20KB-success.svg?style=flat-square)](https://bundlephobia.com/package/devarchitect-cli)
9
+ [![GitHub](https://img.shields.io/badge/GitHub-Addy3131%2Fdevarchitect-black?style=flat-square&logo=github)](https://github.com/Addy3131/devarchitect)
10
+
11
+ DevArchitect is an engineering intelligence platform that automatically maps software repositories, calculates transparent code health, prevents technical debt with the **Architecture Debt Ratchet**, and predicts change blast radius before code merges.
12
+
13
+ ---
14
+
15
+ ## 🚀 Quick Start (Zero Install)
16
+
17
+ Run DevArchitect on any repository instantly with `npx`:
18
+
19
+ ```bash
20
+ # Run codebase health check
21
+ npx devarchitect-cli health
22
+
23
+ # Launch the visual architecture studio (in-browser)
24
+ npx devarchitect-cli studio
25
+
26
+ # Validate architectural boundaries & rules
27
+ npx devarchitect-cli validate
28
+ ```
29
+
30
+ ### Global Installation
31
+
32
+ ```bash
33
+ npm install -g devarchitect-cli
34
+
35
+ # Run anywhere with 'devarchitect'
36
+ devarchitect health
37
+ devarchitect studio
38
+ ```
39
+
40
+ ---
41
+
42
+ ## ⚡ Core CLI Capabilities
43
+
44
+ ### 1. 🛡️ Code Health & Diagnostics
45
+ ```bash
46
+ devarchitect health # 0-100 score across 6 weighted architectural dimensions
47
+ devarchitect doctor # Diagnoses tsconfig, entry points & framework readiness
48
+ devarchitect inspect # Inspects components, services, hooks, routes & layers
49
+ devarchitect inspect --type component
50
+ devarchitect inspect --feature auth
51
+ ```
52
+
53
+ ### 2. 📊 Interactive Visual Studio & Dependency Graph
54
+ ```bash
55
+ devarchitect studio # Launches visual web studio with real-time physics canvas
56
+ devarchitect studio --port 4200 # Custom port with live in-browser codebase Q&A
57
+ devarchitect graph # Outputs dependency graph in Mermaid format
58
+ devarchitect graph -f dot # Outputs Graphviz DOT format
59
+ devarchitect ask "How is checkout architected?" # Graph-grounded AST architecture Q&A
60
+ ```
61
+
62
+ ### 3. 🚨 Policy Enforcement & Architecture Debt Ratchet
63
+ ```bash
64
+ devarchitect rules # Lists all active policy rules and presets (FSD, Clean)
65
+ devarchitect validate # Evaluates boundary violations & circular dependency cycles
66
+ devarchitect validate --update-baseline # Freezes existing debt into baseline ratchet
67
+ ```
68
+
69
+ > **The Architecture Debt Ratchet**: Stop arguing about legacy debt. Freeze existing debt into `.devarchitect/baseline.json`. In CI, `devarchitect validate` passes existing legacy debt while strictly failing on newly introduced architectural debt!
70
+
71
+ ### 4. 💥 PR Blast Radius & Git Guardrails
72
+ ```bash
73
+ devarchitect pr # Analyzes branch changes vs main with cumulative blast radius
74
+ devarchitect pr --staged # Evaluates staged changes before git commit
75
+ devarchitect pr --pre-push # Intercepts outgoing commits before git push
76
+ devarchitect install-hooks # Installs zero-dependency pre-commit & pre-push guardrails
77
+ devarchitect impact <file> # Calculates exact downstream callers for a specific file
78
+ devarchitect simulate <file> # Pre-flight simulator: "What breaks if I change this file?"
79
+ ```
80
+
81
+ ### 5. 🔍 Hotspots, Bloat, Secrets & Clean Code
82
+ ```bash
83
+ devarchitect env # Audits .env.example keys & flags private secret leaks in client UI
84
+ devarchitect deps # Detects phantom dependencies & unused zombie packages
85
+ devarchitect bloat # Detects barrel import traps (lodash, date-fns) & server code in UI
86
+ devarchitect test-map # Ranks untested architectural files by blast radius risk score
87
+ devarchitect deadcode # Unused exports, functions and orphaned files
88
+ devarchitect duplication # Identifies repeated logic blocks and duplication clusters
89
+ devarchitect rerenders # Analyzes React inline JSX allocations & hook re-render traps
90
+ devarchitect fix --dry-run # Preview safe automated fixes
91
+ devarchitect fix # Apply safe automated fixes (unused types, logs, empty catches)
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 💻 VS Code & Cursor IDE Extension
97
+
98
+ Prefer real-time feedback while coding? Install the official **[DevArchitect VS Code Extension](https://marketplace.visualstudio.com/items?itemName=devarchitect.devarchitect)**:
99
+
100
+ - **🛡️ Status Bar Code Health**: Live 0–100 health score in your editor.
101
+ - **💥 Inline CodeLens Blast Radius**: Displays caller counts above exported components.
102
+ - **📊 Embedded Architecture Studio**: Interactive visual graph directly inside a VS Code tab.
103
+ - **🚨 1-Click Violation Jumps**: Click any policy violation to jump directly to the offending line.
104
+
105
+ ---
106
+
107
+ ## ⚙️ Configuration (`.devarchitect/config.json`)
108
+
109
+ Scaffold a recommended configuration with:
110
+
111
+ ```bash
112
+ devarchitect init
113
+ ```
114
+
115
+ ```json
116
+ {
117
+ "$schema": "https://devarchitect.dev/schema/config.json",
118
+ "architecture": {
119
+ "preset": "recommended",
120
+ "rules": {
121
+ "no-circular-dependencies": "error",
122
+ "no-cross-feature-imports": "error",
123
+ "enforce-public-api": "warning",
124
+ "max-dependency-depth": "warning"
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ ---
131
+
132
+ ## 📄 License
133
+
134
+ MIT © [DevArchitect Contributors](https://github.com/Addy3131/devarchitect/blob/main/LICENSE)
135
+
package/dist/bin.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import {C}from'./chunk-YIDMYXTY.js';C();
2
+ import {C}from'./chunk-VHWMNHY2.js';C();