@wire-runtime/cli 1.0.1 → 1.0.2
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 +77 -0
- package/dist/commands/init.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +10 -10
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @wire-runtime/cli
|
|
2
|
+
|
|
3
|
+
Scaffold, build and run bounded MCP servers on the native Wire runtime.
|
|
4
|
+
|
|
5
|
+
Release `1.0.2` ships on npm under the MIT license. The npm package is
|
|
6
|
+
`@wire-runtime/cli`; the installed executable is `wire`.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install -D @wire-runtime/cli@1.0.2
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Or run it without a local install:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npx @wire-runtime/cli@1.0.2 init demo --yes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
| Command | Purpose |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `wire init [name] --yes` | Create a typed Wire tool project |
|
|
25
|
+
| `wire dev --calls N --metrics` | Loopback dev server, hot reload and native budget simulation |
|
|
26
|
+
| `wire build` | Build a production Node deployment bundle |
|
|
27
|
+
| `wire budget keygen --out .wire/keys` | Create an issuer key directory |
|
|
28
|
+
| `wire budget mint` | Sign a 112-byte budget token |
|
|
29
|
+
| `wire budget inspect` | Print the claims of a minted token |
|
|
30
|
+
|
|
31
|
+
## Scaffold and run
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npx @wire-runtime/cli@1.0.2 init demo --yes
|
|
35
|
+
cd demo
|
|
36
|
+
npm install
|
|
37
|
+
npx wire dev --calls 8 --metrics
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`wire dev` starts a loopback server with hot reload. Development credentials are
|
|
41
|
+
ephemeral; stop the server before building.
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npx wire build
|
|
45
|
+
# Output: dist/tools.mjs and dist/server.mjs
|
|
46
|
+
node --max-old-space-size=32 --max-semi-space-size=2 dist/server.mjs
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Production startup requires issuer-provisioned credentials: the raw budget
|
|
50
|
+
token, an independently authenticated session, the public trust map and a
|
|
51
|
+
precreated durable guard directory.
|
|
52
|
+
|
|
53
|
+
## Mint a budget on the issuer machine
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
wire budget keygen --out issuer-keys
|
|
57
|
+
wire budget mint \
|
|
58
|
+
--key issuer-keys/private.pem \
|
|
59
|
+
--session <32-lowercase-hex> \
|
|
60
|
+
--calls 1000 --ttl 3600 --key-id 7 \
|
|
61
|
+
--out budget.bin
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Only the raw token, the public key map and the session identity cross into the
|
|
65
|
+
runtime. Keep the private key on the issuer machine.
|
|
66
|
+
|
|
67
|
+
## Runtime requirements
|
|
68
|
+
|
|
69
|
+
- Node.js 20 or newer.
|
|
70
|
+
- A matching `@wire-runtime/sdk-*` platform package, installed automatically as
|
|
71
|
+
an optional dependency of the SDK.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT. The native addon the CLI drives is AGPL-3.0-only.
|
|
76
|
+
|
|
77
|
+
Copyright (c) 2026 baseline-architect <architect.baseline@gmail.com>
|
package/dist/commands/init.js
CHANGED
|
@@ -33,10 +33,10 @@ export async function scaffold(directory, name) {
|
|
|
33
33
|
start: "node dist/server.mjs",
|
|
34
34
|
},
|
|
35
35
|
dependencies: {
|
|
36
|
-
"@wire-runtime/sdk": "1.0.
|
|
36
|
+
"@wire-runtime/sdk": "1.0.2",
|
|
37
37
|
"@sinclair/typebox": "0.34.52",
|
|
38
38
|
},
|
|
39
|
-
devDependencies: { "@wire-runtime/cli": "1.0.
|
|
39
|
+
devDependencies: { "@wire-runtime/cli": "1.0.2", typescript: "5.9.3" },
|
|
40
40
|
}, null, 2) + "\n",
|
|
41
41
|
"wire.config.json": JSON.stringify({
|
|
42
42
|
entry: "tools/index.ts",
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) 2026 baseline-architect <architect.baseline@gmail.com>
|
|
4
4
|
import { defineCommand, runMain } from "citty";
|
|
5
5
|
const main = defineCommand({
|
|
6
|
-
meta: { name: "wire", version: "1.0.
|
|
6
|
+
meta: { name: "wire", version: "1.0.2", description: "@wire-runtime CLI" },
|
|
7
7
|
subCommands: {
|
|
8
8
|
init: () => import("./commands/init.js").then((m) => m.default),
|
|
9
9
|
dev: () => import("./commands/dev.js").then((m) => m.default),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wire-runtime/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "baseline-architect <architect.baseline@gmail.com>",
|
|
6
6
|
"description": "Wire CLI: scaffold, build and run bounded MCP servers on the native Wire runtime.",
|
|
@@ -19,16 +19,11 @@
|
|
|
19
19
|
"dist",
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsc -p tsconfig.build.json && node ../../scripts/native.mjs license-output dist",
|
|
24
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
25
|
-
"test": "vitest run --maxWorkers=1 --no-file-parallelism"
|
|
26
|
-
},
|
|
27
22
|
"dependencies": {
|
|
28
|
-
"@wire-runtime/sdk": "workspace:*",
|
|
29
23
|
"citty": "0.1.6",
|
|
30
24
|
"@clack/prompts": "0.11.0",
|
|
31
|
-
"esbuild": "0.25.12"
|
|
25
|
+
"esbuild": "0.25.12",
|
|
26
|
+
"@wire-runtime/sdk": "1.0.2"
|
|
32
27
|
},
|
|
33
28
|
"devDependencies": {
|
|
34
29
|
"@types/node": "22.20.5",
|
|
@@ -39,5 +34,10 @@
|
|
|
39
34
|
"engines": {
|
|
40
35
|
"node": ">=20"
|
|
41
36
|
},
|
|
42
|
-
"license": "MIT"
|
|
43
|
-
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.build.json && node ../../scripts/native.mjs license-output dist",
|
|
40
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
41
|
+
"test": "vitest run --maxWorkers=1 --no-file-parallelism"
|
|
42
|
+
}
|
|
43
|
+
}
|