Skip to content

Commit 540b3c4

Browse files
committed
Release RelayX v0.1.15 operator UX
1 parent 0cce9b9 commit 540b3c4

21 files changed

Lines changed: 1261 additions & 87 deletions

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ relayx opsec List or inspect OPSEC policies
248248
relayx modules List execution module manifests
249249
relayx module-plan Evaluate execution modules for one path
250250
relayx run Run the guarded execution state machine
251+
relayx console Start a local operator console with context prompts
252+
relayx completion Print bash, zsh, or fish completion scripts
251253
relayx rank Rank paths by impact, confidence, and OPSEC cost
252254
relayx explain Explain one host or one path
253255
relayx fixes Show remediation priorities
@@ -259,11 +261,17 @@ RelayX also includes curated help topics:
259261

260262
```bash
261263
relayx help
264+
relayx help getting-started
262265
relayx help commands
263266
relayx help workflows
264267
relayx help exports
265268
relayx help short-options
266269
relayx help safety
270+
relayx help calibration
271+
relayx help execution
272+
relayx help enterprise
273+
relayx help troubleshooting
274+
relayx help completion
267275
relayx help scan
268276
relayx help run --format json
269277
relayx help schema
@@ -292,6 +300,23 @@ such as `-A/--auth-validation`, `-y/--confirm`, and `-P/--opsec-policy` are
292300
only aliases; RelayX still enforces operator, reason, scope, audit, and adapter
293301
guardrails.
294302

303+
## Operator Console And Completion
304+
305+
RelayX includes a local operator console for repeated analysis on the same
306+
result and path. It is not a C2 client and does not start listeners, pivot
307+
sessions, source triggers, or live relay adapters; it calls the same guarded
308+
CLI handlers with remembered context.
309+
310+
```bash
311+
relayx console --result result.json --path-id PX-0001 --opsec-policy strict
312+
relayx completion zsh > relayx.zsh
313+
relayx help getting-started
314+
```
315+
316+
Inside the console, use commands such as `use result <file>`, `use path
317+
PX-0001`, `set opsec-policy strict`, `show summary`, `show paths`, `explain`,
318+
`validate`, `run`, `export`, `bundle`, `help`, `back`, and `exit`.
319+
295320
## Output Formats
296321

297322
- `json`: full RelayX result or command output for automation.

docs/CLI.md

Lines changed: 102 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# RelayX CLI Help
22

3-
RelayX keeps standard `-h` output for every command and adds curated help topics
4-
for workflows, examples, exports, and safety boundaries.
3+
RelayX keeps standard `-h` output for every command and adds registry-backed
4+
curated help topics for workflows, examples, exports, OPSEC boundaries,
5+
completion, and troubleshooting. The CommandSpec registry is the single source
6+
for grouped command help, short-option documentation, shell completion, and
7+
quality-gate drift checks.
58

69
For a complete end-to-end offline walkthrough, use
710
[`docs/TUTORIAL.md`](TUTORIAL.md) with the fixtures in
@@ -13,11 +16,17 @@ Authorized AD/IIS/AD CS/MSSQL integration-test expectations are documented in
1316

1417
```bash
1518
relayx help
19+
relayx help getting-started
1620
relayx help commands
1721
relayx help workflows
1822
relayx help exports
1923
relayx help short-options
2024
relayx help safety
25+
relayx help calibration
26+
relayx help execution
27+
relayx help enterprise
28+
relayx help troubleshooting
29+
relayx help completion
2130
relayx help scan
2231
relayx help run
2332
relayx help schema
@@ -34,19 +43,100 @@ relayx help export -f json
3443

3544
`-q` is an alias for `--no-banner`, and `-V` is an alias for `--version`.
3645

46+
Command-specific curated help uses a consistent operator format:
47+
48+
```text
49+
What it does
50+
When to use
51+
Required inputs
52+
Safety notes
53+
Examples
54+
Short options
55+
Output formats and contracts
56+
Common mistakes
57+
Next steps
58+
```
59+
3760
## Command Groups
3861

39-
- Assessment: `scan`, `assess`, `summary`, `matrix`, `sources`, `routes`,
40-
`paths`, `rank`, `explain`
41-
- Analysis: `calculus`, `controls`, `fixes`, `plan`, `evidence-report`,
42-
`calibrate`, `compare-baseline`, `lab-matrix`, `lab-corpus`, `lab-verify`,
43-
`lab-provenance`, `lab-stability`, `lab-diff`, `lab-profile`
44-
- Validation: `validate`, `source-check`, `source-plan`, `run`
62+
- Assessment: `scan`, `assess`, `summary`, `matrix`, `sources`, `paths`,
63+
`rank`, `explain`
64+
- Evidence: `calculus`, `controls`, `fixes`, `plan`, `evidence-report`
65+
- Calibration: `calibrate`, `compare-baseline`, `lab-matrix`, `lab-corpus`,
66+
`lab-verify`, `lab-provenance`, `lab-stability`, `lab-diff`, `lab-index`,
67+
`lab-profile`
68+
- Route/Pivot: `routes`, `source-check`, `source-plan`
69+
- Validation: `validate`
70+
- Controlled Execution: `modules`, `module-plan`, `run`
4571
- Enterprise: `profiles`, `report`, `export`, `bundle`, `diff`,
46-
`simulate-fixes`, `quality-gate`
47-
- Modules: `modules`, `module-plan`
48-
- Contracts: `schema`
49-
- Policy: `opsec`
72+
`simulate-fixes`
73+
- Admin: `help`, `completion`, `console`, `opsec`, `schema`, `quality-gate`
74+
75+
## Operator Console
76+
77+
`relayx console` provides a local, single-process operator shell for repeated
78+
work on the same result, path, OPSEC policy, and scope. It is inspired by
79+
mature operator consoles, but it is not a C2 runtime: there is no server-client
80+
split, no listener start, no pivot-session operation, no source-side trigger
81+
execution, and no live relay adapter registration.
82+
83+
```bash
84+
relayx console
85+
relayx console --result examples/tutorial/sample-result.json --path-id PX-0001 --opsec-policy strict
86+
relayx console --script console.txt
87+
```
88+
89+
The prompt reflects context:
90+
91+
```text
92+
relayx>
93+
relayx[result:sample-result.json policy:standard]>
94+
relayx[result:sample-result.json path:PX-0001 policy:strict scope:set]>
95+
```
96+
97+
Supported console commands:
98+
99+
```text
100+
use result <file> Select a RelayX result and clear the current path
101+
use path <id> Select a path such as PX-0001
102+
set opsec-policy <policy> Set the policy used by validate/run shortcuts
103+
set scope <scope> Set scope text or a scope file for validate/run
104+
context Show current result, path, policy, and scope
105+
show summary Run summary with the selected result
106+
show paths Run paths with the selected result
107+
show matrix Run matrix with the selected result
108+
show sources Run sources with the selected result
109+
explain [query] Explain a query or the selected path
110+
validate [args...] Run validate with context-filled result/path/policy
111+
run [args...] Run controlled execution with context-filled inputs
112+
export [args...] Run export with context-filled result
113+
bundle [args...] Run bundle with context-filled result
114+
help [topic] Render curated RelayX help
115+
back Clear path first, then result
116+
exit Leave the console
117+
```
118+
119+
Console shortcuts call the same CLI handlers and preserve the same guardrails.
120+
Confirmed validation and execution still require explicit confirmation,
121+
operator, reason, audit log, and any required scope. Script mode returns exit
122+
code `2` on the first failed console command, which makes it suitable for
123+
runbook smoke tests.
124+
125+
## Shell Completion
126+
127+
`relayx completion bash|zsh|fish` prints shell completion generated from the
128+
CommandSpec registry. Completion covers commands, curated help topics, common
129+
flags, output formats, schema kinds, export formats, and built-in OPSEC policy
130+
names.
131+
132+
```bash
133+
relayx completion bash > relayx.bash
134+
relayx completion zsh > relayx.zsh
135+
relayx completion fish > relayx.fish
136+
```
137+
138+
Completion only suggests syntax. It does not weaken authorization, OPSEC,
139+
scope, audit, or adapter checks.
50140

51141
## Short Options
52142

docs/README.fr.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ relayx opsec Liste ou inspecte les politiques OPSEC
246246
relayx modules Liste les manifests de modules d'execution
247247
relayx module-plan Evalue les modules d'execution pour un chemin
248248
relayx run Lance la machine d'etats d'execution controlee
249+
relayx console Lance une console operateur locale avec contexte
250+
relayx completion Genere les completions bash, zsh ou fish
249251
relayx rank Classe les chemins par impact, confiance et cout OPSEC
250252
relayx explain Explique un host ou un chemin
251253
relayx fixes Affiche les priorites de remediation
@@ -257,11 +259,17 @@ RelayX inclut aussi des rubriques d'aide guidees :
257259

258260
```bash
259261
relayx help
262+
relayx help getting-started
260263
relayx help commands
261264
relayx help workflows
262265
relayx help exports
263266
relayx help short-options
264267
relayx help safety
268+
relayx help calibration
269+
relayx help execution
270+
relayx help enterprise
271+
relayx help troubleshooting
272+
relayx help completion
265273
relayx help scan
266274
relayx help run --format json
267275
relayx help schema
@@ -292,6 +300,24 @@ sensibles comme `-A/--auth-validation`, `-y/--confirm` et
292300
`-P/--opsec-policy` ne changent pas les guardrails: RelayX continue d'exiger
293301
operator, reason, scope, audit et adapter policy.
294302

303+
## Console Operateur Et Completion
304+
305+
`relayx console` est une console operateur locale, mono-processus, pour
306+
travailler plusieurs fois sur le meme result, path, OPSEC policy et scope.
307+
Ce n'est pas un client C2: elle ne lance pas de listener, pivot session,
308+
source trigger ou live relay adapter. Les commandes de la console appellent
309+
les memes handlers CLI et conservent les memes guardrails.
310+
311+
```bash
312+
relayx console --result result.json --path-id PX-0001 --opsec-policy strict
313+
relayx completion zsh > relayx.zsh
314+
relayx help getting-started
315+
```
316+
317+
Dans la console, utilisez `use result <file>`, `use path PX-0001`, `set
318+
opsec-policy strict`, `show summary`, `show paths`, `explain`, `validate`,
319+
`run`, `export`, `bundle`, `help`, `back` et `exit`.
320+
295321
## Formats de sortie
296322

297323
- `json` : resultat RelayX complet ou sortie de commande pour l'automatisation.

docs/README.zh-CN.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ relayx opsec 列出或查看 OPSEC policy
232232
relayx modules 列出 execution module manifest
233233
relayx module-plan 评估 execution module 是否适用于某条 path
234234
relayx run 运行受控 execution state machine
235+
relayx console 启动带上下文 prompt 的本地 operator console
236+
relayx completion 输出 bash、zsh 或 fish completion 脚本
235237
relayx rank 按 impact、confidence 和 OPSEC cost 排序 path
236238
relayx explain 解释某个 host 或 path
237239
relayx fixes 展示修复优先级
@@ -243,11 +245,17 @@ RelayX 也提供 curated help topic:
243245

244246
```bash
245247
relayx help
248+
relayx help getting-started
246249
relayx help commands
247250
relayx help workflows
248251
relayx help exports
249252
relayx help short-options
250253
relayx help safety
254+
relayx help calibration
255+
relayx help execution
256+
relayx help enterprise
257+
relayx help troubleshooting
258+
relayx help completion
251259
relayx help scan
252260
relayx help run --format json
253261
relayx help schema
@@ -275,6 +283,23 @@ relayx quality-gate -C . -f json -o relayx-quality-gate.json
275283
`-y/--confirm``-P/--opsec-policy` 这类安全敏感选项只是别名;RelayX 仍然
276284
强制执行 operator、reason、scope、audit 和 adapter guardrail。
277285

286+
## Operator Console 与 Completion
287+
288+
`relayx console` 是本地单进程 operator console,用来在同一个 result、path、
289+
OPSEC policy 和 scope 上重复分析。它不是 C2 client,不启动 listener、pivot
290+
session、source trigger 或 live relay adapter;console 命令仍调用同一套 CLI
291+
handler 和 guardrail。
292+
293+
```bash
294+
relayx console --result result.json --path-id PX-0001 --opsec-policy strict
295+
relayx completion zsh > relayx.zsh
296+
relayx help getting-started
297+
```
298+
299+
console 内可使用 `use result <file>``use path PX-0001`、`set opsec-policy
300+
strict``show summary``show paths``explain``validate``run``export`、
301+
`bundle``help``back``exit`
302+
278303
## 输出格式
279304

280305
- `json`:完整 RelayX result 或命令输出,适合自动化处理。

docs/TUTORIAL.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,19 @@ From the repository root:
5050
```bash
5151
relayx -V
5252
relayx -q help workflows
53+
relayx -q help getting-started
5354
relayx -q quality-gate -C .
5455
```
5556

57+
Optional shell completion can make longer RelayX commands easier to use during
58+
runbook development:
59+
60+
```bash
61+
relayx completion zsh > /tmp/relayx.zsh
62+
relayx completion bash > /tmp/relayx.bash
63+
relayx completion fish > /tmp/relayx.fish
64+
```
65+
5666
Validate the tutorial fixtures:
5767

5868
```bash
@@ -62,6 +72,27 @@ relayx -q schema validate -k result examples/tutorial/baseline-result.json
6272

6373
The expected validation result is `valid: true` with zero errors.
6474

75+
You can also use `relayx console`, the local operator console, for repeated work on the same
76+
result. The console remembers selected result, path, OPSEC policy, and scope;
77+
it still calls the same CLI handlers and does not start listeners, pivots,
78+
source triggers, or live relay adapters.
79+
80+
```bash
81+
relayx -q console --result examples/tutorial/sample-result.json --path-id PX-0001 --opsec-policy strict
82+
```
83+
84+
Example console commands:
85+
86+
```text
87+
context
88+
show summary
89+
show paths
90+
explain
91+
validate --mode dry-run
92+
run --mode dry-run
93+
exit
94+
```
95+
6596
## 1. Inspect The Result
6697

6798
Start with a compact summary:

fixtures/enterprise_output_matrix.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"module-plan",
1313
"report",
1414
"schema",
15-
"lab-provenance"
15+
"lab-provenance",
16+
"console",
17+
"completion"
1618
],
1719
"export_formats": [
1820
"opengraph",
@@ -129,8 +131,12 @@
129131
"package.metadata",
130132
"version.consistency",
131133
"quality_gate.contract",
134+
"cli.help_registry",
132135
"cli.short_options",
133136
"cli.short_options.docs",
137+
"cli.console_contract",
138+
"cli.completion_contract",
139+
"docs.cli_sync",
134140
"schema.catalog",
135141
"fixtures.json",
136142
"fixtures.evidence_report",
@@ -204,7 +210,7 @@
204210
"docs/INSTALL.md"
205211
],
206212
"release": {
207-
"version": "0.1.14",
213+
"version": "0.1.15",
208214
"console_script": "relayx",
209215
"pipx_installable": true
210216
},

fixtures/execution_modules/lab_only_target_relay_fixture.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"key": "lab_only_target_relay_fixture",
33
"label": "Lab-only target relay adapter fixture",
4-
"version": "0.1.14-fixture",
4+
"version": "0.1.15-fixture",
55
"supported": false,
66
"lab_only": true,
77
"description": "Fixture manifest for a future live target relay adapter contract. It is intentionally not registered or supported.",

fixtures/execution_modules/ntlmrelayx_compat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"key": "ntlmrelayx_compat",
33
"label": "ntlmrelayx-inspired compatibility boundary",
4-
"version": "0.1.14-fixture",
4+
"version": "0.1.15-fixture",
55
"supported": false,
66
"lab_only": true,
77
"description": "Fixture manifest for a future Impacket-style adapter boundary.",

0 commit comments

Comments
 (0)