mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-02 13:50:26 +00:00
fix: show all auth vars in agent info quick start for multi-credential clouds (#975)
The `spawn <agent>` quick start section was only showing the first auth env var when the best available cloud requires multiple credentials (e.g., UpCloud with UPCLOUD_USERNAME + UPCLOUD_PASSWORD). This left users confused about what other credentials they needed. Now iterates over all auth vars, consistent with `spawn <cloud>` info. Agent: ux-engineer Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c7dcbaa5af
commit
3b4444f292
2 changed files with 33 additions and 2 deletions
|
|
@ -1380,8 +1380,10 @@ export async function cmdAgentInfo(agent: string): Promise<void> {
|
|||
console.log(pc.bold("Quick start:"));
|
||||
console.log(formatAuthVarLine("OPENROUTER_API_KEY", "https://openrouter.ai/settings/keys"));
|
||||
if (authVars.length > 0) {
|
||||
const hint = cloudDef.url ?? `${cloudDef.name} credential`;
|
||||
console.log(formatAuthVarLine(authVars[0], hint));
|
||||
for (let i = 0; i < authVars.length; i++) {
|
||||
// Only show the URL hint on the first auth var to avoid repetition
|
||||
console.log(formatAuthVarLine(authVars[i], i === 0 ? cloudDef.url : undefined));
|
||||
}
|
||||
}
|
||||
console.log(` ${pc.cyan(`spawn ${agentKey} ${exampleCloud}`)}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue