@mightybot/mbcli 0.5.398 → 0.5.417

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 (3) hide show
  1. package/README.md +255 -6
  2. package/bin/mb.js +3 -3
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -1,12 +1,261 @@
1
1
  # @mightybot/mbcli
2
2
 
3
- The MightyBot `mb` CLI. Run it with npx (no install):
3
+ The MightyBot `mb` CLI and local design-time MCP server, distributed over npm so
4
+ it can be run with `npx`.
4
5
 
5
- ```sh
6
- npx @mightybot/mbcli@latest setup # log in + register MCP with your agents
7
- npx @mightybot/mbcli@latest workflow list
6
+ `mb` is a single Go binary. This package is a thin launcher: the binary ships in
7
+ a per-platform optional dependency (`@mightybot/mbcli-<platform>`), and npm
8
+ installs only the one matching your machine.
9
+
10
+
11
+ ## Run — two ways
12
+
13
+ The actual command is always **`mb`**; the package name (`@mightybot/mbcli`)
14
+ is just what npm fetches. Pick whichever fits:
15
+
16
+ ### Option A — `npx` (no install, always newest)
17
+
18
+ ```bash
19
+ npx @mightybot/mbcli@latest version # prod (stable)
20
+ npx @mightybot/mbcli@latest auth login
21
+ npx @mightybot/mbcli@preprod version # preprod (newest build, pre-promotion)
8
22
  ```
9
23
 
10
- Or install globally: `npm i -g @mightybot/mbcli`, then `mb <cmd>`.
24
+ npm fetches + caches only your platform's binary on first run; `@latest` /
25
+ `@preprod` makes npx re-check the registry each run, so you always get the
26
+ newest build for that channel. Nothing to upgrade.
27
+
28
+ ### Option B — global install (`mb` on PATH, shorter commands)
29
+
30
+ ```bash
31
+ npm i -g @mightybot/mbcli@latest # or @preprod
32
+ mb version
33
+ mb auth login
34
+ mb setup
35
+ ```
36
+
37
+ Puts a real `mb` command on your PATH — no `npx`, no scope prefix. Faster
38
+ (no per-run resolution), but it does **not** auto-update: you are pinned to the
39
+ version installed until you re-run the install to upgrade:
40
+
41
+ ```bash
42
+ npm i -g @mightybot/mbcli@latest # upgrade to newest latest
43
+ npm i -g @mightybot/mbcli@preprod # or newest preprod
44
+ ```
45
+
46
+ | | `npx …@latest` | `npm i -g …@latest` |
47
+ |---|---|---|
48
+ | Command | `npx @mightybot/mbcli@latest <cmd>` | `mb <cmd>` |
49
+ | Always newest | ✅ auto | ❌ frozen at install — re-install to upgrade |
50
+ | Per-run overhead | small | none |
51
+
52
+ Either way the one-time `~/.npmrc` (above) is required, and `mb setup` works the
53
+ same — it installs the MCP server to the stable `~/.mightybot/mcp/mb`,
54
+ independent of how you run the CLI.
55
+
56
+ ### Release channels
57
+
58
+ | Tag | Published when | Who uses it |
59
+ |-----|----------------|-------------|
60
+ | `preprod` | every `master` merge (version `0.5.<run>`) | testers validating a build |
61
+ | `latest` | manual promotion of a tested `preprod` version (no rebuild) | everyone |
62
+
63
+ Promotion moves the `latest` dist-tag onto the exact `preprod` artifact that was
64
+ tested — same bytes, no rebuild.
65
+
66
+ ### Always getting the newest
67
+
68
+ npx caches by version spec. To avoid running a stale cached copy, either pin the
69
+ channel tag or force a registry check:
70
+
71
+ ```bash
72
+ npx @mightybot/mbcli@latest version # re-resolves the latest tag
73
+ npx --prefer-online @mightybot/mbcli version # revalidates cache against the registry
74
+ ```
75
+
76
+ ### Release-age cooldown
77
+
78
+ If your npm config sets `min-release-age` (the MightyBot repo `.npmrc` sets
79
+ `min-release-age=7` as a supply-chain guard), npm refuses any version published
80
+ in the last N days — so a **same-day release fails with `ENOVERSIONS` / "No
81
+ versions available for @mightybot/mbcli"** even though it published fine.
82
+ Override the cooldown to install a fresh build:
83
+
84
+ ```bash
85
+ npx --min-release-age=0 @mightybot/mbcli@latest # CLI flag, or
86
+ npm_config_min_release_age=0 npx @mightybot/mbcli@latest # env var
87
+ ```
88
+
89
+ Once the build is older than the cooldown window, plain `npx …` works with no
90
+ flag. (This guard is intentional — it protects against installing a
91
+ freshly-compromised package; the override is only for trusted same-day builds.)
92
+
93
+ ## One-step setup (auth + MCP)
94
+
95
+ After installing, run **one** command to get fully provisioned — it logs you in
96
+ and registers the MCP server with Codex / Claude Code / OpenCode:
97
+
98
+ ```bash
99
+ npx @mightybot/mbcli@latest setup
100
+ ```
101
+
102
+ `mb setup` = `mb auth login` (browser device auth) + `mb mcp install --agent all`.
103
+ Auth flags pass through, e.g. `setup --base-url https://platform-dev.mightybot.ai`.
104
+
105
+ ## Commands
106
+
107
+ Every example below uses the bare `mb` (after a global install or inside
108
+ `mb setup`). With `npx`, prefix any command:
109
+ `npx @mightybot/mbcli@latest <command>`.
110
+
111
+ Get machine-readable help any time:
112
+
113
+ ```bash
114
+ mb help # human-readable usage
115
+ mb help --json # full command catalog (command, usage, backend method/path)
116
+ mb version # build info (version, commit, build date) as JSON
117
+ ```
118
+
119
+ > Builder-step **configuration writes** (workflow schemas, file processing,
120
+ > validation, policies, agent compiler, data trail, views) are **MCP-native** —
121
+ > done by an agent through the `mb mcp` server, not these shell subcommands. The
122
+ > shell commands below cover auth, setup, fleet ops, tests, SDLC, deploy/release,
123
+ > and evidence. After `mb setup`, an agent should start with the MCP tool
124
+ > `mightybot.start_here`.
125
+
126
+ ### `mb setup` — one-step provisioning
127
+
128
+ ```bash
129
+ mb setup [auth flags] # mb auth login + mb mcp install --agent all
130
+ ```
131
+
132
+ Logs in (browser device auth) and registers the MCP server with all detected
133
+ agents. Auth flags pass through (e.g. `--base-url https://platform-dev.mightybot.ai`).
134
+
135
+ ### `mb auth` — platform authentication
136
+
137
+ | Command | What it does |
138
+ |---|---|
139
+ | `mb auth login` | Browser device-code login; stores the token under `~/.mightybot`. |
140
+ | `mb auth inspect` | Show the active profile/backend and token status. |
141
+ | `mb auth profile` | Print the current auth profile (tenant, user, backend URL). |
142
+ | `mb auth configure` | Set/switch the backend (base URL, environment). |
143
+ | `mb auth probe-write` | Pre-flight check that the token can perform writes. |
144
+
145
+ > `mb` has **one** profile slot — the last `mb auth login` wins. Confirm the
146
+ > active backend with `mb auth inspect` before any write.
147
+
148
+ ### `mb mcp` — local design-time MCP server
149
+
150
+ | Command | What it does |
151
+ |---|---|
152
+ | `mb mcp` | Run the MCP server on stdio (what agents launch). |
153
+ | `mb mcp install [--agent codex,claude,opencode\|all]` | Copy the binary to `~/.mightybot/mcp/mb` and register it with the chosen agents. |
154
+ | `mb mcp register` | Register an already-installed server with an agent. |
155
+ | `mb mcp update` | Re-copy/re-register after a CLI upgrade. |
156
+ | `mb mcp uninstall` | Remove the server registration. |
157
+ | `mb mcp status` / `mb mcp doctor` | Show registration health / diagnose problems. |
158
+ | `mb mcp start` / `mb mcp stop` | Start/stop the managed server. |
159
+
160
+ ### `mb surface` — inspect the workflow surface
161
+
162
+ ```bash
163
+ mb surface overview # high-level map of the workflow definition
164
+ mb surface resources # resources referenced by the workflow
165
+ mb surface operations # available builder operations
166
+ mb surface step # step-level detail
167
+ ```
168
+
169
+ ### `mb workflow` — workflow definitions (read/SDLC)
170
+
171
+ | Command | What it does |
172
+ |---|---|
173
+ | `mb workflow list` | List workflow definitions. |
174
+ | `mb workflow inspect <id>` | Show a definition's full configuration. |
175
+ | `mb workflow create` / `update` / `duplicate` / `delete` | Manage definitions. |
176
+ | `mb workflow export <id>` | Export a definition (e.g. for diffing/backup). |
177
+ | `mb workflow diff` | Diff two definitions/versions. |
178
+ | `mb workflow validate <id>` | Validate a definition. |
179
+ | `mb workflow versions` / `version` / `version-history` / `version-diff` | Inspect version history and compare versions. |
180
+
181
+ ### `mb git` — git ↔ workflow sync state
182
+
183
+ ```bash
184
+ mb git branches # branches relevant to workflow definitions
185
+ mb git sync-status # git/DB sync status
186
+ mb git auto-merge # auto-merge eligible changes
187
+ mb git resource-state # per-resource git state
188
+ mb git pr-status # PR status for workflow changes
189
+ ```
190
+
191
+ ### `mb instance` — workflow instances & their files
192
+
193
+ | Command | What it does |
194
+ |---|---|
195
+ | `mb instance list` / `get <id>` / `stats` | List, fetch, and summarize instances. |
196
+ | `mb instance create` / `patch` / `delete` / `close` | Manage instances. |
197
+ | `mb instance repair` / `backfill` | Maintenance operations. |
198
+ | `mb instance data` | Inspect/manage instance data entries. |
199
+ | `mb instance file upload …` | Upload a file to an instance. |
200
+
201
+ ### `mb run` — workflow runs (tests & evidence)
202
+
203
+ | Command | What it does |
204
+ |---|---|
205
+ | `mb run test` | Run a workflow end-to-end as a test. |
206
+ | `mb run create` / `partial` | Start a full or partial run. |
207
+ | `mb run rerun` | Re-execute a prior run. |
208
+ | `mb run list` / `inspect <id>` | List runs / inspect one. |
209
+ | `mb run result <id>` / `files <id>` | Fetch a run's result / output files. |
210
+
211
+ ### `mb eval` — evaluations
212
+
213
+ ```bash
214
+ mb eval lists | list # list eval sets / evals
215
+ mb eval run # run an evaluation
216
+ mb eval result # fetch results
217
+ mb eval annotation # annotations
218
+ mb eval comment | review # commenting / review
219
+ mb eval packet # export an eval packet
220
+ ```
221
+
222
+ ### `mb deploy` — deploys
223
+
224
+ | Command | What it does |
225
+ |---|---|
226
+ | `mb deploy draft` / `preview` | Stage and preview a deploy. |
227
+ | `mb deploy release` | Cut a release/deploy. |
228
+ | `mb deploy status` / `release-status` | Check deploy/release status. |
229
+ | `mb deploy list` / `releases` | List deploys / releases. |
230
+
231
+ ### `mb release` — release tagging
232
+
233
+ ```bash
234
+ mb release tag suggest # suggest the next release tag
235
+ mb release tag create # create a release tag
236
+ ```
237
+
238
+ ### `mb view-serving` — view-serving checks
239
+
240
+ ```bash
241
+ mb view-serving smoke # smoke-test served views
242
+ mb view-serving test # run view-serving tests
243
+ ```
244
+
245
+ ### Global flags
246
+
247
+ - `--home <dir>` — override `HOME` (where `~/.mightybot` lives); useful for
248
+ isolated/CI runs.
249
+ - `--json` after `help` — emit the full command catalog as JSON.
250
+
251
+ ### Under the hood
252
+
253
+ `setup` copies the binary to a stable location (`~/.mightybot/mcp/mb`, alongside
254
+ its docs, re-signed for macOS) and registers *that* path — so the long-lived MCP
255
+ server does not depend on the ephemeral npx cache. Re-run `setup` after an
256
+ upgrade, then restart your agent so it reloads MCP.
257
+
258
+ ## Supported platforms
11
259
 
12
- Homepage: https://mightybot.ai
260
+ macOS arm64 (Apple Silicon), macOS x64 (Intel), Linux x64, Linux arm64,
261
+ Windows x64 — npm installs only the package matching your machine.
package/bin/mb.js CHANGED
@@ -14,9 +14,9 @@ const fs = require("fs");
14
14
  const path = require("path");
15
15
 
16
16
  // Derive the platform packages from THIS package's own name, so the same shim
17
- // works under any scope/name it is published as (e.g. @mightybot-ai/mbcli and
18
- // @mightybot/mbflow). The binary ships in `<self>-<platform>` (e.g.
19
- // @mightybot/mbflow-darwin-arm64).
17
+ // works under any scope it is published as (e.g. @mightybot-ai/mbcli private and
18
+ // @mightybot/mbcli public). The binary ships in `<self>-<platform>` (e.g.
19
+ // @mightybot/mbcli-darwin-arm64).
20
20
  const SELF_NAME = require(path.join(__dirname, "..", "package.json")).name;
21
21
  const SUPPORTED = new Set([
22
22
  "darwin-arm64",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mightybot/mbcli",
3
- "version": "0.5.398",
3
+ "version": "0.5.417",
4
4
  "description": "MightyBot mb CLI and local design-time MCP server",
5
5
  "bin": {
6
6
  "mb": "bin/mb.js"
@@ -15,11 +15,11 @@
15
15
  "license": "UNLICENSED",
16
16
  "private": false,
17
17
  "optionalDependencies": {
18
- "@mightybot/mbcli-darwin-arm64": "0.5.398",
19
- "@mightybot/mbcli-darwin-x64": "0.5.398",
20
- "@mightybot/mbcli-linux-x64": "0.5.398",
21
- "@mightybot/mbcli-linux-arm64": "0.5.398",
22
- "@mightybot/mbcli-win32-x64": "0.5.398"
18
+ "@mightybot/mbcli-darwin-arm64": "0.5.417",
19
+ "@mightybot/mbcli-darwin-x64": "0.5.417",
20
+ "@mightybot/mbcli-linux-x64": "0.5.417",
21
+ "@mightybot/mbcli-linux-arm64": "0.5.417",
22
+ "@mightybot/mbcli-win32-x64": "0.5.417"
23
23
  },
24
24
  "homepage": "https://mightybot.ai"
25
25
  }