@stackbilt/cli 0.1.1 → 0.1.2

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