@codebakers/cli 3.3.6 → 3.3.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "3.3.6",
3
+ "version": "3.3.8",
4
4
  "description": "CodeBakers CLI - Production patterns for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -700,13 +700,15 @@ export async function init(): Promise<void> {
700
700
  // Write .cursorignore
701
701
  writeFileSync(join(cwd, '.cursorignore'), CURSORIGNORE_TEMPLATE);
702
702
 
703
- // Create .cursor/mcp.json for MCP server configuration
704
- const cursorDir = join(cwd, '.cursor');
705
- if (!existsSync(cursorDir)) {
706
- mkdirSync(cursorDir, { recursive: true });
703
+ // Create GLOBAL ~/.cursor/mcp.json for MCP server configuration
704
+ // Cursor reads MCP config from global location, not project-local
705
+ const homeDir = process.env.USERPROFILE || process.env.HOME || '';
706
+ const globalCursorDir = join(homeDir, '.cursor');
707
+ if (!existsSync(globalCursorDir)) {
708
+ mkdirSync(globalCursorDir, { recursive: true });
707
709
  }
708
710
 
709
- const mcpConfigPath = join(cursorDir, 'mcp.json');
711
+ const mcpConfigPath = join(globalCursorDir, 'mcp.json');
710
712
  const isWindows = process.platform === 'win32';
711
713
  const mcpConfig = {
712
714
  mcpServers: {
@@ -746,7 +748,7 @@ export async function init(): Promise<void> {
746
748
  }
747
749
 
748
750
  cursorSpinner.succeed('Cursor configuration installed!');
749
- console.log(chalk.green(' ✓ MCP server configured (.cursor/mcp.json)'));
751
+ console.log(chalk.green(' ✓ MCP server configured (~/.cursor/mcp.json)'));
750
752
  } catch (error) {
751
753
  cursorSpinner.warn('Could not install Cursor files (continuing anyway)');
752
754
  }
@@ -164,8 +164,10 @@ function showFinalInstructions(): void {
164
164
  }
165
165
  }
166
166
 
167
- // Install MCP for Cursor IDE (create .cursor/mcp.json)
168
- const cursorDir = join(cwd, '.cursor');
167
+ // Install MCP for Cursor IDE (create GLOBAL ~/.cursor/mcp.json)
168
+ // Cursor reads MCP config from global location, not project-local
169
+ const homeDir = process.env.USERPROFILE || process.env.HOME || '';
170
+ const cursorDir = join(homeDir, '.cursor');
169
171
  const mcpConfigPath = join(cursorDir, 'mcp.json');
170
172
  const mcpConfig = {
171
173
  mcpServers: {
@@ -188,7 +190,7 @@ function showFinalInstructions(): void {
188
190
  } else {
189
191
  writeFileSync(mcpConfigPath, JSON.stringify(mcpConfig, null, 2));
190
192
  }
191
- console.log(chalk.green(' ✅ Cursor MCP server configured! (.cursor/mcp.json)\n'));
193
+ console.log(chalk.green(' ✅ Cursor MCP server configured! (~/.cursor/mcp.json)\n'));
192
194
  } catch (error) {
193
195
  console.log(chalk.yellow(' ⚠️ Could not create Cursor MCP config\n'));
194
196
  }
package/src/index.ts CHANGED
@@ -32,7 +32,7 @@ import { join } from 'path';
32
32
  // Automatic Update Notification
33
33
  // ============================================
34
34
 
35
- const CURRENT_VERSION = '3.3.6';
35
+ const CURRENT_VERSION = '3.3.7';
36
36
 
37
37
  async function checkForUpdatesInBackground(): Promise<void> {
38
38
  // Check if we have a valid cached result first (fast path)