@mushi-mushi/cli 0.12.0 → 0.14.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 CHANGED
@@ -52,6 +52,9 @@ mushi --version
52
52
 
53
53
  ```bash
54
54
  mushi login --api-key mushi_xxx # store credentials in ~/.mushirc (mode 0o600)
55
+ mushi connect --api-key mushi_xxx --project-id <uuid> --endpoint <url> --wait
56
+ # one-shot wiring: ~/.mushirc + .env.local + .cursor/mcp.json + heartbeat wait
57
+ mushi upgrade # bump installed @mushi-mushi/* packages to latest stable
55
58
  mushi status # project overview
56
59
  mushi reports list # recent reports
57
60
  mushi reports show <id> # one report
@@ -65,6 +68,51 @@ mushi config endpoint https://... # set API endpoint (https:// required outsi
65
68
  mushi sourcemaps upload --release <ver> --dir <dist> # upload .js.map / .css.map (sha256-idempotent)
66
69
  ```
67
70
 
71
+ ### `mushi connect`
72
+
73
+ Non-interactive equivalent of `mushi init` for agents and scripts — wires a
74
+ repo to an existing project in one shot:
75
+
76
+ 1. Saves credentials to `~/.mushirc` (mode `0o600`).
77
+ 2. Merges `MUSHI_*` / framework-prefixed env vars into `.env.local` —
78
+ existing keys are never overwritten (skip with `--no-env`).
79
+ 3. Writes the `@mushi-mushi/mcp` server block into `.cursor/mcp.json` and
80
+ ensures that file is gitignored, since it embeds the API key (skip with
81
+ `--no-ide`).
82
+ 4. With `--wait`, polls `GET /v1/sync/ingest-setup` every 3 s until the SDK
83
+ heartbeat (or first report) lands, up to `--wait-timeout <sec>`
84
+ (default 120). Rejected credentials (401/403/404) fail fast instead of
85
+ polling out the timeout.
86
+
87
+ ```bash
88
+ # Recommended: pass the key via env so it stays out of shell history
89
+ MUSHI_API_KEY=mushi_xxx mushi connect --project-id <uuid> \
90
+ --endpoint https://<ref>.supabase.co/functions/v1/api --wait
91
+ mushi connect --api-key mushi_xxx --project-id <uuid> --endpoint <url> --no-ide --json
92
+ ```
93
+
94
+ Exits non-zero when `--wait` times out or credentials are rejected, so it
95
+ composes in setup scripts and CI.
96
+
97
+ ### `mushi upgrade`
98
+
99
+ Reads `package.json`, checks the npm registry for each installed
100
+ `@mushi-mushi/*` package, and runs the right install command for your package
101
+ manager (npm / pnpm / yarn / bun) to bump them to the latest stable release.
102
+
103
+ ```bash
104
+ mushi upgrade # plan + install
105
+ mushi upgrade --dry-run # print the install command without running it
106
+ mushi upgrade --json # machine-readable plan + result
107
+ mushi upgrade --cwd ../app # target another repo
108
+ ```
109
+
110
+ Pre-release versions are never auto-selected, registry versions are validated
111
+ against strict semver before being interpolated into the install command, and
112
+ non-registry specifiers (`workspace:`, `file:`, git URLs, dist-tags) are left
113
+ untouched. Legacy `@mushi-mushi/react` installs get a migration note pointing
114
+ at `@mushi-mushi/web`.
115
+
68
116
  ### `mushi sourcemaps upload`
69
117
 
70
118
  Recursively scans `--dir` for `.js.map` and `.css.map` files and uploads them
@@ -110,6 +158,7 @@ reachability only.
110
158
  ```bash
111
159
  mushi doctor # local checks only
112
160
  mushi doctor --server # + calls /preflight on the backend (all 4 dispatch checks)
161
+ mushi doctor --ingest # + calls /v1/sync/ingest-setup (API key → heartbeat → first report)
113
162
  mushi doctor --json # machine-readable JSON output (exits 1 if any check fails)
114
163
  ```
115
164
 
@@ -135,6 +184,13 @@ server checks (`key` values returned by the endpoint):
135
184
  `--server` requires `adminOrApiKey` credentials — set `MUSHI_API_KEY` to an
136
185
  admin key (not a public SDK key).
137
186
 
187
+ With `--ingest`, also calls `GET /v1/sync/ingest-setup` (authenticated with the
188
+ SDK API key) and reports each **required ingest step** — project exists, active
189
+ API key, SDK heartbeat, at least one ingested report — plus a
190
+ `Last SDK heartbeat` diagnostic with the timestamp and endpoint host. This is
191
+ the same payload `mushi connect --wait` polls, so a failing step here tells you
192
+ exactly why the banner isn't showing up.
193
+
138
194
  ### `mushi reset <projectId>`
139
195
 
140
196
  Archives a project and wipes its test data so the full onboarding flow can be
@@ -169,3 +225,9 @@ Exits automatically when the job reaches a terminal status (`completed`,
169
225
  ## License
170
226
 
171
227
  MIT
228
+
229
+
230
+ <!-- mushi-readme-stats-footer -->
231
+ ---
232
+
233
+ <sub>Monorepo scale (June 2026): 43 edge functions · 234 SQL migrations · 13 outbound plugins · 11 inbound adapters. Canonical counts: <a href="https://github.com/kensaurus/mushi-mushi/blob/master/docs/stats.md">docs/stats.md</a> · <code>pnpm docs-stats</code></sub>
@@ -0,0 +1,6 @@
1
+ // src/version.ts
2
+ var MUSHI_CLI_VERSION = true ? "0.14.0" : "0.0.0-dev";
3
+
4
+ export {
5
+ MUSHI_CLI_VERSION
6
+ };