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:
A 2026-02-13 11:18:28 -08:00 committed by GitHub
parent c7dcbaa5af
commit 3b4444f292
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 2 deletions

View file

@ -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}`)}`);
}