@modelstatus/cli 0.1.78 → 0.1.80
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 +1 -1
- package/package.json +1 -1
- package/src/index.js +26 -11
- package/src/tui/app.js +11 -1
- package/src/tui/views/account.js +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The free CLI + TUI for [LLM Status](https://llmstatus.ai) — scans your repo fo
|
|
|
8
8
|
npx @modelstatus/cli status
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
That's it. No sign-in, no account, and the scan runs entirely on your machine — you get a snapshot of every model in your repo plus health badges and replacement suggestions. (Anonymous usage analytics — event names + counts only, never code, model names, or paths — can be turned off anytime: `mm analytics off`, or `MM_NO_ANALYTICS=1`.)
|
|
11
|
+
That's it. No sign-in, no account, and the scan runs entirely on your machine — you get a snapshot of every model in your repo plus health badges and replacement suggestions. (Anonymous usage analytics — event names + counts only, never code, model names, or paths — can be turned off anytime: `mm config analytics off`, or `MM_NO_ANALYTICS=1`.)
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modelstatus/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.80",
|
|
4
4
|
"description": "Track which AI models you use, where, and never get surprised by a retirement. Free offline model-health for any repo (mm status), browser sign-in for cloud inventory + alerts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llm",
|
package/src/index.js
CHANGED
|
@@ -763,7 +763,7 @@ Usage:
|
|
|
763
763
|
mm login [api_key] Browser sign-in with polling (or paste a key)
|
|
764
764
|
mm signup Create an account in the browser, then poll
|
|
765
765
|
mm logout Forget the saved API key
|
|
766
|
-
mm
|
|
766
|
+
mm config View or change settings (analytics, …)
|
|
767
767
|
mm scan [dir] Scan for model usage; interactive TUI, or --ci/--json for pipelines
|
|
768
768
|
mm fix [dir] Rewrite dying model ids to their replacement, in place (--dry-run previews; --model <slug> limits; --yes skips the confirm)
|
|
769
769
|
mm ci [dir] CI gate: fail the build on deprecated/retiring models (GitHub annotations)
|
|
@@ -878,17 +878,32 @@ async function main() {
|
|
|
878
878
|
if (cmd === "login") await cmdLogin(positional, flags);
|
|
879
879
|
else if (cmd === "signup") await cmdSignup(positional, flags);
|
|
880
880
|
else if (cmd === "logout") cmdLogout();
|
|
881
|
-
else if (cmd === "analytics") {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
881
|
+
else if (cmd === "config" || cmd === "analytics") {
|
|
882
|
+
// `mm analytics …` stays as a hidden alias for `mm config analytics …`
|
|
883
|
+
// (it shipped documented in 0.1.78); the help only advertises mm config.
|
|
884
|
+
const args = cmd === "analytics" ? ["analytics", positional[1]] : [positional[1], positional[2]];
|
|
885
|
+
const key = (args[0] || "").toLowerCase();
|
|
886
|
+
const val = (args[1] || "").toLowerCase();
|
|
887
|
+
if (key === "analytics") {
|
|
888
|
+
if (val === "on" || val === "off") {
|
|
889
|
+
const { setConfigValue } = await import("./config.js");
|
|
890
|
+
setConfigValue("analyticsOptOut", val === "off");
|
|
891
|
+
console.log(`analytics ${val}`);
|
|
892
|
+
} else {
|
|
893
|
+
const st = analyticsState();
|
|
894
|
+
console.log(`analytics: ${st.on ? "on" : `off${st.reason ? ` — ${st.reason}` : ""}`}`);
|
|
895
|
+
console.log(" When on, mm sends anonymous event names + counts only — never code, model names, or paths.");
|
|
896
|
+
console.log(" mm config analytics on|off · also honored: MM_NO_ANALYTICS=1, DO_NOT_TRACK=1, CI=1");
|
|
897
|
+
}
|
|
898
|
+
} else if (!key) {
|
|
888
899
|
const st = analyticsState();
|
|
889
|
-
|
|
890
|
-
console.log("
|
|
891
|
-
console.log("
|
|
900
|
+
const { UPDATE_CHANNEL } = await import("./version.js");
|
|
901
|
+
console.log("Settings:");
|
|
902
|
+
console.log(` analytics ${st.on ? "on" : "off"} mm config analytics on|off`);
|
|
903
|
+
console.log(` channel ${UPDATE_CHANNEL || "stable"}`);
|
|
904
|
+
console.log(` config ${configFilePath}`);
|
|
905
|
+
} else {
|
|
906
|
+
console.log(`Unknown setting "${key}". Settings: analytics. Usage: mm config [analytics on|off]`);
|
|
892
907
|
}
|
|
893
908
|
}
|
|
894
909
|
else if (cmd === "scan") await cmdScan(positional, flags);
|
package/src/tui/app.js
CHANGED
|
@@ -115,6 +115,16 @@ function useTermDims() {
|
|
|
115
115
|
return { outer: Math.min(cols || 80, 220), termRows: computeTermRows(rows) };
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
/** Append the always-available globals every tab shares. Order = truncation
|
|
119
|
+
* priority (KeyBar drops the tail first on narrow terminals): feedback before
|
|
120
|
+
* play so the useful key survives longer than the easter egg. */
|
|
121
|
+
function withGlobalKeys(keys) {
|
|
122
|
+
const out = [...keys];
|
|
123
|
+
if (!out.some((k) => k.k === "!")) out.push({ k: "!", label: "feedback" });
|
|
124
|
+
if (!out.some((k) => k.k === "P")) out.push({ k: "P", label: "play 🦍" });
|
|
125
|
+
return out;
|
|
126
|
+
}
|
|
127
|
+
|
|
118
128
|
function PromptRow({ prompt }) {
|
|
119
129
|
if (!prompt) return h(Text, {}, "");
|
|
120
130
|
return h(
|
|
@@ -341,7 +351,7 @@ export function App({ apiBase, apiKey, dir, initialView, onSignedIn, fresh }) {
|
|
|
341
351
|
feedback?.stage === "strip" ? h(FeedbackStrip, null) : h(Text, {}, ""),
|
|
342
352
|
toast ? h(Text, { color: toast.color }, ` ${toast.msg}`) : h(Text, {}, ""),
|
|
343
353
|
h(StatusBar, { segsLeft, segsRight, width: W }),
|
|
344
|
-
h(KeyBar, { keys:
|
|
354
|
+
h(KeyBar, { keys: feedback?.stage === "card" ? keys : withGlobalKeys(keys), width: W }),
|
|
345
355
|
);
|
|
346
356
|
}
|
|
347
357
|
|
package/src/tui/views/account.js
CHANGED
|
@@ -99,7 +99,7 @@ export function AccountView({ client, me, refreshMe, apiBase, ui, active }) {
|
|
|
99
99
|
h(Row, { label: "retiring", value: `${me?.retiring_window_days ?? 90} day window` }),
|
|
100
100
|
h(Row, { label: "endpoint", value: endpoint }),
|
|
101
101
|
h(Row, { label: "key", value: keyPrefix }),
|
|
102
|
-
h(Row, { label: "analytics", value: analyticsState().on ? "on · anonymous event counts only · mm analytics off" : "off", color: C.FG_FAINT }),
|
|
102
|
+
h(Row, { label: "analytics", value: analyticsState().on ? "on · anonymous event counts only · mm config analytics off" : "off", color: C.FG_FAINT }),
|
|
103
103
|
h(Row, { label: "config", value: configFilePath, color: C.FG_FAINT }),
|
|
104
104
|
),
|
|
105
105
|
h(Text, {}, ""),
|