diff --git a/cli/package.json b/cli/package.json index 13eb6cd8..83f2b273 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.2.26", + "version": "0.2.27", "type": "module", "bin": { "spawn": "cli.js" diff --git a/cli/src/commands.ts b/cli/src/commands.ts index 28c6d91c..f10e2575 100644 --- a/cli/src/commands.ts +++ b/cli/src/commands.ts @@ -757,6 +757,10 @@ export async function cmdUpdate(): Promise { } catch (err) { s.stop(pc.red("Failed to check for updates")); console.error("Error:", getErrorMessage(err)); + console.error(`\nTroubleshooting:`); + console.error(` 1. Check your internet connection`); + console.error(` 2. Try again in a few moments`); + console.error(` 3. Update manually: ${pc.cyan(`curl -fsSL ${RAW_BASE}/cli/install.sh | bash`)}`); } } diff --git a/cli/src/index.ts b/cli/src/index.ts index 572a9c3a..99a56a65 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -230,6 +230,8 @@ async function main(): Promise { if (isInteractiveTTY()) { await cmdInteractive(); } else { + console.error(pc.yellow("Non-interactive terminal detected (no TTY). Showing help instead of interactive picker.")); + console.error(pc.dim("To launch directly, use: spawn \n")); cmdHelp(); } return; diff --git a/cli/src/manifest.ts b/cli/src/manifest.ts index 7feac04c..03c42637 100644 --- a/cli/src/manifest.ts +++ b/cli/src/manifest.ts @@ -175,7 +175,15 @@ export async function loadManifest(forceRefresh = false): Promise { return stale; } - throw new Error("Cannot load manifest. Check your internet connection."); + throw new Error( + `Cannot load manifest: failed to fetch from GitHub and no local cache available.\n` + + `\n` + + `Troubleshooting:\n` + + ` 1. Check your internet connection\n` + + ` 2. Try again in a few moments (GitHub may be temporarily unreachable)\n` + + ` 3. If the problem persists, clear the cache and retry:\n` + + ` rm -rf ${CACHE_DIR}` + ); } export function agentKeys(m: Manifest): string[] {