diff --git a/apps/cli/bin/app.js b/apps/cli/bin/app.js index 87396adc..41fdcc9e 100755 --- a/apps/cli/bin/app.js +++ b/apps/cli/bin/app.js @@ -44,35 +44,8 @@ yargs(hideBin(process.argv)) description: "The example to import", }), async (argv) => { - const exampleName = String(argv.example).trim(); try { - const imported = await importExample(exampleName); - - // Build output message - const output = [ - `✓ Imported example '${exampleName}'`, - ` Agents: ${imported.importedAgents.join(", ")}`, - ` Primary: ${imported.entryAgent}`, - ]; - - if (imported.addedServers.length > 0) { - output.push(` MCP servers added: ${imported.addedServers.join(", ")}`); - } - if (imported.skippedServers.length > 0) { - output.push(` MCP servers skipped (already configured): ${imported.skippedServers.join(", ")}`); - } - - console.log(output.join("\n")); - - if (imported.postInstallInstructions) { - console.log("\n" + "=".repeat(60)); - console.log("POST-INSTALL INSTRUCTIONS"); - console.log("=".repeat(60)); - console.log(imported.postInstallInstructions); - console.log("=".repeat(60) + "\n"); - } - - console.log(`\nRun: rowboatx --agent ${imported.entryAgent}`); + await importExample(String(argv.example).trim()); } catch (error) { console.error("Error:", error?.message ?? error); process.exit(1); diff --git a/apps/cli/package-lock.json b/apps/cli/package-lock.json index 5b2183f7..0df55c71 100644 --- a/apps/cli/package-lock.json +++ b/apps/cli/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rowboatlabs/rowboatx", - "version": "0.12.0", + "version": "0.10.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rowboatlabs/rowboatx", - "version": "0.12.0", + "version": "0.10.0", "license": "Apache-2.0", "dependencies": { "@ai-sdk/anthropic": "^2.0.44", @@ -1779,4 +1779,4 @@ } } } -} +} \ No newline at end of file diff --git a/apps/cli/src/app.ts b/apps/cli/src/app.ts index 6740321c..577f8ca9 100644 --- a/apps/cli/src/app.ts +++ b/apps/cli/src/app.ts @@ -467,21 +467,53 @@ async function mergeMcpServers(servers: Record agent.name) ?? [], - addedServers: serverMerge.added, - skippedServers: serverMerge.skipped, - postInstallInstructions, - }; + + // Build and display output message + const importedAgents = example.agents?.map((agent) => agent.name) ?? []; + const entryAgent = example.entryAgent ?? importedAgents[0] ?? ""; + + const output = [ + `✓ Imported example '${exampleName}'`, + ` Agents: ${importedAgents.join(", ")}`, + ` Primary: ${entryAgent}`, + ]; + + if (serverMerge.added.length > 0) { + output.push(` MCP servers added: ${serverMerge.added.join(", ")}`); + } + if (serverMerge.skipped.length > 0) { + output.push(` MCP servers skipped (already configured): ${serverMerge.skipped.join(", ")}`); + } + + console.log(output.join("\n")); + + // Display post-install instructions if present + if (example.instructions) { + console.log("\n" + "=".repeat(60)); + console.log("POST-INSTALL INSTRUCTIONS"); + console.log("=".repeat(60)); + console.log(example.instructions); + console.log("=".repeat(60) + "\n"); + } + + // Display next steps + console.log(`\nRun: rowboatx --agent ${entryAgent}`); } export async function listExamples() {