@structured-world/gitlab-mcp 6.28.0 → 6.29.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/dist/src/cli/docker/docker-command.d.ts +15 -0
- package/dist/src/cli/docker/docker-command.js +411 -0
- package/dist/src/cli/docker/docker-command.js.map +1 -0
- package/dist/src/cli/docker/docker-utils.d.ts +24 -0
- package/dist/src/cli/docker/docker-utils.js +356 -0
- package/dist/src/cli/docker/docker-utils.js.map +1 -0
- package/dist/src/cli/docker/index.d.ts +3 -0
- package/dist/src/cli/docker/index.js +23 -0
- package/dist/src/cli/docker/index.js.map +1 -0
- package/dist/src/cli/docker/types.d.ts +71 -0
- package/dist/src/cli/docker/types.js +21 -0
- package/dist/src/cli/docker/types.js.map +1 -0
- package/dist/src/cli/install/backup.d.ts +4 -0
- package/dist/src/cli/install/backup.js +63 -0
- package/dist/src/cli/install/backup.js.map +1 -0
- package/dist/src/cli/install/detector.d.ts +9 -0
- package/dist/src/cli/install/detector.js +126 -0
- package/dist/src/cli/install/detector.js.map +1 -0
- package/dist/src/cli/install/index.d.ts +5 -0
- package/dist/src/cli/install/index.js +27 -0
- package/dist/src/cli/install/index.js.map +1 -0
- package/dist/src/cli/install/install-command.d.ts +19 -0
- package/dist/src/cli/install/install-command.js +288 -0
- package/dist/src/cli/install/install-command.js.map +1 -0
- package/dist/src/cli/install/installers.d.ts +12 -0
- package/dist/src/cli/install/installers.js +439 -0
- package/dist/src/cli/install/installers.js.map +1 -0
- package/dist/src/cli/install/types.d.ts +52 -0
- package/dist/src/cli/install/types.js +87 -0
- package/dist/src/cli/install/types.js.map +1 -0
- package/dist/src/cli/utils/index.d.ts +1 -0
- package/dist/src/cli/utils/index.js +6 -0
- package/dist/src/cli/utils/index.js.map +1 -0
- package/dist/src/cli/utils/path-utils.d.ts +1 -0
- package/dist/src/cli/utils/path-utils.js +18 -0
- package/dist/src/cli/utils/path-utils.js.map +1 -0
- package/dist/src/cli-utils.d.ts +4 -0
- package/dist/src/cli-utils.js +18 -3
- package/dist/src/cli-utils.js.map +1 -1
- package/dist/src/main.js +12 -0
- package/dist/src/main.js.map +1 -1
- package/dist/structured-world-gitlab-mcp-6.29.0.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/structured-world-gitlab-mcp-6.28.0.tgz +0 -0
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.installClaudeDesktop = installClaudeDesktop;
|
|
4
|
+
exports.installClaudeCode = installClaudeCode;
|
|
5
|
+
exports.installCursor = installCursor;
|
|
6
|
+
exports.installVSCodeCopilot = installVSCodeCopilot;
|
|
7
|
+
exports.installWindsurf = installWindsurf;
|
|
8
|
+
exports.installCline = installCline;
|
|
9
|
+
exports.installRooCode = installRooCode;
|
|
10
|
+
exports.installToClient = installToClient;
|
|
11
|
+
exports.installToClients = installToClients;
|
|
12
|
+
exports.generateConfigPreview = generateConfigPreview;
|
|
13
|
+
const fs_1 = require("fs");
|
|
14
|
+
const path_1 = require("path");
|
|
15
|
+
const child_process_1 = require("child_process");
|
|
16
|
+
const types_1 = require("./types");
|
|
17
|
+
const detector_1 = require("./detector");
|
|
18
|
+
const backup_1 = require("./backup");
|
|
19
|
+
function buildServerEntry(serverConfig) {
|
|
20
|
+
const entry = {
|
|
21
|
+
command: serverConfig.command,
|
|
22
|
+
args: serverConfig.args,
|
|
23
|
+
};
|
|
24
|
+
if (Object.keys(serverConfig.env).length > 0) {
|
|
25
|
+
entry.env = serverConfig.env;
|
|
26
|
+
}
|
|
27
|
+
return entry;
|
|
28
|
+
}
|
|
29
|
+
function readJsonConfig(configPath) {
|
|
30
|
+
try {
|
|
31
|
+
if ((0, fs_1.existsSync)(configPath)) {
|
|
32
|
+
const content = (0, fs_1.readFileSync)(configPath, "utf8");
|
|
33
|
+
return JSON.parse(content);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
}
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
function writeJsonConfig(configPath, config) {
|
|
41
|
+
const dir = (0, path_1.dirname)(configPath);
|
|
42
|
+
if (!(0, fs_1.existsSync)(dir)) {
|
|
43
|
+
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
44
|
+
}
|
|
45
|
+
(0, fs_1.writeFileSync)(configPath, JSON.stringify(config, null, 2) + "\n", "utf8");
|
|
46
|
+
}
|
|
47
|
+
function installClaudeDesktop(serverConfig, force = false) {
|
|
48
|
+
const client = "claude-desktop";
|
|
49
|
+
const configPath = (0, detector_1.getConfigPath)(client);
|
|
50
|
+
if (!configPath) {
|
|
51
|
+
return {
|
|
52
|
+
client,
|
|
53
|
+
success: false,
|
|
54
|
+
error: "Claude Desktop config path not available for this platform",
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const expandedPath = (0, detector_1.expandPath)(configPath);
|
|
58
|
+
try {
|
|
59
|
+
let backupPath;
|
|
60
|
+
if ((0, fs_1.existsSync)(expandedPath)) {
|
|
61
|
+
const backupResult = (0, backup_1.createBackup)({ configPath: expandedPath });
|
|
62
|
+
if (backupResult.created) {
|
|
63
|
+
backupPath = backupResult.backupPath;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const config = readJsonConfig(expandedPath);
|
|
67
|
+
const wasAlreadyConfigured = config.mcpServers?.gitlab !== undefined || config.mcpServers?.["gitlab-mcp"] !== undefined;
|
|
68
|
+
if (wasAlreadyConfigured && !force) {
|
|
69
|
+
return {
|
|
70
|
+
client,
|
|
71
|
+
success: false,
|
|
72
|
+
error: "gitlab-mcp is already configured. Use --force to overwrite.",
|
|
73
|
+
wasAlreadyConfigured: true,
|
|
74
|
+
configPath: expandedPath,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
config.mcpServers ??= {};
|
|
78
|
+
config.mcpServers.gitlab = buildServerEntry(serverConfig);
|
|
79
|
+
delete config.mcpServers["gitlab-mcp"];
|
|
80
|
+
writeJsonConfig(expandedPath, config);
|
|
81
|
+
return {
|
|
82
|
+
client,
|
|
83
|
+
success: true,
|
|
84
|
+
backupPath,
|
|
85
|
+
configPath: expandedPath,
|
|
86
|
+
wasAlreadyConfigured,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
return {
|
|
91
|
+
client,
|
|
92
|
+
success: false,
|
|
93
|
+
error: error instanceof Error ? error.message : String(error),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function installClaudeCode(serverConfig, force = false) {
|
|
98
|
+
const client = "claude-code";
|
|
99
|
+
const metadata = types_1.CLIENT_METADATA[client];
|
|
100
|
+
if (!metadata.cliCommand) {
|
|
101
|
+
return {
|
|
102
|
+
client,
|
|
103
|
+
success: false,
|
|
104
|
+
error: "Claude Code CLI command not configured",
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
const args = ["mcp", "add", "gitlab", serverConfig.command, ...serverConfig.args];
|
|
109
|
+
for (const [key, value] of Object.entries(serverConfig.env)) {
|
|
110
|
+
args.push("--env", `${key}=${value}`);
|
|
111
|
+
}
|
|
112
|
+
if (force) {
|
|
113
|
+
const listResult = (0, child_process_1.spawnSync)(metadata.cliCommand, ["mcp", "list"], {
|
|
114
|
+
stdio: "pipe",
|
|
115
|
+
encoding: "utf8",
|
|
116
|
+
});
|
|
117
|
+
if (listResult.status === 0 && listResult.stdout.includes("gitlab")) {
|
|
118
|
+
const removeResult = (0, child_process_1.spawnSync)(metadata.cliCommand, ["mcp", "remove", "gitlab"], {
|
|
119
|
+
stdio: "pipe",
|
|
120
|
+
encoding: "utf8",
|
|
121
|
+
});
|
|
122
|
+
if (removeResult.status !== 0) {
|
|
123
|
+
return {
|
|
124
|
+
client,
|
|
125
|
+
success: false,
|
|
126
|
+
error: `Failed to remove existing gitlab config: ${removeResult.stderr || removeResult.stdout || "Unknown error"}`,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const result = (0, child_process_1.spawnSync)(metadata.cliCommand, args, {
|
|
132
|
+
stdio: "pipe",
|
|
133
|
+
encoding: "utf8",
|
|
134
|
+
});
|
|
135
|
+
if (result.status === 0) {
|
|
136
|
+
return {
|
|
137
|
+
client,
|
|
138
|
+
success: true,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
const errorOutput = result.stderr || result.stdout || "Unknown error";
|
|
143
|
+
if (errorOutput.includes("already exists") || errorOutput.includes("already configured")) {
|
|
144
|
+
return {
|
|
145
|
+
client,
|
|
146
|
+
success: false,
|
|
147
|
+
error: "gitlab-mcp is already configured. Use --force to overwrite.",
|
|
148
|
+
wasAlreadyConfigured: true,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
client,
|
|
153
|
+
success: false,
|
|
154
|
+
error: errorOutput,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
return {
|
|
160
|
+
client,
|
|
161
|
+
success: false,
|
|
162
|
+
error: error instanceof Error ? error.message : String(error),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function installCursor(serverConfig, force = false) {
|
|
167
|
+
const client = "cursor";
|
|
168
|
+
const configPath = (0, detector_1.getConfigPath)(client);
|
|
169
|
+
if (!configPath) {
|
|
170
|
+
return {
|
|
171
|
+
client,
|
|
172
|
+
success: false,
|
|
173
|
+
error: "Cursor config path not available for this platform",
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
const expandedPath = (0, detector_1.expandPath)(configPath);
|
|
177
|
+
try {
|
|
178
|
+
let backupPath;
|
|
179
|
+
if ((0, fs_1.existsSync)(expandedPath)) {
|
|
180
|
+
const backupResult = (0, backup_1.createBackup)({ configPath: expandedPath });
|
|
181
|
+
if (backupResult.created) {
|
|
182
|
+
backupPath = backupResult.backupPath;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const config = readJsonConfig(expandedPath);
|
|
186
|
+
const wasAlreadyConfigured = config.mcpServers?.gitlab !== undefined || config.mcpServers?.["gitlab-mcp"] !== undefined;
|
|
187
|
+
if (wasAlreadyConfigured && !force) {
|
|
188
|
+
return {
|
|
189
|
+
client,
|
|
190
|
+
success: false,
|
|
191
|
+
error: "gitlab-mcp is already configured. Use --force to overwrite.",
|
|
192
|
+
wasAlreadyConfigured: true,
|
|
193
|
+
configPath: expandedPath,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
config.mcpServers ??= {};
|
|
197
|
+
config.mcpServers.gitlab = buildServerEntry(serverConfig);
|
|
198
|
+
delete config.mcpServers["gitlab-mcp"];
|
|
199
|
+
writeJsonConfig(expandedPath, config);
|
|
200
|
+
return {
|
|
201
|
+
client,
|
|
202
|
+
success: true,
|
|
203
|
+
backupPath,
|
|
204
|
+
configPath: expandedPath,
|
|
205
|
+
wasAlreadyConfigured,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
return {
|
|
210
|
+
client,
|
|
211
|
+
success: false,
|
|
212
|
+
error: error instanceof Error ? error.message : String(error),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
function installVSCodeCopilot(serverConfig, force = false) {
|
|
217
|
+
const client = "vscode-copilot";
|
|
218
|
+
const configPath = (0, detector_1.getConfigPath)(client);
|
|
219
|
+
if (!configPath) {
|
|
220
|
+
return {
|
|
221
|
+
client,
|
|
222
|
+
success: false,
|
|
223
|
+
error: "VS Code config path not available",
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const expandedPath = configPath;
|
|
227
|
+
try {
|
|
228
|
+
let backupPath;
|
|
229
|
+
if ((0, fs_1.existsSync)(expandedPath)) {
|
|
230
|
+
const backupResult = (0, backup_1.createBackup)({ configPath: expandedPath });
|
|
231
|
+
if (backupResult.created) {
|
|
232
|
+
backupPath = backupResult.backupPath;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const config = readJsonConfig(expandedPath);
|
|
236
|
+
const wasAlreadyConfigured = config.servers?.gitlab !== undefined || config.servers?.["gitlab-mcp"] !== undefined;
|
|
237
|
+
if (wasAlreadyConfigured && !force) {
|
|
238
|
+
return {
|
|
239
|
+
client,
|
|
240
|
+
success: false,
|
|
241
|
+
error: "gitlab-mcp is already configured. Use --force to overwrite.",
|
|
242
|
+
wasAlreadyConfigured: true,
|
|
243
|
+
configPath: expandedPath,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
config.servers ??= {};
|
|
247
|
+
config.servers.gitlab = buildServerEntry(serverConfig);
|
|
248
|
+
delete config.servers["gitlab-mcp"];
|
|
249
|
+
writeJsonConfig(expandedPath, config);
|
|
250
|
+
return {
|
|
251
|
+
client,
|
|
252
|
+
success: true,
|
|
253
|
+
backupPath,
|
|
254
|
+
configPath: expandedPath,
|
|
255
|
+
wasAlreadyConfigured,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
return {
|
|
260
|
+
client,
|
|
261
|
+
success: false,
|
|
262
|
+
error: error instanceof Error ? error.message : String(error),
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function installWindsurf(serverConfig, force = false) {
|
|
267
|
+
const client = "windsurf";
|
|
268
|
+
const configPath = (0, detector_1.getConfigPath)(client);
|
|
269
|
+
if (!configPath) {
|
|
270
|
+
return {
|
|
271
|
+
client,
|
|
272
|
+
success: false,
|
|
273
|
+
error: "Windsurf config path not available for this platform",
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
const expandedPath = (0, detector_1.expandPath)(configPath);
|
|
277
|
+
try {
|
|
278
|
+
let backupPath;
|
|
279
|
+
if ((0, fs_1.existsSync)(expandedPath)) {
|
|
280
|
+
const backupResult = (0, backup_1.createBackup)({ configPath: expandedPath });
|
|
281
|
+
if (backupResult.created) {
|
|
282
|
+
backupPath = backupResult.backupPath;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const config = readJsonConfig(expandedPath);
|
|
286
|
+
const wasAlreadyConfigured = config.mcpServers?.gitlab !== undefined || config.mcpServers?.["gitlab-mcp"] !== undefined;
|
|
287
|
+
if (wasAlreadyConfigured && !force) {
|
|
288
|
+
return {
|
|
289
|
+
client,
|
|
290
|
+
success: false,
|
|
291
|
+
error: "gitlab-mcp is already configured. Use --force to overwrite.",
|
|
292
|
+
wasAlreadyConfigured: true,
|
|
293
|
+
configPath: expandedPath,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
config.mcpServers ??= {};
|
|
297
|
+
config.mcpServers.gitlab = buildServerEntry(serverConfig);
|
|
298
|
+
delete config.mcpServers["gitlab-mcp"];
|
|
299
|
+
writeJsonConfig(expandedPath, config);
|
|
300
|
+
return {
|
|
301
|
+
client,
|
|
302
|
+
success: true,
|
|
303
|
+
backupPath,
|
|
304
|
+
configPath: expandedPath,
|
|
305
|
+
wasAlreadyConfigured,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
catch (error) {
|
|
309
|
+
return {
|
|
310
|
+
client,
|
|
311
|
+
success: false,
|
|
312
|
+
error: error instanceof Error ? error.message : String(error),
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
function installCline(serverConfig, force = false) {
|
|
317
|
+
const client = "cline";
|
|
318
|
+
const configPath = (0, detector_1.getConfigPath)(client);
|
|
319
|
+
if (!configPath) {
|
|
320
|
+
return {
|
|
321
|
+
client,
|
|
322
|
+
success: false,
|
|
323
|
+
error: "Cline config path not available for this platform",
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
const expandedPath = (0, detector_1.expandPath)(configPath);
|
|
327
|
+
try {
|
|
328
|
+
let backupPath;
|
|
329
|
+
if ((0, fs_1.existsSync)(expandedPath)) {
|
|
330
|
+
const backupResult = (0, backup_1.createBackup)({ configPath: expandedPath });
|
|
331
|
+
if (backupResult.created) {
|
|
332
|
+
backupPath = backupResult.backupPath;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const config = readJsonConfig(expandedPath);
|
|
336
|
+
const wasAlreadyConfigured = config.mcpServers?.gitlab !== undefined || config.mcpServers?.["gitlab-mcp"] !== undefined;
|
|
337
|
+
if (wasAlreadyConfigured && !force) {
|
|
338
|
+
return {
|
|
339
|
+
client,
|
|
340
|
+
success: false,
|
|
341
|
+
error: "gitlab-mcp is already configured. Use --force to overwrite.",
|
|
342
|
+
wasAlreadyConfigured: true,
|
|
343
|
+
configPath: expandedPath,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
config.mcpServers ??= {};
|
|
347
|
+
config.mcpServers.gitlab = buildServerEntry(serverConfig);
|
|
348
|
+
delete config.mcpServers["gitlab-mcp"];
|
|
349
|
+
writeJsonConfig(expandedPath, config);
|
|
350
|
+
return {
|
|
351
|
+
client,
|
|
352
|
+
success: true,
|
|
353
|
+
backupPath,
|
|
354
|
+
configPath: expandedPath,
|
|
355
|
+
wasAlreadyConfigured,
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
catch (error) {
|
|
359
|
+
return {
|
|
360
|
+
client,
|
|
361
|
+
success: false,
|
|
362
|
+
error: error instanceof Error ? error.message : String(error),
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function installRooCode(serverConfig, force = false) {
|
|
367
|
+
const client = "roo-code";
|
|
368
|
+
const configPath = (0, detector_1.getConfigPath)(client);
|
|
369
|
+
if (!configPath) {
|
|
370
|
+
return {
|
|
371
|
+
client,
|
|
372
|
+
success: false,
|
|
373
|
+
error: "Roo Code config path not available for this platform",
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
const expandedPath = (0, detector_1.expandPath)(configPath);
|
|
377
|
+
try {
|
|
378
|
+
let backupPath;
|
|
379
|
+
if ((0, fs_1.existsSync)(expandedPath)) {
|
|
380
|
+
const backupResult = (0, backup_1.createBackup)({ configPath: expandedPath });
|
|
381
|
+
if (backupResult.created) {
|
|
382
|
+
backupPath = backupResult.backupPath;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
const config = readJsonConfig(expandedPath);
|
|
386
|
+
const wasAlreadyConfigured = config.mcpServers?.gitlab !== undefined || config.mcpServers?.["gitlab-mcp"] !== undefined;
|
|
387
|
+
if (wasAlreadyConfigured && !force) {
|
|
388
|
+
return {
|
|
389
|
+
client,
|
|
390
|
+
success: false,
|
|
391
|
+
error: "gitlab-mcp is already configured. Use --force to overwrite.",
|
|
392
|
+
wasAlreadyConfigured: true,
|
|
393
|
+
configPath: expandedPath,
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
config.mcpServers ??= {};
|
|
397
|
+
config.mcpServers.gitlab = buildServerEntry(serverConfig);
|
|
398
|
+
delete config.mcpServers["gitlab-mcp"];
|
|
399
|
+
writeJsonConfig(expandedPath, config);
|
|
400
|
+
return {
|
|
401
|
+
client,
|
|
402
|
+
success: true,
|
|
403
|
+
backupPath,
|
|
404
|
+
configPath: expandedPath,
|
|
405
|
+
wasAlreadyConfigured,
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
catch (error) {
|
|
409
|
+
return {
|
|
410
|
+
client,
|
|
411
|
+
success: false,
|
|
412
|
+
error: error instanceof Error ? error.message : String(error),
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
const INSTALLERS = {
|
|
417
|
+
"claude-desktop": installClaudeDesktop,
|
|
418
|
+
"claude-code": installClaudeCode,
|
|
419
|
+
cursor: installCursor,
|
|
420
|
+
"vscode-copilot": installVSCodeCopilot,
|
|
421
|
+
windsurf: installWindsurf,
|
|
422
|
+
cline: installCline,
|
|
423
|
+
"roo-code": installRooCode,
|
|
424
|
+
};
|
|
425
|
+
function installToClient(client, serverConfig, force = false) {
|
|
426
|
+
const installer = INSTALLERS[client];
|
|
427
|
+
return installer(serverConfig, force);
|
|
428
|
+
}
|
|
429
|
+
function installToClients(clients, serverConfig, force = false) {
|
|
430
|
+
return clients.map(client => installToClient(client, serverConfig, force));
|
|
431
|
+
}
|
|
432
|
+
function generateConfigPreview(client, serverConfig) {
|
|
433
|
+
const entry = buildServerEntry(serverConfig);
|
|
434
|
+
if (client === "vscode-copilot") {
|
|
435
|
+
return JSON.stringify({ servers: { gitlab: entry } }, null, 2);
|
|
436
|
+
}
|
|
437
|
+
return JSON.stringify({ mcpServers: { gitlab: entry } }, null, 2);
|
|
438
|
+
}
|
|
439
|
+
//# sourceMappingURL=installers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installers.js","sourceRoot":"","sources":["../../../../src/cli/install/installers.ts"],"names":[],"mappings":";;AA4EA,oDAkEC;AAKD,8CAmFC;AAKD,sCAkEC;AAKD,oDAmEC;AAKD,0CAkEC;AAKD,oCA+DC;AAKD,wCAkEC;AAqBD,0CAOC;AAKD,4CAMC;AAKD,sDAYC;AA1nBD,2BAAwE;AACxE,+BAA+B;AAC/B,iDAA0C;AAC1C,mCAA4E;AAE5E,yCAAuD;AACvD,qCAAwC;AAuBxC,SAAS,gBAAgB,CAAC,YAA6B;IACrD,MAAM,KAAK,GAAmB;QAC5B,OAAO,EAAE,YAAY,CAAC,OAAO;QAC7B,IAAI,EAAE,YAAY,CAAC,IAAI;KACxB,CAAC;IAEF,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7C,KAAK,CAAC,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC;IAC/B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAKD,SAAS,cAAc,CAAC,UAAkB;IACxC,IAAI,CAAC;QACH,IAAI,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAA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E,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { McpClient, McpServerConfig } from "../init/types";
|
|
2
|
+
export type InstallableClient = Exclude<McpClient, "generic">;
|
|
3
|
+
export interface ClientDetectionResult {
|
|
4
|
+
client: InstallableClient;
|
|
5
|
+
detected: boolean;
|
|
6
|
+
configPath?: string;
|
|
7
|
+
configExists?: boolean;
|
|
8
|
+
alreadyConfigured?: boolean;
|
|
9
|
+
method: "config-file" | "cli-command" | "app-bundle";
|
|
10
|
+
}
|
|
11
|
+
export interface InstallOptions {
|
|
12
|
+
clients?: InstallableClient[];
|
|
13
|
+
all?: boolean;
|
|
14
|
+
showOnly?: boolean;
|
|
15
|
+
force?: boolean;
|
|
16
|
+
serverConfig: McpServerConfig;
|
|
17
|
+
instanceUrl: string;
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
presetName?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface InstallResult {
|
|
22
|
+
client: InstallableClient;
|
|
23
|
+
success: boolean;
|
|
24
|
+
error?: string;
|
|
25
|
+
backupPath?: string;
|
|
26
|
+
configPath?: string;
|
|
27
|
+
wasAlreadyConfigured?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface BackupOptions {
|
|
30
|
+
configPath: string;
|
|
31
|
+
backupDir?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface BackupResult {
|
|
34
|
+
created: boolean;
|
|
35
|
+
backupPath?: string;
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ClientConfigPaths {
|
|
39
|
+
darwin?: string;
|
|
40
|
+
win32?: string;
|
|
41
|
+
linux?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ClientMetadata {
|
|
44
|
+
name: string;
|
|
45
|
+
configPaths: ClientConfigPaths;
|
|
46
|
+
supportsCliInstall: boolean;
|
|
47
|
+
cliCommand?: string;
|
|
48
|
+
detectionMethod: "config-file" | "cli-command" | "app-bundle";
|
|
49
|
+
appBundleId?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const CLIENT_METADATA: Record<InstallableClient, ClientMetadata>;
|
|
52
|
+
export declare const INSTALLABLE_CLIENTS: InstallableClient[];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INSTALLABLE_CLIENTS = exports.CLIENT_METADATA = void 0;
|
|
4
|
+
exports.CLIENT_METADATA = {
|
|
5
|
+
"claude-desktop": {
|
|
6
|
+
name: "Claude Desktop",
|
|
7
|
+
configPaths: {
|
|
8
|
+
darwin: "~/Library/Application Support/Claude/claude_desktop_config.json",
|
|
9
|
+
win32: "%APPDATA%/Claude/claude_desktop_config.json",
|
|
10
|
+
linux: "~/.config/claude/claude_desktop_config.json",
|
|
11
|
+
},
|
|
12
|
+
supportsCliInstall: false,
|
|
13
|
+
detectionMethod: "app-bundle",
|
|
14
|
+
appBundleId: "com.anthropic.claudefordesktop",
|
|
15
|
+
},
|
|
16
|
+
"claude-code": {
|
|
17
|
+
name: "Claude Code",
|
|
18
|
+
configPaths: {
|
|
19
|
+
darwin: "~/.claude.json",
|
|
20
|
+
win32: "%USERPROFILE%/.claude.json",
|
|
21
|
+
linux: "~/.claude.json",
|
|
22
|
+
},
|
|
23
|
+
supportsCliInstall: true,
|
|
24
|
+
cliCommand: "claude",
|
|
25
|
+
detectionMethod: "cli-command",
|
|
26
|
+
},
|
|
27
|
+
cursor: {
|
|
28
|
+
name: "Cursor",
|
|
29
|
+
configPaths: {
|
|
30
|
+
darwin: "~/.cursor/mcp.json",
|
|
31
|
+
win32: "%USERPROFILE%/.cursor/mcp.json",
|
|
32
|
+
linux: "~/.cursor/mcp.json",
|
|
33
|
+
},
|
|
34
|
+
supportsCliInstall: false,
|
|
35
|
+
detectionMethod: "config-file",
|
|
36
|
+
},
|
|
37
|
+
"vscode-copilot": {
|
|
38
|
+
name: "VS Code (GitHub Copilot)",
|
|
39
|
+
configPaths: {
|
|
40
|
+
darwin: ".vscode/mcp.json",
|
|
41
|
+
win32: ".vscode/mcp.json",
|
|
42
|
+
linux: ".vscode/mcp.json",
|
|
43
|
+
},
|
|
44
|
+
supportsCliInstall: false,
|
|
45
|
+
detectionMethod: "config-file",
|
|
46
|
+
},
|
|
47
|
+
windsurf: {
|
|
48
|
+
name: "Windsurf",
|
|
49
|
+
configPaths: {
|
|
50
|
+
darwin: "~/.codeium/windsurf/mcp_config.json",
|
|
51
|
+
win32: "%USERPROFILE%/.codeium/windsurf/mcp_config.json",
|
|
52
|
+
linux: "~/.codeium/windsurf/mcp_config.json",
|
|
53
|
+
},
|
|
54
|
+
supportsCliInstall: false,
|
|
55
|
+
detectionMethod: "config-file",
|
|
56
|
+
},
|
|
57
|
+
cline: {
|
|
58
|
+
name: "Cline",
|
|
59
|
+
configPaths: {
|
|
60
|
+
darwin: "~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
|
|
61
|
+
win32: "%APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
|
|
62
|
+
linux: "~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
|
|
63
|
+
},
|
|
64
|
+
supportsCliInstall: false,
|
|
65
|
+
detectionMethod: "config-file",
|
|
66
|
+
},
|
|
67
|
+
"roo-code": {
|
|
68
|
+
name: "Roo Code",
|
|
69
|
+
configPaths: {
|
|
70
|
+
darwin: "~/.roo/mcp.json",
|
|
71
|
+
win32: "%USERPROFILE%/.roo/mcp.json",
|
|
72
|
+
linux: "~/.roo/mcp.json",
|
|
73
|
+
},
|
|
74
|
+
supportsCliInstall: false,
|
|
75
|
+
detectionMethod: "config-file",
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
exports.INSTALLABLE_CLIENTS = [
|
|
79
|
+
"claude-desktop",
|
|
80
|
+
"claude-code",
|
|
81
|
+
"cursor",
|
|
82
|
+
"vscode-copilot",
|
|
83
|
+
"windsurf",
|
|
84
|
+
"cline",
|
|
85
|
+
"roo-code",
|
|
86
|
+
];
|
|
87
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cli/install/types.ts"],"names":[],"mappings":";;;AAyHa,QAAA,eAAe,GAA8C;IACxE,gBAAgB,EAAE;QAChB,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE;YACX,MAAM,EAAE,iEAAiE;YACzE,KAAK,EAAE,6CAA6C;YACpD,KAAK,EAAE,6CAA6C;SACrD;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,YAAY;QAC7B,WAAW,EAAE,gCAAgC;KAC9C;IACD,aAAa,EAAE;QACb,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE;YACX,MAAM,EAAE,gBAAgB;YACxB,KAAK,EAAE,4BAA4B;YACnC,KAAK,EAAE,gBAAgB;SACxB;QACD,kBAAkB,EAAE,IAAI;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,aAAa;KAC/B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACX,MAAM,EAAE,oBAAoB;YAC5B,KAAK,EAAE,gCAAgC;YACvC,KAAK,EAAE,oBAAoB;SAC5B;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE;YACX,MAAM,EAAE,kBAAkB;YAC1B,KAAK,EAAE,kBAAkB;YACzB,KAAK,EAAE,kBAAkB;SAC1B;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE;YACX,MAAM,EAAE,qCAAqC;YAC7C,KAAK,EAAE,iDAAiD;YACxD,KAAK,EAAE,qCAAqC;SAC7C;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,WAAW,EAAE;YACX,MAAM,EACJ,+GAA+G;YACjH,KAAK,EACH,2FAA2F;YAC7F,KAAK,EACH,2FAA2F;SAC9F;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;IACD,UAAU,EAAE;QACV,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE;YACX,MAAM,EAAE,iBAAiB;YACzB,KAAK,EAAE,6BAA6B;YACpC,KAAK,EAAE,iBAAiB;SACzB;QACD,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,aAAa;KAC/B;CACF,CAAC;AAKW,QAAA,mBAAmB,GAAwB;IACtD,gBAAgB;IAChB,aAAa;IACb,QAAQ;IACR,gBAAgB;IAChB,UAAU;IACV,OAAO;IACP,UAAU;CACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { expandPath } from "./path-utils.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expandPath = void 0;
|
|
4
|
+
var path_utils_js_1 = require("./path-utils.js");
|
|
5
|
+
Object.defineProperty(exports, "expandPath", { enumerable: true, get: function () { return path_utils_js_1.expandPath; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/utils/index.ts"],"names":[],"mappings":";;;AAIA,iDAA6C;AAApC,2GAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function expandPath(path: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expandPath = expandPath;
|
|
4
|
+
const os_1 = require("os");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
function expandPath(path) {
|
|
7
|
+
let expanded = path;
|
|
8
|
+
if (expanded.startsWith("~/")) {
|
|
9
|
+
expanded = (0, path_1.join)((0, os_1.homedir)(), expanded.slice(2));
|
|
10
|
+
}
|
|
11
|
+
if (process.platform === "win32") {
|
|
12
|
+
expanded = expanded.replace(/%([^%]+)%/g, (_, varName) => {
|
|
13
|
+
return process.env[varName] ?? "";
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return expanded;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=path-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../../../../src/cli/utils/path-utils.ts"],"names":[],"mappings":";;AAUA,gCAgBC;AAtBD,2BAA6B;AAC7B,+BAA4B;AAK5B,SAAgB,UAAU,CAAC,IAAY;IACrC,IAAI,QAAQ,GAAG,IAAI,CAAC;IAGpB,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,QAAQ,GAAG,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;IAGD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,OAAe,EAAE,EAAE;YAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/src/cli-utils.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export interface CliArgs {
|
|
|
8
8
|
dryRun: boolean;
|
|
9
9
|
remoteName?: string;
|
|
10
10
|
init: boolean;
|
|
11
|
+
install: boolean;
|
|
12
|
+
installArgs: string[];
|
|
13
|
+
docker: boolean;
|
|
14
|
+
dockerArgs: string[];
|
|
11
15
|
}
|
|
12
16
|
export declare function parseCliArgs(argv?: string[]): CliArgs;
|
|
13
17
|
export declare function displayProjectConfig(config: ProjectConfig | null, output?: (msg: string) => void): void;
|