@anarchitects/governance-cli 0.0.2 → 0.0.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 CHANGED
@@ -35,6 +35,14 @@ The public package surface is intentionally small:
35
35
 
36
36
  ```ts
37
37
  import {
38
+ AGOV_EXIT_CONFIGURATION_FAILURE,
39
+ AGOV_EXIT_GOVERNANCE_FAILURE,
40
+ AGOV_EXIT_RUNTIME_FAILURE,
41
+ AGOV_EXIT_SUCCESS,
42
+ loadGenericWorkspace,
43
+ loadStandaloneGovernanceProfile,
44
+ parseAgovCliArgs,
45
+ runAgovCli,
38
46
  runAgovCheck,
39
47
  type AgovCheckOptions,
40
48
  type AgovCheckResult,
@@ -46,13 +54,16 @@ import {
46
54
  The root export currently includes:
47
55
 
48
56
  - `runAgovCheck(...)`
57
+ - `runAgovCli(...)`
58
+ - `parseAgovCliArgs(...)`
59
+ - `loadGenericWorkspace(...)`
60
+ - `loadStandaloneGovernanceProfile(...)`
61
+ - stable CLI exit-code constants
49
62
  - `AgovCheckOptions`
50
63
  - `AgovCheckResult`
51
64
  - `AgovCheckWithAdapterOptions`
52
65
  - `AgovCheckWithWorkspacePathOptions`
53
66
 
54
- The executable command parser and runtime host internals remain internal modules.
55
-
56
67
  Parity already covered inside this package includes:
57
68
 
58
69
  - standalone `agov` command orchestration
@@ -60,6 +71,9 @@ Parity already covered inside this package includes:
60
71
  - standalone profile loading and validation
61
72
  - adapter-agnostic runtime selection and exit-code behavior
62
73
 
74
+ That parity is now available as package-root APIs for host tooling and tests
75
+ without introducing any Nx dependency.
76
+
63
77
  ## Executable Usage
64
78
 
65
79
  This package publishes an `agov` executable through `package.json#bin`.
@@ -105,6 +119,22 @@ console.log(result.success);
105
119
  console.log(result.assessment.health.status);
106
120
  ```
107
121
 
122
+ Programmatic CLI parsing and exit-code execution are also available:
123
+
124
+ ```ts
125
+ import {
126
+ AGOV_EXIT_SUCCESS,
127
+ parseAgovCliArgs,
128
+ runAgovCli,
129
+ } from '@anarchitects/governance-cli';
130
+
131
+ const parsed = parseAgovCliArgs(['check', '--help']);
132
+ const exitCode = await runAgovCli(['check', '--help']);
133
+
134
+ console.log(parsed.kind);
135
+ console.log(exitCode === AGOV_EXIT_SUCCESS);
136
+ ```
137
+
108
138
  ## Adapter Model
109
139
 
110
140
  `@anarchitects/governance-cli` is adapter-agnostic.