@stackbilt/cli 0.1.1 → 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.
Files changed (2) hide show
  1. package/README.md +113 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # @stackbilt/cli
2
+
3
+ CLI entry point for Charter Kit -- a local-first governance toolkit for software repositories. Orchestrates all other `@stackbilt/*` packages to parse commit trailers, score risk, detect blessed-stack drift, and classify change scope. No LLM calls at runtime.
4
+
5
+ > **This is the only package most users need.** One install gives you the full Charter Kit toolkit.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @stackbilt/cli
11
+ ```
12
+
13
+ This pulls in all Charter Kit packages automatically. You get the `charter` command globally.
14
+
15
+ For CI pipelines, install as a dev dependency instead:
16
+
17
+ ```bash
18
+ npm install --save-dev @stackbilt/cli
19
+ ```
20
+
21
+ Requires Node >= 18.
22
+
23
+ ## Quick Start
24
+
25
+ ```bash
26
+ charter setup # bootstrap .charter/ directory
27
+ charter doctor # check CLI + config health
28
+ charter validate # validate commit governance trailers
29
+ charter drift # scan for blessed-stack drift
30
+ charter audit # generate governance audit report
31
+ charter classify "migrate auth provider"
32
+ ```
33
+
34
+ ## Commands
35
+
36
+ ### `charter setup`
37
+
38
+ Bootstrap `.charter/` with config, patterns, and policies. Optionally generates a GitHub Actions workflow.
39
+
40
+ ```bash
41
+ charter setup --ci github --yes
42
+ ```
43
+
44
+ ### `charter init`
45
+
46
+ Scaffold `.charter/` config templates only.
47
+
48
+ ### `charter doctor`
49
+
50
+ Validate CLI installation and `.charter/` config.
51
+
52
+ ### `charter validate`
53
+
54
+ Validate git commits for `Governed-By` and `Resolves-Request` trailers.
55
+
56
+ ```bash
57
+ charter validate --ci --format json
58
+ ```
59
+
60
+ ### `charter drift`
61
+
62
+ Scan files against blessed-stack patterns in `.charter/patterns/*.json`.
63
+
64
+ ```bash
65
+ charter drift --path ./src --ci
66
+ ```
67
+
68
+ ### `charter audit`
69
+
70
+ Generate a governance audit report covering trailers, risk, and drift.
71
+
72
+ ### `charter classify`
73
+
74
+ Classify a change as `SURFACE`, `LOCAL`, or `CROSS_CUTTING`.
75
+
76
+ ```bash
77
+ charter classify "update button color"
78
+ ```
79
+
80
+ ## Global Options
81
+
82
+ | Option | Description | Default |
83
+ |---|---|---|
84
+ | `--config <path>` | Path to `.charter/` directory | `.charter/` |
85
+ | `--format <mode>` | Output: `text` or `json` | `text` |
86
+ | `--ci` | CI mode: exit non-zero on WARN or FAIL | off |
87
+ | `--yes` | Auto-accept safe setup overwrites | off |
88
+
89
+ ## Exit Codes
90
+
91
+ | Code | Meaning |
92
+ |------|---------|
93
+ | 0 | Success |
94
+ | 1 | Policy violation (CI mode) |
95
+ | 2 | Runtime or usage error |
96
+
97
+ ## Related Packages
98
+
99
+ - `@stackbilt/types` -- shared enums and interfaces
100
+ - `@stackbilt/core` -- Zod schemas and sanitization helpers
101
+ - `@stackbilt/git` -- trailer parsing and commit risk assessment
102
+ - `@stackbilt/classify` -- heuristic change classification
103
+ - `@stackbilt/drift` -- blessed-stack pattern drift detection
104
+ - `@stackbilt/validate` -- citation validation and intent classification
105
+ - `@stackbilt/ci` -- GitHub Actions integration helpers
106
+
107
+ ## License
108
+
109
+ Apache-2.0
110
+
111
+ ## Repository
112
+
113
+ [https://github.com/Stackbilt-dev/charter](https://github.com/Stackbilt-dev/charter)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackbilt/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Charter CLI — repo-level governance checks",
5
5
  "bin": {
6
6
  "charter": "./dist/bin.js"