@net-mesh/cli 0.24.0 → 0.25.0
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 +79 -23
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,35 +1,91 @@
|
|
|
1
1
|
# @net-mesh/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
`net-mesh` — the unified command-line interface for the NET mesh.
|
|
4
|
+
|
|
5
|
+
The non-interactive counterpart to [`@net-mesh/deck`](https://www.npmjs.com/package/@net-mesh/deck): a one-shot tool for operator scripts, CI pipelines, daemon authoring, and ad-hoc cluster inspection. Same SDK underneath, same signed admin chain, no TUI.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Install
|
|
5
10
|
|
|
6
11
|
```sh
|
|
12
|
+
# npm (per-platform binaries included)
|
|
7
13
|
npm install -g @net-mesh/cli
|
|
8
|
-
# or:
|
|
9
|
-
npx @net-mesh/cli --help
|
|
10
14
|
```
|
|
11
15
|
|
|
12
|
-
`@net-mesh/cli` is a thin Node.js shim — installing it pulls in
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
`@net-mesh/cli` is a thin Node.js shim — installing it pulls in the right per-platform binary package as an `optionalDependency` (npm refuses to install packages that don't match the host's `os` / `cpu` / `libc`). The shim resolves the installed package at runtime and `exec`s the bundled `net-mesh` binary.
|
|
17
|
+
|
|
18
|
+
## Run
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
net-mesh --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Subcommand surface
|
|
25
|
+
|
|
26
|
+
| Subcommand | What it does |
|
|
27
|
+
|---------------|---------------------------------------------------------------------------------|
|
|
28
|
+
| `version` | SDK version + build metadata. |
|
|
29
|
+
| `identity` | Generate / inspect / fingerprint operator identity files. |
|
|
30
|
+
| `admin` | Signed admin-chain commits — drain, cordon, maintenance, drop-replicas, etc. |
|
|
31
|
+
| `ice` | Break-glass ICE — simulate then commit force-drain / evict / restart / cutover. |
|
|
32
|
+
| `snapshot` | One-shot `MeshOsSnapshot` reads (and `--watch` for streaming). |
|
|
33
|
+
| `audit` | Read-only queries against the RedEX-committed audit ledger. |
|
|
34
|
+
| `log tail` | Substrate log stream (`--follow`, `--daemon`, `--level`). |
|
|
35
|
+
| `failures tail` | Substrate failure stream — same shape as `log tail`. |
|
|
36
|
+
| `cap` | Capability advertisement + discovery. |
|
|
37
|
+
| `peer` | Peer + NAT-traversal helpers. |
|
|
38
|
+
| `daemon` | Per-daemon listing from the local snapshot. |
|
|
39
|
+
| `netdb` | NetDB local KV adapter — Cortex-backed tasks + memories. |
|
|
40
|
+
| `subnet` | Hierarchical subnet inspection (`show`, `ls`, `tree`). |
|
|
41
|
+
| `gateway` | `SubnetGateway` stats + export-table operator surface. |
|
|
42
|
+
| `channel` | `ChannelConfigRegistry` inspection (`visibility`, `ls`). |
|
|
43
|
+
| `aggregator` | `AggregatorDaemon` inspection + remote query. |
|
|
44
|
+
| `completion` | Emit a shell-completion script (`bash` / `zsh` / `fish` / `powershell`). |
|
|
45
|
+
| `man` | Emit the troff(1) man page on stdout. |
|
|
46
|
+
|
|
47
|
+
## Global flags
|
|
48
|
+
|
|
49
|
+
Applied to every subcommand; environment-variable fallbacks in brackets:
|
|
50
|
+
|
|
51
|
+
- `--config <path>` `[NET_MESH_CONFIG]` — profile file (default `$XDG_CONFIG_HOME/net-mesh/config.toml`).
|
|
52
|
+
- `--profile <name>` `[NET_MESH_PROFILE]` — named profile within the config file.
|
|
53
|
+
- `--output (json|yaml|ndjson|table|text)` — auto-detects `table`/`text` on TTY and `json`/`ndjson` off-TTY.
|
|
54
|
+
- `--quiet` / `-q` — suppress stderr diagnostics.
|
|
55
|
+
- `--verbose` / `-v` — `-v` info, `-vv` debug, `-vvv` trace. `NET_MESH_LOG=` env-filter overrides.
|
|
56
|
+
- `--no-color` `[NO_COLOR]` — disable ANSI in table / text output.
|
|
57
|
+
- `--timeout <dur>` — global per-call timeout (e.g. `500ms`, `1h30m`). Default `30s`.
|
|
58
|
+
|
|
59
|
+
## Config + identity
|
|
60
|
+
|
|
61
|
+
The profile file is optional — every flag has a sensible default. When present, it lives at `$XDG_CONFIG_HOME/net-mesh/config.toml` (or the platform equivalent) and looks like:
|
|
62
|
+
|
|
63
|
+
```toml
|
|
64
|
+
[default]
|
|
65
|
+
identity = "~/.config/net-mesh/identity.toml"
|
|
66
|
+
endpoint = "in-process"
|
|
67
|
+
default_timeout_ms = 30000
|
|
68
|
+
|
|
69
|
+
[profiles.prod]
|
|
70
|
+
identity = "~/.config/net-mesh/ops-identity.toml"
|
|
71
|
+
node_addr = "10.0.0.4:7700"
|
|
72
|
+
node_pubkey = "abcd…" # 64 hex
|
|
73
|
+
psk_hex = "1234…" # 64 hex
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Operator identity files are authored by `net-mesh identity generate` — ed25519 seed + public key + SHA-256 fingerprint, the same format the deck loads from the maintenance node. Every signed `admin` / `ice` command picks the identity up from the active profile (or `--identity`).
|
|
17
77
|
|
|
18
|
-
|
|
78
|
+
## Exit codes
|
|
19
79
|
|
|
20
|
-
|
|
21
|
-
- linux aarch64 (glibc + musl)
|
|
22
|
-
- macOS x86_64 + aarch64
|
|
23
|
-
- Windows x86_64 + aarch64
|
|
80
|
+
Typed via `ExitCodeKind`. Scripts can match on the discriminator:
|
|
24
81
|
|
|
25
|
-
|
|
82
|
+
- `0` — success
|
|
83
|
+
- `2` — usage / parse error
|
|
84
|
+
- `3` — config / identity load failure
|
|
85
|
+
- `4` — substrate refused the action (auth, ICE threshold, etc.)
|
|
86
|
+
- `5` — timeout
|
|
87
|
+
- `6` — transport error
|
|
26
88
|
|
|
27
|
-
|
|
28
|
-
- **cargo-binstall** — `cargo binstall net-cli` (downloads the
|
|
29
|
-
prebuilt tarball from GitHub Releases, no compile)
|
|
30
|
-
- **GitHub Releases** — download the tarball / zip directly from
|
|
31
|
-
[the releases page](https://github.com/ai-2070/net/releases)
|
|
32
|
-
- **PyPI** — `pip install net-mesh-cli`
|
|
89
|
+
## License
|
|
33
90
|
|
|
34
|
-
|
|
35
|
-
full surface.
|
|
91
|
+
Apache-2.0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net-mesh/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "net-mesh — unified command-line interface for the Net mesh",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"LICENSE"
|
|
24
24
|
],
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": ">=
|
|
26
|
+
"node": ">=20"
|
|
27
27
|
},
|
|
28
28
|
"//": "Per-platform binary packages are listed as optionalDependencies. npm fetches only the one whose `os`/`cpu`/`libc` constraints match the install host; bin/net-mesh.js resolves whichever landed at runtime and execs the bundled binary.",
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@net-mesh/cli-linux-x64-gnu": "0.
|
|
31
|
-
"@net-mesh/cli-linux-x64-musl": "0.
|
|
32
|
-
"@net-mesh/cli-linux-arm64-gnu": "0.
|
|
33
|
-
"@net-mesh/cli-linux-arm64-musl": "0.
|
|
34
|
-
"@net-mesh/cli-darwin-x64": "0.
|
|
35
|
-
"@net-mesh/cli-darwin-arm64": "0.
|
|
36
|
-
"@net-mesh/cli-win32-x64": "0.
|
|
37
|
-
"@net-mesh/cli-win32-arm64": "0.
|
|
30
|
+
"@net-mesh/cli-linux-x64-gnu": "0.25.0",
|
|
31
|
+
"@net-mesh/cli-linux-x64-musl": "0.25.0",
|
|
32
|
+
"@net-mesh/cli-linux-arm64-gnu": "0.25.0",
|
|
33
|
+
"@net-mesh/cli-linux-arm64-musl": "0.25.0",
|
|
34
|
+
"@net-mesh/cli-darwin-x64": "0.25.0",
|
|
35
|
+
"@net-mesh/cli-darwin-arm64": "0.25.0",
|
|
36
|
+
"@net-mesh/cli-win32-x64": "0.25.0",
|
|
37
|
+
"@net-mesh/cli-win32-arm64": "0.25.0"
|
|
38
38
|
}
|
|
39
39
|
}
|