diff --git a/cli/package.json b/cli/package.json index 930ff060..4d99bea0 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.2.24", + "version": "0.2.25", "type": "module", "bin": { "spawn": "cli.js" diff --git a/cli/src/commands.ts b/cli/src/commands.ts index 5dd58380..aba819c0 100644 --- a/cli/src/commands.ts +++ b/cli/src/commands.ts @@ -607,6 +607,9 @@ export async function cmdAgentInfo(agent: string): Promise { const a = manifest.agents[agentKey]; console.log(); console.log(`${pc.bold(a.name)} ${pc.dim("--")} ${a.description}`); + if (a.url) { + console.log(pc.dim(` ${a.url}`)); + } if (a.notes) { console.log(pc.dim(` ${a.notes}`)); } @@ -655,6 +658,9 @@ export async function cmdCloudInfo(cloud: string): Promise { console.log(); console.log(`${pc.bold(c.name)} ${pc.dim("--")} ${c.description}`); console.log(pc.dim(` Type: ${c.type}`)); + if (c.url) { + console.log(pc.dim(` ${c.url}`)); + } if (c.notes) { console.log(pc.dim(` ${c.notes}`)); } @@ -676,6 +682,8 @@ export async function cmdCloudInfo(cloud: string): Promise { console.log(pc.dim(" No implemented agents yet.")); } console.log(); + console.log(pc.dim(` Setup instructions: ${pc.cyan(`https://github.com/${REPO}/tree/main/${cloudKey}`)}`)); + console.log(); } // ── Update ───────────────────────────────────────────────────────────────────── @@ -737,7 +745,7 @@ ${pc.bold("USAGE")} Execute agent with prompt from file spawn Show available clouds for agent spawn Show available agents for cloud - spawn list Full matrix table (alias: ls) + spawn list Full matrix table (alias: ls) spawn agents List all agents with descriptions spawn clouds List all cloud providers spawn update Check for CLI updates diff --git a/cli/src/index.ts b/cli/src/index.ts index c89e7e2e..572a9c3a 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -138,6 +138,29 @@ async function handleDefaultCommand(agent: string, cloud: string | undefined, pr if (prompt) { console.error("Error: --prompt requires both and "); console.error(`\nUsage: spawn ${agent} --prompt "your prompt here"`); + + // Try to suggest available clouds for the agent + try { + const manifest = await loadManifest(); + const resolvedAgent = resolveAgentKey(manifest, agent); + if (resolvedAgent) { + const clouds = cloudKeys(manifest).filter( + (c: string) => manifest.matrix[`${c}/${resolvedAgent}`] === "implemented" + ); + if (clouds.length > 0) { + console.error(`\nAvailable clouds for ${resolvedAgent}:`); + for (const c of clouds.slice(0, 5)) { + console.error(` ${pc.cyan(`spawn ${resolvedAgent} ${c} --prompt "..."`)}`); + } + if (clouds.length > 5) { + console.error(` Run ${pc.cyan(`spawn ${resolvedAgent}`)} to see all ${clouds.length} clouds.`); + } + } + } + } catch { + // Manifest unavailable — skip cloud suggestions + } + process.exit(1); } await showInfoOrError(agent);