@archinsight/cli 3.0.1 → 3.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 +95 -8
- package/build/index.js +5352 -3598
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -11,8 +11,9 @@ It embeds `@insight/language` directly and does not call the web app.
|
|
|
11
11
|
```shell
|
|
12
12
|
archinsight link [project-dir] [--format text|json] [--out file]
|
|
13
13
|
archinsight structure [project-dir] [--format text|json] [--out file]
|
|
14
|
-
archinsight query [project-dir] -
|
|
15
|
-
archinsight render [project-dir] -
|
|
14
|
+
archinsight query [project-dir] [-s <source>] [-c <context>] [-v c1|c2|c3|c4|deployment-system|deployment-container|deployment|no-filter] [-e <environment>] [-q query.aiq] [-f text|json] [-o file]
|
|
15
|
+
archinsight render [project-dir] [-s <source>] [-c <context>] [-v c1|c2|c3|c4|deployment-system|deployment-container|deployment|no-filter] [-e <environment>] [-q query.aiq] [-f dot|svg|json] [-o file]
|
|
16
|
+
archinsight environments [project-dir] [-s <source>] [--format text|json] [--out file]
|
|
16
17
|
archinsight skill init [project-dir] [--target generic|codex|claude] [--out dir] [--force]
|
|
17
18
|
```
|
|
18
19
|
|
|
@@ -20,10 +21,14 @@ archinsight skill init [project-dir] [--target generic|codex|claude] [--out dir]
|
|
|
20
21
|
|
|
21
22
|
## Common Options
|
|
22
23
|
|
|
23
|
-
- `-
|
|
24
|
-
|
|
24
|
+
- `-s, --source <file>` - selected model file. It supplies `$tab` and determines
|
|
25
|
+
the context for the diagram.
|
|
26
|
+
- `-c, --context <id>` - explicit context for context-wide execution without a
|
|
27
|
+
source. When both options are present, the context must match the selected
|
|
28
|
+
file.
|
|
25
29
|
- `--tab <source>` - compatibility alias for `--source`.
|
|
26
|
-
- `-v, --view <name>` - built-in view: `c1`, `c2`, `c3`, `c4`, `deployment`, `no-filter`.
|
|
30
|
+
- `-v, --view <name>` - built-in view: `c1`, `c2`, `c3`, `c4`, `deployment-system`, `deployment-container`, `deployment`, `no-filter`.
|
|
31
|
+
- `-e, --environment <id>` - environment selected for `deployment-container`. It may be omitted when the source reaches exactly one environment.
|
|
27
32
|
- `-q, --query <file>` - custom query file; overrides `--view`; relative paths
|
|
28
33
|
are resolved from `project-dir`.
|
|
29
34
|
- `-f, --format <format>` - command output format.
|
|
@@ -35,19 +40,83 @@ archinsight skill init [project-dir] [--target generic|codex|claude] [--out dir]
|
|
|
35
40
|
- `-V, --version` - print version.
|
|
36
41
|
- `-h, --help` - print help.
|
|
37
42
|
|
|
43
|
+
## Diagram Scope
|
|
44
|
+
|
|
45
|
+
The selected source is the normal entry point for a diagram. C2, C3, C4, D1,
|
|
46
|
+
D2, and the legacy Deployment view are source-centric and require `--source`
|
|
47
|
+
when the project contains several `.ai` files. If `project-dir` points directly
|
|
48
|
+
to one `.ai` file, that file is selected automatically.
|
|
49
|
+
|
|
50
|
+
C1 uses the context declared by the selected source and opens that context
|
|
51
|
+
boundary completely. It can also run without a source when `--context <id>` is
|
|
52
|
+
provided. `no-filter` follows the same context-wide rule.
|
|
53
|
+
|
|
54
|
+
The CLI validates explicit scope. An unknown context is an error, and a context
|
|
55
|
+
that differs from the one declared by `--source` is a conflict rather than an
|
|
56
|
+
override. A custom query that uses `$tab` requires a source. A custom query that
|
|
57
|
+
uses `$context` receives it from the selected source or from an explicit
|
|
58
|
+
`--context`.
|
|
59
|
+
|
|
60
|
+
D1 selects every environment relevant to the source and does not accept
|
|
61
|
+
`--environment`. D2 selects one environment. The CLI chooses it automatically
|
|
62
|
+
when exactly one is relevant and otherwise lists the available environments and
|
|
63
|
+
requires `--environment <id>`.
|
|
64
|
+
|
|
65
|
+
## Environment Discovery
|
|
66
|
+
|
|
67
|
+
List every declared environment without parsing model sources:
|
|
68
|
+
|
|
69
|
+
```shell
|
|
70
|
+
archinsight environments . --format json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Add a source to return only the environments relevant to that source's D2
|
|
74
|
+
diagram:
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
archinsight environments . --source storefront.ai --format json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The JSON response has a versioned, automation-friendly shape:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"schemaVersion": "deployment-environments.v1",
|
|
85
|
+
"source": "storefront.ai",
|
|
86
|
+
"environments": [
|
|
87
|
+
{
|
|
88
|
+
"id": "eu_west",
|
|
89
|
+
"name": "Europe West",
|
|
90
|
+
"source": "infrastructure/eu-west.ai"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The top-level `source` is `null` for the complete project inventory. Each
|
|
97
|
+
environment entry contains the model source that declares its infrastructure.
|
|
98
|
+
Text output contains one tab-separated `id`, `name`, and source path per line.
|
|
99
|
+
|
|
38
100
|
## Examples
|
|
39
101
|
|
|
40
102
|
Link a project and print diagnostics:
|
|
41
103
|
|
|
42
104
|
```shell
|
|
43
105
|
npm --prefix archinsight-cli run build
|
|
44
|
-
node archinsight-cli/build/index.js link examples --format text
|
|
106
|
+
node archinsight-cli/build/index.js link examples/layered-architecture.ai --format text
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Render DOT from a model file using the C2 built-in query:
|
|
110
|
+
|
|
111
|
+
```shell
|
|
112
|
+
node archinsight-cli/build/index.js render examples/layered-architecture.ai -v c2 -f dot
|
|
45
113
|
```
|
|
46
114
|
|
|
47
|
-
|
|
115
|
+
Inspect one environment at container deployment detail:
|
|
48
116
|
|
|
49
117
|
```shell
|
|
50
|
-
|
|
118
|
+
archinsight environments . -s storefront.ai --format json
|
|
119
|
+
archinsight query . -s storefront.ai -v deployment-container --environment eu_west --format json
|
|
51
120
|
```
|
|
52
121
|
|
|
53
122
|
Generate a portable AI-agent guide for an Insight project:
|
|
@@ -72,6 +141,7 @@ The generic target writes a runtime-neutral guide:
|
|
|
72
141
|
c3-components.md
|
|
73
142
|
c4-code.md
|
|
74
143
|
deployment.md
|
|
144
|
+
deployment-projections.md
|
|
75
145
|
scaling.md
|
|
76
146
|
project-structure.md
|
|
77
147
|
core.md
|
|
@@ -85,13 +155,26 @@ The generic target writes a runtime-neutral guide:
|
|
|
85
155
|
layered-architecture.ai
|
|
86
156
|
c1-context.ai
|
|
87
157
|
c2-containers.ai
|
|
158
|
+
c2-file-split/
|
|
159
|
+
context.ai
|
|
160
|
+
storefront.ai
|
|
88
161
|
c3-components.ai
|
|
162
|
+
c3-file-split/
|
|
163
|
+
system.ai
|
|
164
|
+
checkout-components.ai
|
|
165
|
+
web-components.ai
|
|
89
166
|
c4-code/
|
|
90
167
|
definitions.ai
|
|
91
168
|
model.ai
|
|
92
169
|
deployment-framework.ai
|
|
93
170
|
deployment-infrastructure.ai
|
|
94
171
|
deployment.ai
|
|
172
|
+
deployment-projections/
|
|
173
|
+
gateway/
|
|
174
|
+
storage/
|
|
175
|
+
broker/
|
|
176
|
+
egress/
|
|
177
|
+
monitoring/
|
|
95
178
|
deployment-private-gateway/
|
|
96
179
|
deployment-framework.ai
|
|
97
180
|
source-infra.ai
|
|
@@ -106,9 +189,13 @@ The generic target writes a runtime-neutral guide:
|
|
|
106
189
|
c2.aiq
|
|
107
190
|
c3.aiq
|
|
108
191
|
c4.aiq
|
|
192
|
+
deployment-system.aiq
|
|
193
|
+
deployment-container.aiq
|
|
109
194
|
deployment.aiq
|
|
110
195
|
queries/
|
|
111
196
|
deployment-internal-actors.aiq
|
|
197
|
+
direct-service-dependencies.aiq
|
|
198
|
+
kafka-service-dependencies.aiq
|
|
112
199
|
```
|
|
113
200
|
|
|
114
201
|
Codex and Claude targets package the same Insight reference directly into the
|