@insforge/install 0.0.10 → 0.0.11

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/index.js CHANGED
@@ -89,6 +89,39 @@ import {
89
89
  } catch (error) {
90
90
  throw new Error(`Failed to add MCP server via Claude CLI: ${error.message}`);
91
91
  }
92
+ } else if (argv.client === "codex") {
93
+ // Use Codex CLI for Codex
94
+ const envArgs = Object.entries(envVars)
95
+ .map(([key, value]) => {
96
+ // Properly quote values for cross-platform compatibility
97
+ const quotedValue = value.includes(' ') ? `"${value}"` : value;
98
+ return `--env ${key}=${quotedValue}`;
99
+ })
100
+ .join(' ');
101
+
102
+ try {
103
+ // First try to remove existing insforge MCP if it exists
104
+ try {
105
+ execSync(`codex mcp remove ${name}`, {
106
+ stdio: 'pipe',
107
+ shell: true
108
+ });
109
+ logger.info("Removed existing insforge MCP installation.");
110
+ } catch (removeError) {
111
+ // It's okay if remove fails - the MCP might not exist
112
+ logger.info("No existing insforge MCP found");
113
+ }
114
+
115
+ // Now add the MCP server using codex CLI with --env flags
116
+ const command = `codex mcp add ${name} ${envArgs} -- npx -y @insforge/insforge-mcp@latest`;
117
+ logger.info("Adding insforge MCP server...");
118
+ execSync(command, {
119
+ stdio: 'inherit',
120
+ shell: true
121
+ });
122
+ } catch (error) {
123
+ throw new Error(`Failed to add MCP server via Codex CLI: ${error.message}`);
124
+ }
92
125
  } else if (argv.client === "cursor") {
93
126
  // Cursor uses mcpServers at root level
94
127
  if (!config.mcpServers) config.mcpServers = {};
package/dist/utils.js CHANGED
@@ -52,6 +52,10 @@ var clientPaths = {
52
52
  trae: {
53
53
  type: "file",
54
54
  path: path.join(baseDir, "Trae", "User", "mcp.json")
55
+ },
56
+ codex: {
57
+ type: "file",
58
+ path: path.join(homeDir, ".codex", "mcp_config.json")
55
59
  }
56
60
  };
57
61
  var clientNames = Object.keys(clientPaths);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/install",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "CLI tool for installing Insforge MCP servers across different AI clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",