mirrorneuron-cli 1.0.0__tar.gz → 1.1.0__tar.gz

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 (42) hide show
  1. mirrorneuron_cli-1.1.0/PKG-INFO +198 -0
  2. mirrorneuron_cli-1.1.0/README.md +184 -0
  3. mirrorneuron_cli-1.1.0/mirrorneuron_cli.egg-info/PKG-INFO +198 -0
  4. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mirrorneuron_cli.egg-info/SOURCES.txt +3 -1
  5. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/main.py +7 -0
  6. mirrorneuron_cli-1.1.0/mn_cli/update_cmds.py +409 -0
  7. mirrorneuron_cli-1.1.0/tests/test_update_cmds.py +113 -0
  8. mirrorneuron_cli-1.0.0/PKG-INFO +0 -73
  9. mirrorneuron_cli-1.0.0/README.md +0 -59
  10. mirrorneuron_cli-1.0.0/mirrorneuron_cli.egg-info/PKG-INFO +0 -73
  11. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/.github/workflows/ci.yml +0 -0
  12. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/.github/workflows/release.yml +0 -0
  13. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/.gitignore +0 -0
  14. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/LICENSE +0 -0
  15. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/RELEASE.md +0 -0
  16. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mirrorneuron_cli.egg-info/dependency_links.txt +0 -0
  17. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mirrorneuron_cli.egg-info/entry_points.txt +0 -0
  18. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mirrorneuron_cli.egg-info/requires.txt +0 -0
  19. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mirrorneuron_cli.egg-info/top_level.txt +0 -0
  20. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/__init__.py +0 -0
  21. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/config.py +0 -0
  22. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/error_handler.py +0 -0
  23. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/libs/__init__.py +0 -0
  24. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/libs/blueprint_cmds.py +0 -0
  25. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/libs/job_cmds.py +0 -0
  26. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/libs/run_cmds.py +0 -0
  27. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/libs/sys_cmds.py +0 -0
  28. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/libs/ui.py +0 -0
  29. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/logging_config.py +0 -0
  30. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/server_cmds.py +0 -0
  31. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/mn_cli/shared.py +0 -0
  32. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/pyproject.toml +0 -0
  33. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/scripts/check-release-artifacts.sh +0 -0
  34. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/scripts/make-release-zip.sh +0 -0
  35. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/scripts/validate-version-tag.sh +0 -0
  36. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/setup.cfg +0 -0
  37. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/tests/conftest.py +0 -0
  38. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/tests/test_blueprint_cmds.py +0 -0
  39. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/tests/test_job_cmds.py +0 -0
  40. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/tests/test_run_cmds.py +0 -0
  41. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/tests/test_server_cmds.py +0 -0
  42. {mirrorneuron_cli-1.0.0 → mirrorneuron_cli-1.1.0}/tests/test_sys_cmds.py +0 -0
@@ -0,0 +1,198 @@
1
+ Metadata-Version: 2.4
2
+ Name: mirrorneuron-cli
3
+ Version: 1.1.0
4
+ Summary: MirrorNeuron CLI
5
+ License-Expression: MIT
6
+ Classifier: Programming Language :: Python :: 3
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: mirrorneuron-python-sdk
11
+ Requires-Dist: typer>=0.9.0
12
+ Requires-Dist: rich>=13.0.0
13
+ Dynamic: license-file
14
+
15
+ # MirrorNeuron CLI
16
+
17
+ Command-line interface for operating a local MirrorNeuron installation.
18
+
19
+ The CLI submits workflow bundles, monitors jobs, manages the local runtime services, and runs blueprint workflows through a shared command surface.
20
+
21
+ ## Features
22
+
23
+ - Submit, inspect, pause, resume, cancel, and clear runtime jobs.
24
+ - Stream job events and inspect dead-letter records.
25
+ - Start and stop the local MirrorNeuron components.
26
+ - Run blueprint catalog entries or local blueprint folders.
27
+ - Export blueprint run artifacts as Markdown or static HTML.
28
+ - Check for released package updates and install them after user confirmation.
29
+
30
+ ## Tech Stack
31
+
32
+ | Area | Tooling |
33
+ | --- | --- |
34
+ | Runtime | Python 3.9+ |
35
+ | CLI framework | Typer |
36
+ | Terminal rendering | Rich |
37
+ | Core client | `mirrorneuron-python-sdk` |
38
+ | Packaging | setuptools with setuptools-scm |
39
+
40
+ ## Prerequisites
41
+
42
+ - Python 3.9 or newer.
43
+ - A MirrorNeuron core reachable over gRPC.
44
+ - Docker for the default local core and Redis workflow.
45
+ - Optional: the released-package installer from `mn-deploy`, which installs and wires the CLI automatically.
46
+
47
+ ## Installation
48
+
49
+ The released-package installer installs this package and exposes `mn` on your `PATH`.
50
+
51
+ Standalone install:
52
+
53
+ ```bash
54
+ pip install mirrorneuron-cli
55
+ ```
56
+
57
+ Developer install:
58
+
59
+ ```bash
60
+ python3 -m venv .venv
61
+ source .venv/bin/activate
62
+ pip install -e .
63
+ ```
64
+
65
+ ## Configuration
66
+
67
+ | Variable | Default | Description |
68
+ | --- | --- | --- |
69
+ | `MN_GRPC_TARGET` | `localhost:50051` | Core gRPC target. |
70
+ | `MN_CORE_GRPC_TARGET` | unset | Fallback core gRPC target. |
71
+ | `MN_GRPC_TIMEOUT_SECONDS` | `10` | RPC timeout. Use `0` or `none` to disable. |
72
+ | `MN_GRPC_AUTH_TOKEN` | unset | Optional bearer metadata for protected gateways. |
73
+ | `MN_CLI_LOG_PATH` | `~/.mn/logs/cli.log` | CLI log file path. |
74
+ | `MN_CLI_OUTPUT` | `rich` | Set to `plain` to disable Rich formatting. |
75
+ | `MN_DISABLE_UPDATE_CHECK` | unset | Set to `1`, `true`, or `yes` to disable automatic update checks. |
76
+ | `MN_UPDATE_CHECK_INTERVAL_SECONDS` | `86400` | Minimum time between automatic update checks. |
77
+ | `MN_CORE_REPO` | `MirrorNeuronLab/MirrorNeuron` | GitHub repository used for core release update checks. |
78
+
79
+ ## Usage
80
+
81
+ Check the runtime:
82
+
83
+ ```bash
84
+ mn nodes
85
+ mn metrics
86
+ ```
87
+
88
+ Submit and inspect a workflow:
89
+
90
+ ```bash
91
+ mn validate ./bundle
92
+ mn run ./bundle
93
+ mn list
94
+ mn status <job_id>
95
+ mn monitor <job_id>
96
+ ```
97
+
98
+ Manage jobs:
99
+
100
+ ```bash
101
+ mn pause <job_id>
102
+ mn resume <job_id>
103
+ mn cancel <job_id>
104
+ mn dead-letters <job_id>
105
+ mn clear
106
+ ```
107
+
108
+ Manage local services:
109
+
110
+ ```bash
111
+ mn start
112
+ mn stop
113
+ ```
114
+
115
+ ## Blueprint Commands
116
+
117
+ Blueprint commands are grouped under `mn blueprint`.
118
+
119
+ ```bash
120
+ mn blueprint list
121
+ mn blueprint install
122
+ mn blueprint update
123
+ mn blueprint run <blueprint_id>
124
+ mn blueprint run ./path/to/bundle_or_source_blueprint
125
+ mn blueprint run <blueprint_id> --offline
126
+ mn blueprint run <blueprint_id> --revision <git_sha_or_tag>
127
+ mn blueprint monitor --follow
128
+ mn blueprint tail <run_id>
129
+ mn blueprint compare <run_a> <run_b>
130
+ mn blueprint export <run_id> --format markdown
131
+ mn blueprint export <run_id> --format html
132
+ ```
133
+
134
+ `mn blueprint run` accepts either an installed blueprint ID or a local folder. If the folder is already a bundle, the CLI submits it directly. If the folder is a Python source blueprint, the CLI generates a bundle under:
135
+
136
+ ```text
137
+ ~/.mn/generated_blueprint_bundles/<run_id>/
138
+ ```
139
+
140
+ Catalog runs use the cached blueprint library by default. Run `mn blueprint update` or pass `--update` when you want to refresh the local cache.
141
+
142
+ Blueprint run artifacts are stored under:
143
+
144
+ ```text
145
+ ~/.mn/runs/<run_id>/
146
+ ```
147
+
148
+ Use `--runs-root <path>` with `monitor`, `tail`, `compare`, or `export` to inspect a custom run directory.
149
+
150
+ ## Updates
151
+
152
+ The CLI checks for released package updates in interactive terminals. When an update is available, it asks for confirmation before making changes.
153
+
154
+ Updating stops all MirrorNeuron components and running jobs. Update only when no important jobs are running. Backward compatibility is not guaranteed between releases.
155
+
156
+ Manual update commands:
157
+
158
+ ```bash
159
+ mn update --check-only
160
+ mn update
161
+ mn update --yes
162
+ ```
163
+
164
+ The updater checks:
165
+
166
+ - PyPI packages: SDK, blueprint support skill, CLI, and API.
167
+ - npm package: Web UI, when installed.
168
+ - GitHub Releases: MirrorNeuron core OTP tarball.
169
+
170
+ ## Testing
171
+
172
+ ```bash
173
+ python3 -m pytest -q
174
+ ```
175
+
176
+ ## Deployment
177
+
178
+ For normal local installs, use `mn-deploy/install_new.sh`. It installs the CLI from PyPI, the Web UI from npm, and the core from GitHub Release OTP tarballs.
179
+
180
+ For custom deployments, install `mirrorneuron-cli` into a managed virtual environment and set `MN_GRPC_TARGET` to the runtime gateway.
181
+
182
+ ## Troubleshooting
183
+
184
+ | Symptom | Check |
185
+ | --- | --- |
186
+ | `mn` is not found | Ensure `~/.local/bin` is on `PATH`. |
187
+ | Runtime commands fail | Confirm the core is running and `MN_GRPC_TARGET` is correct. |
188
+ | Output contains terminal control codes | Set `MN_CLI_OUTPUT=plain`. |
189
+ | Update prompt is unwanted | Set `MN_DISABLE_UPDATE_CHECK=1`. |
190
+ | Web UI is not started by `mn start` | Confirm the Web UI was installed by the released-package installer. |
191
+
192
+ ## Contributing
193
+
194
+ Keep command names stable and add tests for new commands, flags, and error paths. Prefer shared SDK methods over direct protocol handling.
195
+
196
+ ## License
197
+
198
+ MIT.
@@ -0,0 +1,184 @@
1
+ # MirrorNeuron CLI
2
+
3
+ Command-line interface for operating a local MirrorNeuron installation.
4
+
5
+ The CLI submits workflow bundles, monitors jobs, manages the local runtime services, and runs blueprint workflows through a shared command surface.
6
+
7
+ ## Features
8
+
9
+ - Submit, inspect, pause, resume, cancel, and clear runtime jobs.
10
+ - Stream job events and inspect dead-letter records.
11
+ - Start and stop the local MirrorNeuron components.
12
+ - Run blueprint catalog entries or local blueprint folders.
13
+ - Export blueprint run artifacts as Markdown or static HTML.
14
+ - Check for released package updates and install them after user confirmation.
15
+
16
+ ## Tech Stack
17
+
18
+ | Area | Tooling |
19
+ | --- | --- |
20
+ | Runtime | Python 3.9+ |
21
+ | CLI framework | Typer |
22
+ | Terminal rendering | Rich |
23
+ | Core client | `mirrorneuron-python-sdk` |
24
+ | Packaging | setuptools with setuptools-scm |
25
+
26
+ ## Prerequisites
27
+
28
+ - Python 3.9 or newer.
29
+ - A MirrorNeuron core reachable over gRPC.
30
+ - Docker for the default local core and Redis workflow.
31
+ - Optional: the released-package installer from `mn-deploy`, which installs and wires the CLI automatically.
32
+
33
+ ## Installation
34
+
35
+ The released-package installer installs this package and exposes `mn` on your `PATH`.
36
+
37
+ Standalone install:
38
+
39
+ ```bash
40
+ pip install mirrorneuron-cli
41
+ ```
42
+
43
+ Developer install:
44
+
45
+ ```bash
46
+ python3 -m venv .venv
47
+ source .venv/bin/activate
48
+ pip install -e .
49
+ ```
50
+
51
+ ## Configuration
52
+
53
+ | Variable | Default | Description |
54
+ | --- | --- | --- |
55
+ | `MN_GRPC_TARGET` | `localhost:50051` | Core gRPC target. |
56
+ | `MN_CORE_GRPC_TARGET` | unset | Fallback core gRPC target. |
57
+ | `MN_GRPC_TIMEOUT_SECONDS` | `10` | RPC timeout. Use `0` or `none` to disable. |
58
+ | `MN_GRPC_AUTH_TOKEN` | unset | Optional bearer metadata for protected gateways. |
59
+ | `MN_CLI_LOG_PATH` | `~/.mn/logs/cli.log` | CLI log file path. |
60
+ | `MN_CLI_OUTPUT` | `rich` | Set to `plain` to disable Rich formatting. |
61
+ | `MN_DISABLE_UPDATE_CHECK` | unset | Set to `1`, `true`, or `yes` to disable automatic update checks. |
62
+ | `MN_UPDATE_CHECK_INTERVAL_SECONDS` | `86400` | Minimum time between automatic update checks. |
63
+ | `MN_CORE_REPO` | `MirrorNeuronLab/MirrorNeuron` | GitHub repository used for core release update checks. |
64
+
65
+ ## Usage
66
+
67
+ Check the runtime:
68
+
69
+ ```bash
70
+ mn nodes
71
+ mn metrics
72
+ ```
73
+
74
+ Submit and inspect a workflow:
75
+
76
+ ```bash
77
+ mn validate ./bundle
78
+ mn run ./bundle
79
+ mn list
80
+ mn status <job_id>
81
+ mn monitor <job_id>
82
+ ```
83
+
84
+ Manage jobs:
85
+
86
+ ```bash
87
+ mn pause <job_id>
88
+ mn resume <job_id>
89
+ mn cancel <job_id>
90
+ mn dead-letters <job_id>
91
+ mn clear
92
+ ```
93
+
94
+ Manage local services:
95
+
96
+ ```bash
97
+ mn start
98
+ mn stop
99
+ ```
100
+
101
+ ## Blueprint Commands
102
+
103
+ Blueprint commands are grouped under `mn blueprint`.
104
+
105
+ ```bash
106
+ mn blueprint list
107
+ mn blueprint install
108
+ mn blueprint update
109
+ mn blueprint run <blueprint_id>
110
+ mn blueprint run ./path/to/bundle_or_source_blueprint
111
+ mn blueprint run <blueprint_id> --offline
112
+ mn blueprint run <blueprint_id> --revision <git_sha_or_tag>
113
+ mn blueprint monitor --follow
114
+ mn blueprint tail <run_id>
115
+ mn blueprint compare <run_a> <run_b>
116
+ mn blueprint export <run_id> --format markdown
117
+ mn blueprint export <run_id> --format html
118
+ ```
119
+
120
+ `mn blueprint run` accepts either an installed blueprint ID or a local folder. If the folder is already a bundle, the CLI submits it directly. If the folder is a Python source blueprint, the CLI generates a bundle under:
121
+
122
+ ```text
123
+ ~/.mn/generated_blueprint_bundles/<run_id>/
124
+ ```
125
+
126
+ Catalog runs use the cached blueprint library by default. Run `mn blueprint update` or pass `--update` when you want to refresh the local cache.
127
+
128
+ Blueprint run artifacts are stored under:
129
+
130
+ ```text
131
+ ~/.mn/runs/<run_id>/
132
+ ```
133
+
134
+ Use `--runs-root <path>` with `monitor`, `tail`, `compare`, or `export` to inspect a custom run directory.
135
+
136
+ ## Updates
137
+
138
+ The CLI checks for released package updates in interactive terminals. When an update is available, it asks for confirmation before making changes.
139
+
140
+ Updating stops all MirrorNeuron components and running jobs. Update only when no important jobs are running. Backward compatibility is not guaranteed between releases.
141
+
142
+ Manual update commands:
143
+
144
+ ```bash
145
+ mn update --check-only
146
+ mn update
147
+ mn update --yes
148
+ ```
149
+
150
+ The updater checks:
151
+
152
+ - PyPI packages: SDK, blueprint support skill, CLI, and API.
153
+ - npm package: Web UI, when installed.
154
+ - GitHub Releases: MirrorNeuron core OTP tarball.
155
+
156
+ ## Testing
157
+
158
+ ```bash
159
+ python3 -m pytest -q
160
+ ```
161
+
162
+ ## Deployment
163
+
164
+ For normal local installs, use `mn-deploy/install_new.sh`. It installs the CLI from PyPI, the Web UI from npm, and the core from GitHub Release OTP tarballs.
165
+
166
+ For custom deployments, install `mirrorneuron-cli` into a managed virtual environment and set `MN_GRPC_TARGET` to the runtime gateway.
167
+
168
+ ## Troubleshooting
169
+
170
+ | Symptom | Check |
171
+ | --- | --- |
172
+ | `mn` is not found | Ensure `~/.local/bin` is on `PATH`. |
173
+ | Runtime commands fail | Confirm the core is running and `MN_GRPC_TARGET` is correct. |
174
+ | Output contains terminal control codes | Set `MN_CLI_OUTPUT=plain`. |
175
+ | Update prompt is unwanted | Set `MN_DISABLE_UPDATE_CHECK=1`. |
176
+ | Web UI is not started by `mn start` | Confirm the Web UI was installed by the released-package installer. |
177
+
178
+ ## Contributing
179
+
180
+ Keep command names stable and add tests for new commands, flags, and error paths. Prefer shared SDK methods over direct protocol handling.
181
+
182
+ ## License
183
+
184
+ MIT.
@@ -0,0 +1,198 @@
1
+ Metadata-Version: 2.4
2
+ Name: mirrorneuron-cli
3
+ Version: 1.1.0
4
+ Summary: MirrorNeuron CLI
5
+ License-Expression: MIT
6
+ Classifier: Programming Language :: Python :: 3
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: mirrorneuron-python-sdk
11
+ Requires-Dist: typer>=0.9.0
12
+ Requires-Dist: rich>=13.0.0
13
+ Dynamic: license-file
14
+
15
+ # MirrorNeuron CLI
16
+
17
+ Command-line interface for operating a local MirrorNeuron installation.
18
+
19
+ The CLI submits workflow bundles, monitors jobs, manages the local runtime services, and runs blueprint workflows through a shared command surface.
20
+
21
+ ## Features
22
+
23
+ - Submit, inspect, pause, resume, cancel, and clear runtime jobs.
24
+ - Stream job events and inspect dead-letter records.
25
+ - Start and stop the local MirrorNeuron components.
26
+ - Run blueprint catalog entries or local blueprint folders.
27
+ - Export blueprint run artifacts as Markdown or static HTML.
28
+ - Check for released package updates and install them after user confirmation.
29
+
30
+ ## Tech Stack
31
+
32
+ | Area | Tooling |
33
+ | --- | --- |
34
+ | Runtime | Python 3.9+ |
35
+ | CLI framework | Typer |
36
+ | Terminal rendering | Rich |
37
+ | Core client | `mirrorneuron-python-sdk` |
38
+ | Packaging | setuptools with setuptools-scm |
39
+
40
+ ## Prerequisites
41
+
42
+ - Python 3.9 or newer.
43
+ - A MirrorNeuron core reachable over gRPC.
44
+ - Docker for the default local core and Redis workflow.
45
+ - Optional: the released-package installer from `mn-deploy`, which installs and wires the CLI automatically.
46
+
47
+ ## Installation
48
+
49
+ The released-package installer installs this package and exposes `mn` on your `PATH`.
50
+
51
+ Standalone install:
52
+
53
+ ```bash
54
+ pip install mirrorneuron-cli
55
+ ```
56
+
57
+ Developer install:
58
+
59
+ ```bash
60
+ python3 -m venv .venv
61
+ source .venv/bin/activate
62
+ pip install -e .
63
+ ```
64
+
65
+ ## Configuration
66
+
67
+ | Variable | Default | Description |
68
+ | --- | --- | --- |
69
+ | `MN_GRPC_TARGET` | `localhost:50051` | Core gRPC target. |
70
+ | `MN_CORE_GRPC_TARGET` | unset | Fallback core gRPC target. |
71
+ | `MN_GRPC_TIMEOUT_SECONDS` | `10` | RPC timeout. Use `0` or `none` to disable. |
72
+ | `MN_GRPC_AUTH_TOKEN` | unset | Optional bearer metadata for protected gateways. |
73
+ | `MN_CLI_LOG_PATH` | `~/.mn/logs/cli.log` | CLI log file path. |
74
+ | `MN_CLI_OUTPUT` | `rich` | Set to `plain` to disable Rich formatting. |
75
+ | `MN_DISABLE_UPDATE_CHECK` | unset | Set to `1`, `true`, or `yes` to disable automatic update checks. |
76
+ | `MN_UPDATE_CHECK_INTERVAL_SECONDS` | `86400` | Minimum time between automatic update checks. |
77
+ | `MN_CORE_REPO` | `MirrorNeuronLab/MirrorNeuron` | GitHub repository used for core release update checks. |
78
+
79
+ ## Usage
80
+
81
+ Check the runtime:
82
+
83
+ ```bash
84
+ mn nodes
85
+ mn metrics
86
+ ```
87
+
88
+ Submit and inspect a workflow:
89
+
90
+ ```bash
91
+ mn validate ./bundle
92
+ mn run ./bundle
93
+ mn list
94
+ mn status <job_id>
95
+ mn monitor <job_id>
96
+ ```
97
+
98
+ Manage jobs:
99
+
100
+ ```bash
101
+ mn pause <job_id>
102
+ mn resume <job_id>
103
+ mn cancel <job_id>
104
+ mn dead-letters <job_id>
105
+ mn clear
106
+ ```
107
+
108
+ Manage local services:
109
+
110
+ ```bash
111
+ mn start
112
+ mn stop
113
+ ```
114
+
115
+ ## Blueprint Commands
116
+
117
+ Blueprint commands are grouped under `mn blueprint`.
118
+
119
+ ```bash
120
+ mn blueprint list
121
+ mn blueprint install
122
+ mn blueprint update
123
+ mn blueprint run <blueprint_id>
124
+ mn blueprint run ./path/to/bundle_or_source_blueprint
125
+ mn blueprint run <blueprint_id> --offline
126
+ mn blueprint run <blueprint_id> --revision <git_sha_or_tag>
127
+ mn blueprint monitor --follow
128
+ mn blueprint tail <run_id>
129
+ mn blueprint compare <run_a> <run_b>
130
+ mn blueprint export <run_id> --format markdown
131
+ mn blueprint export <run_id> --format html
132
+ ```
133
+
134
+ `mn blueprint run` accepts either an installed blueprint ID or a local folder. If the folder is already a bundle, the CLI submits it directly. If the folder is a Python source blueprint, the CLI generates a bundle under:
135
+
136
+ ```text
137
+ ~/.mn/generated_blueprint_bundles/<run_id>/
138
+ ```
139
+
140
+ Catalog runs use the cached blueprint library by default. Run `mn blueprint update` or pass `--update` when you want to refresh the local cache.
141
+
142
+ Blueprint run artifacts are stored under:
143
+
144
+ ```text
145
+ ~/.mn/runs/<run_id>/
146
+ ```
147
+
148
+ Use `--runs-root <path>` with `monitor`, `tail`, `compare`, or `export` to inspect a custom run directory.
149
+
150
+ ## Updates
151
+
152
+ The CLI checks for released package updates in interactive terminals. When an update is available, it asks for confirmation before making changes.
153
+
154
+ Updating stops all MirrorNeuron components and running jobs. Update only when no important jobs are running. Backward compatibility is not guaranteed between releases.
155
+
156
+ Manual update commands:
157
+
158
+ ```bash
159
+ mn update --check-only
160
+ mn update
161
+ mn update --yes
162
+ ```
163
+
164
+ The updater checks:
165
+
166
+ - PyPI packages: SDK, blueprint support skill, CLI, and API.
167
+ - npm package: Web UI, when installed.
168
+ - GitHub Releases: MirrorNeuron core OTP tarball.
169
+
170
+ ## Testing
171
+
172
+ ```bash
173
+ python3 -m pytest -q
174
+ ```
175
+
176
+ ## Deployment
177
+
178
+ For normal local installs, use `mn-deploy/install_new.sh`. It installs the CLI from PyPI, the Web UI from npm, and the core from GitHub Release OTP tarballs.
179
+
180
+ For custom deployments, install `mirrorneuron-cli` into a managed virtual environment and set `MN_GRPC_TARGET` to the runtime gateway.
181
+
182
+ ## Troubleshooting
183
+
184
+ | Symptom | Check |
185
+ | --- | --- |
186
+ | `mn` is not found | Ensure `~/.local/bin` is on `PATH`. |
187
+ | Runtime commands fail | Confirm the core is running and `MN_GRPC_TARGET` is correct. |
188
+ | Output contains terminal control codes | Set `MN_CLI_OUTPUT=plain`. |
189
+ | Update prompt is unwanted | Set `MN_DISABLE_UPDATE_CHECK=1`. |
190
+ | Web UI is not started by `mn start` | Confirm the Web UI was installed by the released-package installer. |
191
+
192
+ ## Contributing
193
+
194
+ Keep command names stable and add tests for new commands, flags, and error paths. Prefer shared SDK methods over direct protocol handling.
195
+
196
+ ## License
197
+
198
+ MIT.
@@ -18,6 +18,7 @@ mn_cli/logging_config.py
18
18
  mn_cli/main.py
19
19
  mn_cli/server_cmds.py
20
20
  mn_cli/shared.py
21
+ mn_cli/update_cmds.py
21
22
  mn_cli/libs/__init__.py
22
23
  mn_cli/libs/blueprint_cmds.py
23
24
  mn_cli/libs/job_cmds.py
@@ -32,4 +33,5 @@ tests/test_blueprint_cmds.py
32
33
  tests/test_job_cmds.py
33
34
  tests/test_run_cmds.py
34
35
  tests/test_server_cmds.py
35
- tests/test_sys_cmds.py
36
+ tests/test_sys_cmds.py
37
+ tests/test_update_cmds.py
@@ -1,9 +1,15 @@
1
1
  import typer
2
+ from mn_cli import update_cmds
2
3
  from mn_cli.libs import job_cmds, run_cmds, sys_cmds
3
4
  from mn_cli.libs.blueprint_cmds import blueprint_app
4
5
 
5
6
  app = typer.Typer(help="MirrorNeuron CLI")
6
7
 
8
+
9
+ @app.callback()
10
+ def main(ctx: typer.Context):
11
+ update_cmds.maybe_prompt_for_update(ctx.invoked_subcommand)
12
+
7
13
  # Run commands
8
14
  app.command(name="validate")(run_cmds.validate)
9
15
  app.command(name="run")(run_cmds.run)
@@ -27,6 +33,7 @@ app.command(name="start")(sys_cmds.start)
27
33
  app.command(name="stop")(sys_cmds.stop)
28
34
  app.command(name="join")(sys_cmds.join)
29
35
  app.command(name="leave")(sys_cmds.leave)
36
+ app.command(name="update")(update_cmds.update)
30
37
 
31
38
  # Sub-apps
32
39
  app.add_typer(blueprint_app, name="blueprint")