knowmind 0.1.24 → 0.1.25

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Knowmind CLI — Änderungen
2
2
 
3
+ ## 0.1.25 (2026-06-23)
4
+
5
+ **Geführtes Onboarding nach `install`/`init`**
6
+ - `install` und `init` zeigen nach der Eintragung einen klaren Abschluss-Schritt:
7
+ Liegt kein API-Token vor, wird deutlich auf Konto + Token hingewiesen — der
8
+ häufigste Stolperstein, denn ohne Token bleibt die MCP-Konfig wirkungslos. Mit
9
+ Token: kurze Bestätigung, dass alles startklar ist.
10
+ - `init` akzeptiert jetzt `--token kmt_…` und `--api URL` (konsistent zu `install`)
11
+ und legt die Config gleich mit an, damit die erzeugten Hooks sofort funktionieren,
12
+ statt ohne Token still ins Leere zu laufen.
13
+
3
14
  ## 0.1.23 (2026-06-20)
4
15
 
5
16
  **Neuer Befehl `knowmind install <ide>`**
package/bin/knowmind.js CHANGED
@@ -51,9 +51,10 @@ Knowmind ${VERSION} — Das Gedächtnis für Ihre KI
51
51
  Befehle:
52
52
  knowmind login [--token kmt_TOKEN] [--api https://knowmind.de]
53
53
  Token speichern
54
- knowmind init [--client claude-code|cursor|auto] [--dry-run]
54
+ knowmind init [--client claude-code|cursor|auto] [--token kmt_TOKEN] [--api URL] [--dry-run]
55
55
  Automatische Gedächtnis-Pflege im KI-Client einrichten
56
56
  (Hooks/Regeln + Memory-First-Block). Idempotent.
57
+ --token/--api legen die Config gleich mit an.
57
58
  knowmind config Aktuelle Konfiguration anzeigen
58
59
  knowmind search "Frage" [-k 5] [--hops 2]
59
60
  Hybrid-Recall gegen den Tenant-Korpus
@@ -93,6 +94,27 @@ function printRegisterHint(api) {
93
94
  );
94
95
  }
95
96
 
97
+ /** Ist ein Token konfiguriert (ENV oder Config-File)? */
98
+ function hasToken() {
99
+ return Boolean(process.env.KNOWMIND_TOKEN || loadConfig().token);
100
+ }
101
+
102
+ /**
103
+ * Geführter Abschluss nach `install`/`init`: Ohne Token bleibt die Eintragung
104
+ * wirkungslos (tote MCP-Konfig) — der häufigste Stolperstein. Bei vorhandenem
105
+ * Token: kurze Bestätigung. Sonst: deutlicher Schluss-Schritt mit Anleitung.
106
+ */
107
+ function finishOnboardingHint() {
108
+ if (hasToken()) {
109
+ console.log("\n✓ Token gefunden — knowmind ist startklar, sobald der Client neu lädt.");
110
+ return;
111
+ }
112
+ console.log(
113
+ "\n⚠ LETZTER SCHRITT: Ohne API-Token ist die Eintragung noch wirkungslos (keine Verbindung).",
114
+ );
115
+ printRegisterHint(parseFlag("--api", null));
116
+ }
117
+
96
118
  async function runLogin() {
97
119
  let token = parseFlag("--token", null);
98
120
  const api = parseFlag("--api", null);
@@ -214,18 +236,34 @@ async function runConfig() {
214
236
  async function runInitCmd() {
215
237
  const client = parseFlag("--client", "auto");
216
238
  const dryRun = args.includes("--dry-run");
239
+ // Konsistenz zu `install`: --token/--api direkt verarbeiten und in der Config
240
+ // ablegen, damit die erzeugten Hooks (sie lesen Token/URL aus ~/.knowmind/
241
+ // config.json bzw. ENV) sofort funktionieren statt still ins Leere zu laufen.
242
+ const token = parseFlag("--token", null);
243
+ const api = parseFlag("--api", null);
244
+ if ((token || api) && !dryRun) {
245
+ if (token && !token.startsWith("kmt_")) throw new Error("Token muss mit kmt_ beginnen.");
246
+ const where = saveConfig({ ...(token ? { token } : {}), ...(api ? { apiUrl: api } : {}) });
247
+ if (token) console.log(`Token gespeichert in ${where}.`);
248
+ }
217
249
  console.log(await runInit({ client, dryRun }));
250
+ if (!dryRun) finishOnboardingHint();
218
251
  }
219
252
 
220
253
  async function runInstallCmd() {
254
+ const ideKey = args[1] && !args[1].startsWith("-") ? args[1] : null;
221
255
  runInstall({
222
- ideKey: args[1] && !args[1].startsWith("-") ? args[1] : null,
256
+ ideKey,
223
257
  project: args.includes("--project"),
224
258
  dryRun: args.includes("--dry-run"),
225
259
  printOnly: args.includes("--print"),
226
260
  apiUrl: parseFlag("--api", null),
227
261
  literalToken: parseFlag("--token", null),
228
262
  });
263
+ // Nach echter Eintragung (nicht bei list/--print/--dry-run) zum Token führen.
264
+ if (ideKey && ideKey !== "list" && !args.includes("--print") && !args.includes("--dry-run")) {
265
+ finishOnboardingHint();
266
+ }
229
267
  }
230
268
 
231
269
  // Wichtig: `process.exit(N)` reißt offene Sockets/fetch-Verbindungen mit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knowmind",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "mcpName": "io.github.Schubeler-Consulting/knowmind",
5
5
  "description": "Knowmind — das Agentengehirn aus Deutschland: CLI + MCP-Server (Langzeitgedächtnis & Wissensgraph für Ihre KI, Server in Deutschland).",
6
6
  "type": "module",