builderos-cli 2.0.5 → 2.0.7

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/index.js CHANGED
@@ -33,19 +33,22 @@ const VERSION = packageJson.version;
33
33
 
34
34
  // Parse command line arguments
35
35
  const args = process.argv.slice(2);
36
-
37
- // Check for MCP server command first
38
36
  const command = args[0];
37
+
38
+ // Check for MCP server command first (exit early before parsing options)
39
39
  if (command === 'mcp') {
40
40
  // Start MCP server (this will run indefinitely)
41
41
  await startMCPServer().catch((error) => {
42
42
  console.error('Fatal error:', error);
43
43
  process.exit(1);
44
44
  });
45
- // MCP server is now running, this code won't be reached
45
+ // MCP server is now running and handling requests
46
+ // The server keeps the process alive, so we should not reach here
47
+ // But if we do, just exit cleanly
48
+ process.exit(0);
46
49
  }
47
50
 
48
- // Default options
51
+ // Default options (needed for other commands)
49
52
  const options = {
50
53
  apiUrl: process.env.BUILDEROS_API_URL || 'http://builder-os.test',
51
54
  force: false,
@@ -115,6 +118,9 @@ Examples:
115
118
  process.exit(0);
116
119
  }
117
120
 
121
+ // Execute main for init/update commands
122
+ main();
123
+
118
124
  // Utility: Check if file exists
119
125
  async function fileExists(path) {
120
126
  try {
@@ -418,5 +424,3 @@ async function main() {
418
424
  process.exit(1);
419
425
  }
420
426
  }
421
-
422
- main();
package/mcp-server.js CHANGED
@@ -143,7 +143,7 @@ export async function startMCPServer() {
143
143
  const server = new Server(
144
144
  {
145
145
  name: 'builderos-cli-mcp',
146
- version: '2.0.5',
146
+ version: '2.0.7',
147
147
  },
148
148
  {
149
149
  capabilities: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "builderos-cli",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "BuilderOS CLI - Initialize BuilderOS in any project without requiring local code",
5
5
  "type": "module",
6
6
  "main": "index.js",