@insforge/install 0.0.25 → 0.0.27

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
@@ -98,18 +98,22 @@ import {
98
98
  }
99
99
  } else if (argv.client === "codex") {
100
100
  // Use Codex CLI for Codex
101
+ const homeDir = os.homedir();
102
+ const isWindows = process.platform === 'win32';
103
+ const codexPath = isWindows
104
+ ? path.join(homeDir, 'AppData', 'Roaming', 'npm', 'codex.cmd')
105
+ : 'codex';
106
+
101
107
  const envArgs = Object.entries(envVars)
102
- .map(([key, value]) => {
103
- // Properly quote values for cross-platform compatibility
104
- const quotedValue = value.includes(' ') ? `"${value}"` : value;
105
- return `--env ${key}=${quotedValue}`;
106
- })
108
+ .filter(([key]) => key !== 'CLIENT_NAME')
109
+ .map(([key, value]) => `--env ${key}=${value}`)
107
110
  .join(' ');
108
-
111
+
109
112
  try {
110
113
  // First try to remove existing insforge MCP if it exists
111
114
  try {
112
- execSync(`codex mcp remove ${name}`, {
115
+ const removeCmd = isWindows ? `"${codexPath}" mcp remove ${name}` : `codex mcp remove ${name}`;
116
+ execSync(removeCmd, {
113
117
  stdio: 'pipe',
114
118
  shell: true
115
119
  });
@@ -118,9 +122,11 @@ import {
118
122
  // It's okay if remove fails - the MCP might not exist
119
123
  logger.info("No existing insforge MCP found");
120
124
  }
121
-
125
+
122
126
  // Now add the MCP server using codex CLI with --env flags
123
- const command = `codex mcp add ${name} ${envArgs} -- npx -y ${mcpVersion}`;
127
+ const command = isWindows
128
+ ? `"${codexPath}" mcp add ${name} ${envArgs} -- npx -y ${mcpVersion}`
129
+ : `codex mcp add ${name} ${envArgs} -- npx -y ${mcpVersion}`;
124
130
  logger.info(`Adding insforge MCP server (${mcpVersion})...`);
125
131
  execSync(command, {
126
132
  stdio: 'inherit',
package/dist/utils.js CHANGED
@@ -28,10 +28,10 @@ var platformPaths = {
28
28
  var platform = process.platform;
29
29
  var { baseDir, vscodePath } = platformPaths[platform];
30
30
  var clientPaths = {
31
- "claude-code": {
32
- type: "file",
33
- path: path.join(homeDir, ".claude", "claude_mcp_config.json")
34
- },
31
+ // "claude-code": {
32
+ // type: "file",
33
+ // path: path.join(homeDir, ".claude", "claude_mcp_config.json")
34
+ // },
35
35
  cursor: {
36
36
  type: "file",
37
37
  path: path.join(homeDir, ".cursor", "mcp.json"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/install",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "CLI tool for installing Insforge MCP servers across different AI clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",