Skip to content

Commit 3522074

Browse files
committed
fix: Human friendly setup messages
1 parent 7ad18f2 commit 3522074

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

setup-claude-server.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,14 @@ function logToFile(message, isError = false) {
311311
timestamp,
312312
message
313313
};
314-
process.stdout.write(JSON.stringify(jsonOutput) + '\n');
314+
process.stdout.write(`${message}\n`);
315315
} catch (err) {
316316
// Last resort error handling
317-
process.stderr.write(JSON.stringify({
317+
process.stderr.write(`${JSON.stringify({
318318
type: 'error',
319319
timestamp: new Date().toISOString(),
320320
message: `Failed to write to log file: ${err.message}`
321-
}) + '\n');
321+
})}\n`);
322322
}
323323
}
324324

@@ -473,15 +473,22 @@ async function restartClaude() {
473473
} else if (platform === "darwin") {
474474
await execAsync(`open -a "Claude"`);
475475
updateSetupStep(startStep, 'completed');
476-
logToFile(`Claude has been restarted.`);
476+
logToFile("\n✅ Claude has been restarted automatically!");
477477
await trackEvent('npx_setup_start_claude_success', { platform });
478478
} else if (platform === "linux") {
479479
await execAsync(`claude`);
480-
logToFile(`Claude has been restarted.`);
480+
logToFile("\n✅ Claude has been restarted automatically!");
481481
updateSetupStep(startStep, 'completed');
482482
await trackEvent('npx_setup_start_claude_success', { platform });
483+
} else {
484+
logToFile('\nTo use the server restart Claude if it\'s currently running\n');
483485
}
484-
486+
487+
logToFile("\n✅ Installation sucessfully completed! Thank you for using Desktop Commander!\n");
488+
logToFile('\nThe server is available as "desktop-commander" in Claude\'s MCP server list');
489+
490+
logToFile("Future updates will install automatically — no need to run this setup again.\n\n");
491+
logToFile("💬 Need help or found an issue? Join our community: https://discord.com/invite/kQ27sNnZr7\n\n")
485492
updateSetupStep(restartStep, 'completed');
486493
await trackEvent('npx_setup_restart_claude_success', { platform });
487494
} catch (startError) {
@@ -706,13 +713,11 @@ export default async function setup() {
706713
throw new Error(`Failed to update config: ${updateError.message}`);
707714
}
708715
const appVersion = await getVersion()
709-
logToFile(`Successfully added Desktop Commander MCP v${appVersion} server to Claude configuration!`);
716+
logToFile(`Desktop Commander MCP v${appVersion} successfully added to Claude’s configuration.`);
710717
logToFile(`Configuration location: ${claudeConfigPath}`);
711718

712719
if (debugMode) {
713720
logToFile('\nTo use the debug server:\n1. Restart Claude if it\'s currently running\n2. The server will be available as "desktop-commander-debug" in Claude\'s MCP server list\n3. Connect your debugger to port 9229');
714-
} else {
715-
logToFile('\nTo use the server:\n1. Restart Claude if it\'s currently running\n2. The server will be available as "desktop-commander" in Claude\'s MCP server list');
716721
}
717722

718723
// Try to restart Claude

0 commit comments

Comments
 (0)