wlmaker 1.4.1 → 1.6.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.
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/mcp-install.ts
4
+ import * as fs from "fs";
5
+ import * as path from "path";
6
+ import * as os from "os";
7
+ import { fileURLToPath } from "url";
8
+ async function installMcpServer() {
9
+ const homeDir = os.homedir();
10
+ const isMac = process.platform === "darwin";
11
+ const isWin = process.platform === "win32";
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = path.dirname(__filename);
14
+ const cliPath = path.resolve(__dirname, "cli.mjs");
15
+ const wlmakerConfig = {
16
+ command: process.execPath,
17
+ args: [cliPath, "mcp"]
18
+ };
19
+ const configs = [
20
+ {
21
+ name: "Claude Desktop",
22
+ paths: isMac ? [path.join(homeDir, "Library/Application Support/Claude/claude_desktop_config.json")] : isWin ? [path.join(homeDir, "AppData/Roaming/Claude/claude_desktop_config.json")] : []
23
+ },
24
+ {
25
+ name: "Claude Code",
26
+ paths: [path.join(homeDir, ".claude.json")]
27
+ },
28
+ {
29
+ name: "Gemini CLI",
30
+ paths: [path.join(homeDir, ".gemini/settings.json")]
31
+ },
32
+ {
33
+ name: "Cursor",
34
+ paths: [path.join(homeDir, ".cursor/mcp.json")]
35
+ },
36
+ {
37
+ name: "Cline / RooCode (VSCode)",
38
+ paths: isMac ? [
39
+ path.join(homeDir, "Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json"),
40
+ path.join(homeDir, "Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json")
41
+ ] : isWin ? [
42
+ path.join(homeDir, "AppData/Roaming/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json"),
43
+ path.join(homeDir, "AppData/Roaming/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json")
44
+ ] : [
45
+ path.join(homeDir, ".config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json"),
46
+ path.join(homeDir, ".config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json")
47
+ ]
48
+ }
49
+ ];
50
+ let anyInstalled = false;
51
+ for (const client of configs) {
52
+ for (const configPath of client.paths) {
53
+ if (fs.existsSync(configPath)) {
54
+ try {
55
+ const content = fs.readFileSync(configPath, "utf8");
56
+ const json = JSON.parse(content);
57
+ json.mcpServers = json.mcpServers || {};
58
+ json.mcpServers["wlmaker-cli"] = wlmakerConfig;
59
+ fs.writeFileSync(configPath, JSON.stringify(json, null, 2));
60
+ console.log(`\u2705 Successfully added wlmaker-cli to ${client.name} configuration.`);
61
+ anyInstalled = true;
62
+ } catch (error) {
63
+ console.error(`\u274C Failed to update ${client.name} configuration at ${configPath}:`, error);
64
+ }
65
+ }
66
+ }
67
+ }
68
+ if (!anyInstalled) {
69
+ console.log("\u26A0\uFE0F No supported MCP clients (Claude Desktop, Cursor, Cline) found to auto-configure.");
70
+ console.log("You can manually add the following configuration to your client:");
71
+ console.log(JSON.stringify({
72
+ mcpServers: {
73
+ "wlmaker-cli": wlmakerConfig
74
+ }
75
+ }, null, 2));
76
+ }
77
+ }
78
+
79
+ export {
80
+ installMcpServer
81
+ };