@insforge/install 0.0.16 → 0.0.18

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -32
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -56,39 +56,17 @@ import {
56
56
 
57
57
  // Handle different config structures for different clients
58
58
  if (argv.client === "claude-code") {
59
- // Use Claude CLI for Claude Code
60
- const envArgs = Object.entries(envVars)
61
- .filter(([key]) => key !== 'CLIENT_NAME')
62
- .map(([key, value]) => {
63
- // Properly quote values for cross-platform compatibility
64
- const quotedValue = value.includes(' ') ? `"${value}"` : value;
65
- return `-e ${key}=${quotedValue}`;
66
- })
67
- .join(' ');
68
-
69
- try {
70
- // First try to remove existing insforge MCP if it exists
71
- try {
72
- execSync(`claude mcp remove ${name}`, {
73
- stdio: 'pipe',
74
- shell: true
75
- });
76
- logger.info("Removed existing insforge MCP installation.");
77
- } catch (removeError) {
78
- // It's okay if remove fails - the MCP might not exist
79
- logger.info("No existing insforge MCP found");
59
+ // Directly write to config file for Claude Code
60
+ if (!config.mcpServers) config.mcpServers = {};
61
+ config.mcpServers[name] = {
62
+ command: "npx",
63
+ args: ["-y", "@insforge/mcp@latest"],
64
+ env: {
65
+ API_KEY: envVars.API_KEY,
66
+ API_BASE_URL: envVars.API_BASE_URL
80
67
  }
81
-
82
- // Now add the MCP server
83
- const command = `claude mcp add ${name} ${envArgs} -- npx -y @insforge/mcp@latest`;
84
- logger.info("Adding insforge MCP server...");
85
- execSync(command, {
86
- stdio: 'inherit',
87
- shell: true
88
- });
89
- } catch (error) {
90
- throw new Error(`Failed to add MCP server via Claude CLI: ${error.message}`);
91
- }
68
+ };
69
+ writeConfig(config, argv.client);
92
70
  } else if (argv.client === "codex") {
93
71
  // Use Codex CLI for Codex
94
72
  const envArgs = Object.entries(envVars)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/install",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "CLI tool for installing Insforge MCP servers across different AI clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",