knowmind 0.3.6 → 0.3.8
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 +286 -273
- package/README.de.md +231 -207
- package/README.md +229 -207
- package/package.json +63 -63
- package/scripts/registry-fassung-vorhanden.mjs +92 -0
- package/scripts/tools-abgleich.mjs +66 -66
- package/src/client.js +143 -143
- package/src/init.js +831 -831
- package/src/install.js +371 -371
- package/src/mcp-starter.py +119 -119
- package/src/mcp-stdio.js +387 -387
- package/src/tools-fallback.json +657 -466
package/src/install.js
CHANGED
|
@@ -1,371 +1,371 @@
|
|
|
1
|
-
// `knowmind install <ide>` — schreibt die MCP-Server-Konfiguration für knowmind
|
|
2
|
-
// in die richtige Datei der jeweiligen IDE. Drei Schema-Familien decken alle
|
|
3
|
-
// gängigen Clients ab:
|
|
4
|
-
//
|
|
5
|
-
// 1. `mcpServers` → Cursor, Windsurf, Antigravity, Claude Desktop, Claude Code (Projekt)
|
|
6
|
-
// 2. `servers`+inputs → VS Code (eigener Secret-Prompt)
|
|
7
|
-
// 3. `context_servers`→ Zed
|
|
8
|
-
//
|
|
9
|
-
// Secret-Politik (R5): das Token wird NICHT im Klartext in Config-Dateien
|
|
10
|
-
// geschrieben. Wo die IDE Interpolation kann, verweisen wir auf die Umgebung
|
|
11
|
-
// (`${env:KNOWMIND_TOKEN}` / `${input:…}` / `${KNOWMIND_TOKEN}`); wo nicht, steht
|
|
12
|
-
// ein Platzhalter mit Warnung. Nur mit ausdrücklichem `--token <wert>` wird ein
|
|
13
|
-
// literaler Wert geschrieben (dann mit Klartext-Warnung).
|
|
14
|
-
|
|
15
|
-
import { mkdirSync, readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
16
|
-
import { homedir, platform } from "node:os";
|
|
17
|
-
import { dirname, join } from "node:path";
|
|
18
|
-
import { fileURLToPath } from "node:url";
|
|
19
|
-
|
|
20
|
-
const DEFAULT_API = "https://knowmind.de";
|
|
21
|
-
const NPX = "npx";
|
|
22
|
-
const NPX_ARGS = ["-y", "knowmind", "mcp"];
|
|
23
|
-
|
|
24
|
-
function home(...p) {
|
|
25
|
-
return join(homedir(), ...p);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// OS-abhängiger App-Daten-Pfad (Windows APPDATA, macOS Application Support, sonst ~/.config).
|
|
29
|
-
function appData(...p) {
|
|
30
|
-
if (platform() === "win32") {
|
|
31
|
-
return join(process.env.APPDATA || home("AppData", "Roaming"), ...p);
|
|
32
|
-
}
|
|
33
|
-
if (platform() === "darwin") {
|
|
34
|
-
return home("Library", "Application Support", ...p);
|
|
35
|
-
}
|
|
36
|
-
return join(process.env.XDG_CONFIG_HOME || home(".config"), ...p);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// ── IDE-Registry ──────────────────────────────────────────────────────────
|
|
40
|
-
// family: "mcpServers" | "servers" | "context_servers" | "command"
|
|
41
|
-
// secret: "env" | "input" | "shell" | "literal-only" (Default-Referenzstil)
|
|
42
|
-
const IDES = {
|
|
43
|
-
cursor: {
|
|
44
|
-
label: "Cursor",
|
|
45
|
-
family: "mcpServers",
|
|
46
|
-
secret: "env",
|
|
47
|
-
globalPath: () => home(".cursor", "mcp.json"),
|
|
48
|
-
projectPath: (cwd) => join(cwd, ".cursor", "mcp.json"),
|
|
49
|
-
},
|
|
50
|
-
vscode: {
|
|
51
|
-
label: "VS Code",
|
|
52
|
-
family: "servers",
|
|
53
|
-
secret: "input",
|
|
54
|
-
globalPath: () => appData("Code", "User", "mcp.json"),
|
|
55
|
-
projectPath: (cwd) => join(cwd, ".vscode", "mcp.json"),
|
|
56
|
-
},
|
|
57
|
-
windsurf: {
|
|
58
|
-
label: "Windsurf",
|
|
59
|
-
family: "mcpServers",
|
|
60
|
-
secret: "env",
|
|
61
|
-
globalPath: () => home(".codeium", "windsurf", "mcp_config.json"),
|
|
62
|
-
projectPath: null,
|
|
63
|
-
},
|
|
64
|
-
antigravity: {
|
|
65
|
-
label: "Google Antigravity",
|
|
66
|
-
family: "mcpServers",
|
|
67
|
-
secret: "literal-only",
|
|
68
|
-
globalPath: () => home(".gemini", "config", "mcp_config.json"),
|
|
69
|
-
projectPath: null,
|
|
70
|
-
},
|
|
71
|
-
zed: {
|
|
72
|
-
label: "Zed",
|
|
73
|
-
family: "context_servers",
|
|
74
|
-
secret: "literal-only",
|
|
75
|
-
globalPath: () => (platform() === "win32" ? appData("Zed", "settings.json") : home(".config", "zed", "settings.json")),
|
|
76
|
-
projectPath: (cwd) => join(cwd, ".zed", "settings.json"),
|
|
77
|
-
},
|
|
78
|
-
"claude-desktop": {
|
|
79
|
-
label: "Claude Desktop",
|
|
80
|
-
family: "mcpServers",
|
|
81
|
-
secret: "literal-only",
|
|
82
|
-
globalPath: () => appData("Claude", "claude_desktop_config.json"),
|
|
83
|
-
projectPath: null,
|
|
84
|
-
},
|
|
85
|
-
gemini: {
|
|
86
|
-
label: "Gemini CLI",
|
|
87
|
-
family: "mcpServers",
|
|
88
|
-
secret: "literal-only",
|
|
89
|
-
globalPath: () => home(".gemini", "settings.json"),
|
|
90
|
-
projectPath: (cwd) => join(cwd, ".gemini", "settings.json"),
|
|
91
|
-
},
|
|
92
|
-
codex: {
|
|
93
|
-
label: "Codex CLI",
|
|
94
|
-
family: "toml",
|
|
95
|
-
secret: "literal-only",
|
|
96
|
-
globalPath: () => home(".codex", "config.toml"),
|
|
97
|
-
projectPath: null,
|
|
98
|
-
},
|
|
99
|
-
"claude-code": {
|
|
100
|
-
label: "Claude Code",
|
|
101
|
-
family: "mcpServers",
|
|
102
|
-
secret: "shell",
|
|
103
|
-
globalPath: null, // user-scope: via `claude mcp add` (siehe printClaudeCode)
|
|
104
|
-
projectPath: (cwd) => join(cwd, ".mcp.json"),
|
|
105
|
-
},
|
|
106
|
-
jetbrains: {
|
|
107
|
-
label: "JetBrains (IntelliJ/PyCharm)",
|
|
108
|
-
family: "mcpServers",
|
|
109
|
-
secret: "literal-only",
|
|
110
|
-
globalPath: null, // GUI-basiert: Snippet ausgeben
|
|
111
|
-
projectPath: null,
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// Token-Referenz je Secret-Stil. literalToken überschreibt (nur mit --token).
|
|
116
|
-
function tokenRef(secretStyle, literalToken) {
|
|
117
|
-
if (literalToken) return literalToken;
|
|
118
|
-
switch (secretStyle) {
|
|
119
|
-
case "env":
|
|
120
|
-
return "${env:KNOWMIND_TOKEN}";
|
|
121
|
-
case "shell":
|
|
122
|
-
return "${KNOWMIND_TOKEN}";
|
|
123
|
-
case "input":
|
|
124
|
-
return "${input:knowmind-token}";
|
|
125
|
-
default:
|
|
126
|
-
return "<KNOWMIND_TOKEN — siehe `knowmind login`>";
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Startbefehl für den MCP-Server.
|
|
132
|
-
*
|
|
133
|
-
* Unter Windows nicht direkt `npx`: Das ist ein Konsolenprogramm, und hat der
|
|
134
|
-
* KI-Client keine eigene Konsole (Desktop-Anwendung, IDE-Erweiterung), gibt
|
|
135
|
-
* Windows dem Kind bei JEDEM Werkzeugaufruf ein eigenes Fenster. Das blitzt
|
|
136
|
-
* nicht nur, es stiehlt den Tastaturfokus mitten im Tippen. Johann am
|
|
137
|
-
* 10.08.2026: „Viele werden es deshalb deinstallieren." — und er hat recht.
|
|
138
|
-
*
|
|
139
|
-
* Deshalb dazwischen `pythonw.exe` (GUI-Programm, öffnet selbst kein Fenster),
|
|
140
|
-
* das npx mit CREATE_NO_WINDOW startet und die Datenströme durchreicht. Ohne
|
|
141
|
-
* Python auf dem Rechner bleibt es beim direkten npx-Aufruf — eine ehrliche
|
|
142
|
-
* Grenze ist besser als eine halbe Lösung.
|
|
143
|
-
*/
|
|
144
|
-
function startBefehl() {
|
|
145
|
-
const pythonw = findePythonwFuerMcp();
|
|
146
|
-
if (!pythonw) return { command: NPX, args: NPX_ARGS };
|
|
147
|
-
const starter = join(dirname(fileURLToPath(import.meta.url)), "mcp-starter.py");
|
|
148
|
-
return { command: pythonw, args: [starter, NPX, ...NPX_ARGS] };
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/** Vollständiger Pfad zu pythonw.exe, oder null. */
|
|
152
|
-
function findePythonwFuerMcp() {
|
|
153
|
-
if (platform() !== "win32") return null;
|
|
154
|
-
const kandidaten = [];
|
|
155
|
-
const lokal = process.env.LOCALAPPDATA;
|
|
156
|
-
for (const v of ["313", "312", "311", "310"]) {
|
|
157
|
-
if (lokal) kandidaten.push(join(lokal, "Programs", "Python", `Python${v}`, "pythonw.exe"));
|
|
158
|
-
kandidaten.push(join("C:\\", `Python${v}`, "pythonw.exe"));
|
|
159
|
-
}
|
|
160
|
-
return kandidaten.find((p) => existsSync(p)) ?? null;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Server-Eintrag im Schema der Familie.
|
|
164
|
-
function serverEntry(ide, { apiUrl, literalToken }) {
|
|
165
|
-
const env = {
|
|
166
|
-
KNOWMIND_TOKEN: tokenRef(ide.secret, literalToken),
|
|
167
|
-
KNOWMIND_API_URL: apiUrl,
|
|
168
|
-
};
|
|
169
|
-
const { command, args } = startBefehl();
|
|
170
|
-
if (ide.family === "servers") {
|
|
171
|
-
// VS Code verlangt einen Transport-Typ.
|
|
172
|
-
return { type: "stdio", command, args, env };
|
|
173
|
-
}
|
|
174
|
-
return { command, args, env };
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// Vollständiges Snippet (für --print / GUI-IDEs).
|
|
178
|
-
function snippet(ide, opts) {
|
|
179
|
-
const entry = serverEntry(ide, opts);
|
|
180
|
-
if (ide.family === "servers") {
|
|
181
|
-
return {
|
|
182
|
-
inputs: [{ type: "promptString", id: "knowmind-token", description: "KNOWMIND_TOKEN", password: true }],
|
|
183
|
-
servers: { knowmind: entry },
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
return { [ide.family]: { knowmind: entry } };
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// ── TOML (Codex CLI) ────────────────────────────────────────────────────────
|
|
190
|
-
// Codex liest ~/.codex/config.toml. Es gibt keinen TOML-Parser als Abhängigkeit
|
|
191
|
-
// und es soll keiner dazukommen — der knowmind-Block wird zeilenbasiert ersetzt:
|
|
192
|
-
// Abschnittskopf [mcp_servers.knowmind] (und Unterabschnitte) samt Folgezeilen
|
|
193
|
-
// bis zum nächsten Abschnittskopf entfernen, dann den frischen Block anhängen.
|
|
194
|
-
function tomlBlock(opts) {
|
|
195
|
-
const token = tokenRef("literal-only", opts.literalToken);
|
|
196
|
-
return [
|
|
197
|
-
"[mcp_servers.knowmind]",
|
|
198
|
-
`command = "${NPX}"`,
|
|
199
|
-
`args = [${NPX_ARGS.map((a) => `"${a}"`).join(", ")}]`,
|
|
200
|
-
"",
|
|
201
|
-
"[mcp_servers.knowmind.env]",
|
|
202
|
-
`KNOWMIND_TOKEN = "${token}"`,
|
|
203
|
-
`KNOWMIND_API_URL = "${opts.apiUrl}"`,
|
|
204
|
-
].join("\n");
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function mergeToml(text, opts) {
|
|
208
|
-
// Erst Zeilenenden vereinheitlichen: `.` matcht kein \r, mit CRLF-Dateien
|
|
209
|
-
// bräche die Abschnitts-Entfernung sonst mitten im Block ab (Test 04.08.).
|
|
210
|
-
const quelltext = (text || "").replace(/\r\n/g, "\n");
|
|
211
|
-
// Kopfzeile + alle Folgezeilen, die keinen neuen Abschnitt beginnen.
|
|
212
|
-
const alt = /(^|\n)\[mcp_servers\.knowmind(\.[^\]]+)?\](?:\n(?!\[).*)*/g;
|
|
213
|
-
let neu = quelltext.replace(alt, "$1");
|
|
214
|
-
neu = neu.replace(/\n{3,}/g, "\n\n").trimEnd();
|
|
215
|
-
return (neu ? neu + "\n\n" : "") + tomlBlock(opts) + "\n";
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function readJsonSafe(path) {
|
|
219
|
-
if (!existsSync(path)) return {};
|
|
220
|
-
try {
|
|
221
|
-
return JSON.parse(readFileSync(path, "utf-8"));
|
|
222
|
-
} catch {
|
|
223
|
-
return null; // signalisiert: vorhandene Datei ist kaputt → nicht blind überschreiben
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
function writeJson(path, obj) {
|
|
228
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
229
|
-
writeFileSync(path, JSON.stringify(obj, null, 2) + "\n", "utf-8");
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// Merged knowmind in eine bestehende Config, ohne Fremd-Server zu verlieren.
|
|
233
|
-
function mergeInto(existing, ide, opts) {
|
|
234
|
-
const cfg = existing && typeof existing === "object" ? { ...existing } : {};
|
|
235
|
-
const entry = serverEntry(ide, opts);
|
|
236
|
-
if (ide.family === "servers") {
|
|
237
|
-
cfg.servers = { ...(cfg.servers || {}), knowmind: entry };
|
|
238
|
-
const inputs = Array.isArray(cfg.inputs) ? cfg.inputs.slice() : [];
|
|
239
|
-
if (!inputs.some((i) => i && i.id === "knowmind-token")) {
|
|
240
|
-
inputs.push({ type: "promptString", id: "knowmind-token", description: "KNOWMIND_TOKEN", password: true });
|
|
241
|
-
}
|
|
242
|
-
cfg.inputs = inputs;
|
|
243
|
-
} else {
|
|
244
|
-
cfg[ide.family] = { ...(cfg[ide.family] || {}), knowmind: entry };
|
|
245
|
-
}
|
|
246
|
-
return cfg;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function printClaudeCodeCommand(opts) {
|
|
250
|
-
const tokenArg = opts.literalToken ? opts.literalToken : "$KNOWMIND_TOKEN";
|
|
251
|
-
console.log("Claude Code (User-Scope, alle Projekte) — diesen Befehl ausführen:\n");
|
|
252
|
-
console.log(
|
|
253
|
-
` claude mcp add --scope user --transport stdio \\\n` +
|
|
254
|
-
` --env KNOWMIND_TOKEN=${tokenArg} \\\n` +
|
|
255
|
-
` --env KNOWMIND_API_URL=${opts.apiUrl} \\\n` +
|
|
256
|
-
` knowmind -- npx -y knowmind mcp\n`,
|
|
257
|
-
);
|
|
258
|
-
console.log("Für ein einzelnes Projekt stattdessen: knowmind install claude-code --project\n");
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// ── Hauptbefehl ─────────────────────────────────────────────────────────────
|
|
262
|
-
export function runInstall(opts) {
|
|
263
|
-
const { ideKey, project, dryRun, printOnly, apiUrl, literalToken } = opts;
|
|
264
|
-
|
|
265
|
-
if (!ideKey || ideKey === "list") {
|
|
266
|
-
console.log("knowmind install <ide> [--project] [--print] [--token <wert>] [--api <url>]\n");
|
|
267
|
-
console.log("Unterstützte IDEs:");
|
|
268
|
-
for (const [key, ide] of Object.entries(IDES)) console.log(` ${key.padEnd(16)} ${ide.label}`);
|
|
269
|
-
console.log(" all alle dateibasierten IDEs auf einmal");
|
|
270
|
-
console.log("\nStandard: globale Config, Token als Referenz (kein Klartext). --project schreibt projektlokal.");
|
|
271
|
-
return;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
const targets = ideKey === "all" ? Object.keys(IDES) : [ideKey];
|
|
275
|
-
if (ideKey !== "all" && !IDES[ideKey]) {
|
|
276
|
-
throw new Error(`Unbekannte IDE: ${ideKey}. \`knowmind install list\` zeigt alle.`);
|
|
277
|
-
}
|
|
278
|
-
if (literalToken) {
|
|
279
|
-
console.warn("WARNUNG: --token schreibt das Token im KLARTEXT in die Config-Datei(en).\n");
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const cwd = process.cwd();
|
|
283
|
-
const entryOpts = { apiUrl: apiUrl || DEFAULT_API, literalToken };
|
|
284
|
-
|
|
285
|
-
for (const key of targets) {
|
|
286
|
-
const ide = IDES[key];
|
|
287
|
-
|
|
288
|
-
// Reine Snippet-/GUI-Fälle.
|
|
289
|
-
if (printOnly || (key === "jetbrains") || (key === "claude-code" && !project)) {
|
|
290
|
-
if (key === "claude-code" && !project) {
|
|
291
|
-
printClaudeCodeCommand(entryOpts);
|
|
292
|
-
continue;
|
|
293
|
-
}
|
|
294
|
-
console.log(`# ${ide.label} — Snippet (manuell einfügen):`);
|
|
295
|
-
console.log(ide.family === "toml" ? tomlBlock(entryOpts) : JSON.stringify(snippet(ide, entryOpts), null, 2));
|
|
296
|
-
console.log("");
|
|
297
|
-
continue;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// TOML-Ziel (Codex): Text mergen statt JSON.
|
|
301
|
-
if (ide.family === "toml") {
|
|
302
|
-
const tomlPath = project ? (ide.projectPath && ide.projectPath(cwd)) : ide.globalPath();
|
|
303
|
-
if (!tomlPath) {
|
|
304
|
-
console.log(`# ${ide.label}: kein ${project ? "Projekt" : "globaler"}-Dateipfad — Snippet:`);
|
|
305
|
-
console.log(tomlBlock(entryOpts));
|
|
306
|
-
continue;
|
|
307
|
-
}
|
|
308
|
-
const alterText = existsSync(tomlPath) ? readFileSync(tomlPath, "utf-8") : "";
|
|
309
|
-
const neuerText = mergeToml(alterText, entryOpts);
|
|
310
|
-
if (dryRun) {
|
|
311
|
-
console.log(`# ${ide.label} — DRY RUN → ${tomlPath}`);
|
|
312
|
-
console.log(neuerText);
|
|
313
|
-
continue;
|
|
314
|
-
}
|
|
315
|
-
mkdirSync(dirname(tomlPath), { recursive: true });
|
|
316
|
-
writeFileSync(tomlPath, neuerText, "utf-8");
|
|
317
|
-
console.log(`✓ ${ide.label}: knowmind eingetragen in ${tomlPath}`);
|
|
318
|
-
if (!literalToken) {
|
|
319
|
-
console.log(` → Platzhalter gesetzt: KNOWMIND_TOKEN in ${tomlPath} durch dein Token ersetzen.`);
|
|
320
|
-
}
|
|
321
|
-
continue;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
const path = project ? (ide.projectPath && ide.projectPath(cwd)) : (ide.globalPath && ide.globalPath());
|
|
325
|
-
if (!path) {
|
|
326
|
-
// Kein Datei-Ziel für diesen Scope → Snippet zeigen.
|
|
327
|
-
console.log(`# ${ide.label}: kein ${project ? "Projekt" : "globaler"}-Dateipfad bekannt — Snippet:`);
|
|
328
|
-
console.log(JSON.stringify(snippet(ide, entryOpts), null, 2));
|
|
329
|
-
console.log("");
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
const existing = readJsonSafe(path);
|
|
334
|
-
if (existing === null) {
|
|
335
|
-
console.error(`! ${ide.label}: ${path} ist kein gültiges JSON — übersprungen (nicht überschrieben).`);
|
|
336
|
-
continue;
|
|
337
|
-
}
|
|
338
|
-
const merged = mergeInto(existing, ide, entryOpts);
|
|
339
|
-
|
|
340
|
-
if (dryRun) {
|
|
341
|
-
console.log(`# ${ide.label} — DRY RUN → ${path}`);
|
|
342
|
-
console.log(JSON.stringify(merged, null, 2));
|
|
343
|
-
console.log("");
|
|
344
|
-
continue;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
writeJson(path, merged);
|
|
348
|
-
console.log(`✓ ${ide.label}: knowmind eingetragen in ${path}`);
|
|
349
|
-
if (literalToken) {
|
|
350
|
-
console.log(` → ${ide.label} neu starten — fertig.`);
|
|
351
|
-
} else if (ide.secret === "env") {
|
|
352
|
-
console.log(` → setze KNOWMIND_TOKEN in deiner Umgebung (oder nutze --token).`);
|
|
353
|
-
} else if (ide.secret === "literal-only" && !literalToken) {
|
|
354
|
-
console.log(` → Platzhalter gesetzt: KNOWMIND_TOKEN in ${path} durch dein Token ersetzen.`);
|
|
355
|
-
} else if (ide.secret === "shell") {
|
|
356
|
-
console.log(` → ${path} nutzt \${KNOWMIND_TOKEN} aus der Umgebung (git-sicher).`);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// Wer ohne --token installiert, braucht noch einen Token aus einem (kostenlosen)
|
|
361
|
-
// Konto — genau hier scheitern Erstnutzer. Daher der klare Weg zum Abschluss.
|
|
362
|
-
if (!literalToken && !dryRun && !printOnly) {
|
|
363
|
-
const base = apiUrl || DEFAULT_API;
|
|
364
|
-
console.log(
|
|
365
|
-
"\nNoch kein Token? knowmind ist im kostenlosen Tarif voll nutzbar (bis 2.500 Erinnerungen):\n" +
|
|
366
|
-
` 1. Konto anlegen: ${base}/signin?mode=register\n` +
|
|
367
|
-
` 2. Token erzeugen: ${base}/dashboard/tokens\n` +
|
|
368
|
-
" 3. knowmind login --token kmt_... (oder KNOWMIND_TOKEN setzen)\n",
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
1
|
+
// `knowmind install <ide>` — schreibt die MCP-Server-Konfiguration für knowmind
|
|
2
|
+
// in die richtige Datei der jeweiligen IDE. Drei Schema-Familien decken alle
|
|
3
|
+
// gängigen Clients ab:
|
|
4
|
+
//
|
|
5
|
+
// 1. `mcpServers` → Cursor, Windsurf, Antigravity, Claude Desktop, Claude Code (Projekt)
|
|
6
|
+
// 2. `servers`+inputs → VS Code (eigener Secret-Prompt)
|
|
7
|
+
// 3. `context_servers`→ Zed
|
|
8
|
+
//
|
|
9
|
+
// Secret-Politik (R5): das Token wird NICHT im Klartext in Config-Dateien
|
|
10
|
+
// geschrieben. Wo die IDE Interpolation kann, verweisen wir auf die Umgebung
|
|
11
|
+
// (`${env:KNOWMIND_TOKEN}` / `${input:…}` / `${KNOWMIND_TOKEN}`); wo nicht, steht
|
|
12
|
+
// ein Platzhalter mit Warnung. Nur mit ausdrücklichem `--token <wert>` wird ein
|
|
13
|
+
// literaler Wert geschrieben (dann mit Klartext-Warnung).
|
|
14
|
+
|
|
15
|
+
import { mkdirSync, readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
16
|
+
import { homedir, platform } from "node:os";
|
|
17
|
+
import { dirname, join } from "node:path";
|
|
18
|
+
import { fileURLToPath } from "node:url";
|
|
19
|
+
|
|
20
|
+
const DEFAULT_API = "https://knowmind.de";
|
|
21
|
+
const NPX = "npx";
|
|
22
|
+
const NPX_ARGS = ["-y", "knowmind", "mcp"];
|
|
23
|
+
|
|
24
|
+
function home(...p) {
|
|
25
|
+
return join(homedir(), ...p);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// OS-abhängiger App-Daten-Pfad (Windows APPDATA, macOS Application Support, sonst ~/.config).
|
|
29
|
+
function appData(...p) {
|
|
30
|
+
if (platform() === "win32") {
|
|
31
|
+
return join(process.env.APPDATA || home("AppData", "Roaming"), ...p);
|
|
32
|
+
}
|
|
33
|
+
if (platform() === "darwin") {
|
|
34
|
+
return home("Library", "Application Support", ...p);
|
|
35
|
+
}
|
|
36
|
+
return join(process.env.XDG_CONFIG_HOME || home(".config"), ...p);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// ── IDE-Registry ──────────────────────────────────────────────────────────
|
|
40
|
+
// family: "mcpServers" | "servers" | "context_servers" | "command"
|
|
41
|
+
// secret: "env" | "input" | "shell" | "literal-only" (Default-Referenzstil)
|
|
42
|
+
const IDES = {
|
|
43
|
+
cursor: {
|
|
44
|
+
label: "Cursor",
|
|
45
|
+
family: "mcpServers",
|
|
46
|
+
secret: "env",
|
|
47
|
+
globalPath: () => home(".cursor", "mcp.json"),
|
|
48
|
+
projectPath: (cwd) => join(cwd, ".cursor", "mcp.json"),
|
|
49
|
+
},
|
|
50
|
+
vscode: {
|
|
51
|
+
label: "VS Code",
|
|
52
|
+
family: "servers",
|
|
53
|
+
secret: "input",
|
|
54
|
+
globalPath: () => appData("Code", "User", "mcp.json"),
|
|
55
|
+
projectPath: (cwd) => join(cwd, ".vscode", "mcp.json"),
|
|
56
|
+
},
|
|
57
|
+
windsurf: {
|
|
58
|
+
label: "Windsurf",
|
|
59
|
+
family: "mcpServers",
|
|
60
|
+
secret: "env",
|
|
61
|
+
globalPath: () => home(".codeium", "windsurf", "mcp_config.json"),
|
|
62
|
+
projectPath: null,
|
|
63
|
+
},
|
|
64
|
+
antigravity: {
|
|
65
|
+
label: "Google Antigravity",
|
|
66
|
+
family: "mcpServers",
|
|
67
|
+
secret: "literal-only",
|
|
68
|
+
globalPath: () => home(".gemini", "config", "mcp_config.json"),
|
|
69
|
+
projectPath: null,
|
|
70
|
+
},
|
|
71
|
+
zed: {
|
|
72
|
+
label: "Zed",
|
|
73
|
+
family: "context_servers",
|
|
74
|
+
secret: "literal-only",
|
|
75
|
+
globalPath: () => (platform() === "win32" ? appData("Zed", "settings.json") : home(".config", "zed", "settings.json")),
|
|
76
|
+
projectPath: (cwd) => join(cwd, ".zed", "settings.json"),
|
|
77
|
+
},
|
|
78
|
+
"claude-desktop": {
|
|
79
|
+
label: "Claude Desktop",
|
|
80
|
+
family: "mcpServers",
|
|
81
|
+
secret: "literal-only",
|
|
82
|
+
globalPath: () => appData("Claude", "claude_desktop_config.json"),
|
|
83
|
+
projectPath: null,
|
|
84
|
+
},
|
|
85
|
+
gemini: {
|
|
86
|
+
label: "Gemini CLI",
|
|
87
|
+
family: "mcpServers",
|
|
88
|
+
secret: "literal-only",
|
|
89
|
+
globalPath: () => home(".gemini", "settings.json"),
|
|
90
|
+
projectPath: (cwd) => join(cwd, ".gemini", "settings.json"),
|
|
91
|
+
},
|
|
92
|
+
codex: {
|
|
93
|
+
label: "Codex CLI",
|
|
94
|
+
family: "toml",
|
|
95
|
+
secret: "literal-only",
|
|
96
|
+
globalPath: () => home(".codex", "config.toml"),
|
|
97
|
+
projectPath: null,
|
|
98
|
+
},
|
|
99
|
+
"claude-code": {
|
|
100
|
+
label: "Claude Code",
|
|
101
|
+
family: "mcpServers",
|
|
102
|
+
secret: "shell",
|
|
103
|
+
globalPath: null, // user-scope: via `claude mcp add` (siehe printClaudeCode)
|
|
104
|
+
projectPath: (cwd) => join(cwd, ".mcp.json"),
|
|
105
|
+
},
|
|
106
|
+
jetbrains: {
|
|
107
|
+
label: "JetBrains (IntelliJ/PyCharm)",
|
|
108
|
+
family: "mcpServers",
|
|
109
|
+
secret: "literal-only",
|
|
110
|
+
globalPath: null, // GUI-basiert: Snippet ausgeben
|
|
111
|
+
projectPath: null,
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// Token-Referenz je Secret-Stil. literalToken überschreibt (nur mit --token).
|
|
116
|
+
function tokenRef(secretStyle, literalToken) {
|
|
117
|
+
if (literalToken) return literalToken;
|
|
118
|
+
switch (secretStyle) {
|
|
119
|
+
case "env":
|
|
120
|
+
return "${env:KNOWMIND_TOKEN}";
|
|
121
|
+
case "shell":
|
|
122
|
+
return "${KNOWMIND_TOKEN}";
|
|
123
|
+
case "input":
|
|
124
|
+
return "${input:knowmind-token}";
|
|
125
|
+
default:
|
|
126
|
+
return "<KNOWMIND_TOKEN — siehe `knowmind login`>";
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Startbefehl für den MCP-Server.
|
|
132
|
+
*
|
|
133
|
+
* Unter Windows nicht direkt `npx`: Das ist ein Konsolenprogramm, und hat der
|
|
134
|
+
* KI-Client keine eigene Konsole (Desktop-Anwendung, IDE-Erweiterung), gibt
|
|
135
|
+
* Windows dem Kind bei JEDEM Werkzeugaufruf ein eigenes Fenster. Das blitzt
|
|
136
|
+
* nicht nur, es stiehlt den Tastaturfokus mitten im Tippen. Johann am
|
|
137
|
+
* 10.08.2026: „Viele werden es deshalb deinstallieren." — und er hat recht.
|
|
138
|
+
*
|
|
139
|
+
* Deshalb dazwischen `pythonw.exe` (GUI-Programm, öffnet selbst kein Fenster),
|
|
140
|
+
* das npx mit CREATE_NO_WINDOW startet und die Datenströme durchreicht. Ohne
|
|
141
|
+
* Python auf dem Rechner bleibt es beim direkten npx-Aufruf — eine ehrliche
|
|
142
|
+
* Grenze ist besser als eine halbe Lösung.
|
|
143
|
+
*/
|
|
144
|
+
function startBefehl() {
|
|
145
|
+
const pythonw = findePythonwFuerMcp();
|
|
146
|
+
if (!pythonw) return { command: NPX, args: NPX_ARGS };
|
|
147
|
+
const starter = join(dirname(fileURLToPath(import.meta.url)), "mcp-starter.py");
|
|
148
|
+
return { command: pythonw, args: [starter, NPX, ...NPX_ARGS] };
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** Vollständiger Pfad zu pythonw.exe, oder null. */
|
|
152
|
+
function findePythonwFuerMcp() {
|
|
153
|
+
if (platform() !== "win32") return null;
|
|
154
|
+
const kandidaten = [];
|
|
155
|
+
const lokal = process.env.LOCALAPPDATA;
|
|
156
|
+
for (const v of ["313", "312", "311", "310"]) {
|
|
157
|
+
if (lokal) kandidaten.push(join(lokal, "Programs", "Python", `Python${v}`, "pythonw.exe"));
|
|
158
|
+
kandidaten.push(join("C:\\", `Python${v}`, "pythonw.exe"));
|
|
159
|
+
}
|
|
160
|
+
return kandidaten.find((p) => existsSync(p)) ?? null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Server-Eintrag im Schema der Familie.
|
|
164
|
+
function serverEntry(ide, { apiUrl, literalToken }) {
|
|
165
|
+
const env = {
|
|
166
|
+
KNOWMIND_TOKEN: tokenRef(ide.secret, literalToken),
|
|
167
|
+
KNOWMIND_API_URL: apiUrl,
|
|
168
|
+
};
|
|
169
|
+
const { command, args } = startBefehl();
|
|
170
|
+
if (ide.family === "servers") {
|
|
171
|
+
// VS Code verlangt einen Transport-Typ.
|
|
172
|
+
return { type: "stdio", command, args, env };
|
|
173
|
+
}
|
|
174
|
+
return { command, args, env };
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Vollständiges Snippet (für --print / GUI-IDEs).
|
|
178
|
+
function snippet(ide, opts) {
|
|
179
|
+
const entry = serverEntry(ide, opts);
|
|
180
|
+
if (ide.family === "servers") {
|
|
181
|
+
return {
|
|
182
|
+
inputs: [{ type: "promptString", id: "knowmind-token", description: "KNOWMIND_TOKEN", password: true }],
|
|
183
|
+
servers: { knowmind: entry },
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
return { [ide.family]: { knowmind: entry } };
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// ── TOML (Codex CLI) ────────────────────────────────────────────────────────
|
|
190
|
+
// Codex liest ~/.codex/config.toml. Es gibt keinen TOML-Parser als Abhängigkeit
|
|
191
|
+
// und es soll keiner dazukommen — der knowmind-Block wird zeilenbasiert ersetzt:
|
|
192
|
+
// Abschnittskopf [mcp_servers.knowmind] (und Unterabschnitte) samt Folgezeilen
|
|
193
|
+
// bis zum nächsten Abschnittskopf entfernen, dann den frischen Block anhängen.
|
|
194
|
+
function tomlBlock(opts) {
|
|
195
|
+
const token = tokenRef("literal-only", opts.literalToken);
|
|
196
|
+
return [
|
|
197
|
+
"[mcp_servers.knowmind]",
|
|
198
|
+
`command = "${NPX}"`,
|
|
199
|
+
`args = [${NPX_ARGS.map((a) => `"${a}"`).join(", ")}]`,
|
|
200
|
+
"",
|
|
201
|
+
"[mcp_servers.knowmind.env]",
|
|
202
|
+
`KNOWMIND_TOKEN = "${token}"`,
|
|
203
|
+
`KNOWMIND_API_URL = "${opts.apiUrl}"`,
|
|
204
|
+
].join("\n");
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function mergeToml(text, opts) {
|
|
208
|
+
// Erst Zeilenenden vereinheitlichen: `.` matcht kein \r, mit CRLF-Dateien
|
|
209
|
+
// bräche die Abschnitts-Entfernung sonst mitten im Block ab (Test 04.08.).
|
|
210
|
+
const quelltext = (text || "").replace(/\r\n/g, "\n");
|
|
211
|
+
// Kopfzeile + alle Folgezeilen, die keinen neuen Abschnitt beginnen.
|
|
212
|
+
const alt = /(^|\n)\[mcp_servers\.knowmind(\.[^\]]+)?\](?:\n(?!\[).*)*/g;
|
|
213
|
+
let neu = quelltext.replace(alt, "$1");
|
|
214
|
+
neu = neu.replace(/\n{3,}/g, "\n\n").trimEnd();
|
|
215
|
+
return (neu ? neu + "\n\n" : "") + tomlBlock(opts) + "\n";
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function readJsonSafe(path) {
|
|
219
|
+
if (!existsSync(path)) return {};
|
|
220
|
+
try {
|
|
221
|
+
return JSON.parse(readFileSync(path, "utf-8"));
|
|
222
|
+
} catch {
|
|
223
|
+
return null; // signalisiert: vorhandene Datei ist kaputt → nicht blind überschreiben
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function writeJson(path, obj) {
|
|
228
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
229
|
+
writeFileSync(path, JSON.stringify(obj, null, 2) + "\n", "utf-8");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Merged knowmind in eine bestehende Config, ohne Fremd-Server zu verlieren.
|
|
233
|
+
function mergeInto(existing, ide, opts) {
|
|
234
|
+
const cfg = existing && typeof existing === "object" ? { ...existing } : {};
|
|
235
|
+
const entry = serverEntry(ide, opts);
|
|
236
|
+
if (ide.family === "servers") {
|
|
237
|
+
cfg.servers = { ...(cfg.servers || {}), knowmind: entry };
|
|
238
|
+
const inputs = Array.isArray(cfg.inputs) ? cfg.inputs.slice() : [];
|
|
239
|
+
if (!inputs.some((i) => i && i.id === "knowmind-token")) {
|
|
240
|
+
inputs.push({ type: "promptString", id: "knowmind-token", description: "KNOWMIND_TOKEN", password: true });
|
|
241
|
+
}
|
|
242
|
+
cfg.inputs = inputs;
|
|
243
|
+
} else {
|
|
244
|
+
cfg[ide.family] = { ...(cfg[ide.family] || {}), knowmind: entry };
|
|
245
|
+
}
|
|
246
|
+
return cfg;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function printClaudeCodeCommand(opts) {
|
|
250
|
+
const tokenArg = opts.literalToken ? opts.literalToken : "$KNOWMIND_TOKEN";
|
|
251
|
+
console.log("Claude Code (User-Scope, alle Projekte) — diesen Befehl ausführen:\n");
|
|
252
|
+
console.log(
|
|
253
|
+
` claude mcp add --scope user --transport stdio \\\n` +
|
|
254
|
+
` --env KNOWMIND_TOKEN=${tokenArg} \\\n` +
|
|
255
|
+
` --env KNOWMIND_API_URL=${opts.apiUrl} \\\n` +
|
|
256
|
+
` knowmind -- npx -y knowmind mcp\n`,
|
|
257
|
+
);
|
|
258
|
+
console.log("Für ein einzelnes Projekt stattdessen: knowmind install claude-code --project\n");
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// ── Hauptbefehl ─────────────────────────────────────────────────────────────
|
|
262
|
+
export function runInstall(opts) {
|
|
263
|
+
const { ideKey, project, dryRun, printOnly, apiUrl, literalToken } = opts;
|
|
264
|
+
|
|
265
|
+
if (!ideKey || ideKey === "list") {
|
|
266
|
+
console.log("knowmind install <ide> [--project] [--print] [--token <wert>] [--api <url>]\n");
|
|
267
|
+
console.log("Unterstützte IDEs:");
|
|
268
|
+
for (const [key, ide] of Object.entries(IDES)) console.log(` ${key.padEnd(16)} ${ide.label}`);
|
|
269
|
+
console.log(" all alle dateibasierten IDEs auf einmal");
|
|
270
|
+
console.log("\nStandard: globale Config, Token als Referenz (kein Klartext). --project schreibt projektlokal.");
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const targets = ideKey === "all" ? Object.keys(IDES) : [ideKey];
|
|
275
|
+
if (ideKey !== "all" && !IDES[ideKey]) {
|
|
276
|
+
throw new Error(`Unbekannte IDE: ${ideKey}. \`knowmind install list\` zeigt alle.`);
|
|
277
|
+
}
|
|
278
|
+
if (literalToken) {
|
|
279
|
+
console.warn("WARNUNG: --token schreibt das Token im KLARTEXT in die Config-Datei(en).\n");
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const cwd = process.cwd();
|
|
283
|
+
const entryOpts = { apiUrl: apiUrl || DEFAULT_API, literalToken };
|
|
284
|
+
|
|
285
|
+
for (const key of targets) {
|
|
286
|
+
const ide = IDES[key];
|
|
287
|
+
|
|
288
|
+
// Reine Snippet-/GUI-Fälle.
|
|
289
|
+
if (printOnly || (key === "jetbrains") || (key === "claude-code" && !project)) {
|
|
290
|
+
if (key === "claude-code" && !project) {
|
|
291
|
+
printClaudeCodeCommand(entryOpts);
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
console.log(`# ${ide.label} — Snippet (manuell einfügen):`);
|
|
295
|
+
console.log(ide.family === "toml" ? tomlBlock(entryOpts) : JSON.stringify(snippet(ide, entryOpts), null, 2));
|
|
296
|
+
console.log("");
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// TOML-Ziel (Codex): Text mergen statt JSON.
|
|
301
|
+
if (ide.family === "toml") {
|
|
302
|
+
const tomlPath = project ? (ide.projectPath && ide.projectPath(cwd)) : ide.globalPath();
|
|
303
|
+
if (!tomlPath) {
|
|
304
|
+
console.log(`# ${ide.label}: kein ${project ? "Projekt" : "globaler"}-Dateipfad — Snippet:`);
|
|
305
|
+
console.log(tomlBlock(entryOpts));
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
const alterText = existsSync(tomlPath) ? readFileSync(tomlPath, "utf-8") : "";
|
|
309
|
+
const neuerText = mergeToml(alterText, entryOpts);
|
|
310
|
+
if (dryRun) {
|
|
311
|
+
console.log(`# ${ide.label} — DRY RUN → ${tomlPath}`);
|
|
312
|
+
console.log(neuerText);
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
mkdirSync(dirname(tomlPath), { recursive: true });
|
|
316
|
+
writeFileSync(tomlPath, neuerText, "utf-8");
|
|
317
|
+
console.log(`✓ ${ide.label}: knowmind eingetragen in ${tomlPath}`);
|
|
318
|
+
if (!literalToken) {
|
|
319
|
+
console.log(` → Platzhalter gesetzt: KNOWMIND_TOKEN in ${tomlPath} durch dein Token ersetzen.`);
|
|
320
|
+
}
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const path = project ? (ide.projectPath && ide.projectPath(cwd)) : (ide.globalPath && ide.globalPath());
|
|
325
|
+
if (!path) {
|
|
326
|
+
// Kein Datei-Ziel für diesen Scope → Snippet zeigen.
|
|
327
|
+
console.log(`# ${ide.label}: kein ${project ? "Projekt" : "globaler"}-Dateipfad bekannt — Snippet:`);
|
|
328
|
+
console.log(JSON.stringify(snippet(ide, entryOpts), null, 2));
|
|
329
|
+
console.log("");
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const existing = readJsonSafe(path);
|
|
334
|
+
if (existing === null) {
|
|
335
|
+
console.error(`! ${ide.label}: ${path} ist kein gültiges JSON — übersprungen (nicht überschrieben).`);
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
const merged = mergeInto(existing, ide, entryOpts);
|
|
339
|
+
|
|
340
|
+
if (dryRun) {
|
|
341
|
+
console.log(`# ${ide.label} — DRY RUN → ${path}`);
|
|
342
|
+
console.log(JSON.stringify(merged, null, 2));
|
|
343
|
+
console.log("");
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
writeJson(path, merged);
|
|
348
|
+
console.log(`✓ ${ide.label}: knowmind eingetragen in ${path}`);
|
|
349
|
+
if (literalToken) {
|
|
350
|
+
console.log(` → ${ide.label} neu starten — fertig.`);
|
|
351
|
+
} else if (ide.secret === "env") {
|
|
352
|
+
console.log(` → setze KNOWMIND_TOKEN in deiner Umgebung (oder nutze --token).`);
|
|
353
|
+
} else if (ide.secret === "literal-only" && !literalToken) {
|
|
354
|
+
console.log(` → Platzhalter gesetzt: KNOWMIND_TOKEN in ${path} durch dein Token ersetzen.`);
|
|
355
|
+
} else if (ide.secret === "shell") {
|
|
356
|
+
console.log(` → ${path} nutzt \${KNOWMIND_TOKEN} aus der Umgebung (git-sicher).`);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// Wer ohne --token installiert, braucht noch einen Token aus einem (kostenlosen)
|
|
361
|
+
// Konto — genau hier scheitern Erstnutzer. Daher der klare Weg zum Abschluss.
|
|
362
|
+
if (!literalToken && !dryRun && !printOnly) {
|
|
363
|
+
const base = apiUrl || DEFAULT_API;
|
|
364
|
+
console.log(
|
|
365
|
+
"\nNoch kein Token? knowmind ist im kostenlosen Tarif voll nutzbar (bis 2.500 Erinnerungen):\n" +
|
|
366
|
+
` 1. Konto anlegen: ${base}/signin?mode=register\n` +
|
|
367
|
+
` 2. Token erzeugen: ${base}/dashboard/tokens\n` +
|
|
368
|
+
" 3. knowmind login --token kmt_... (oder KNOWMIND_TOKEN setzen)\n",
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
}
|