fix(cli): add non-interactive TTY detection, dockerhub dedup, and clearer errors#126
Merged
Merged
Conversation
…arer errors Addresses RND-548: make ecloud CLI automation/AI-agent friendly. TTY detection (P0): - Add ensureInteractive() guard to all prompt functions in prompts.ts - In non-TTY environments (CI, agents), throws clear errors naming the missing flag instead of opaque @inquirer/prompts ExitPromptError - Guard confirmWithDefault() separately — refuses to auto-confirm in non-interactive mode for safety Dockerhub registry dedup (P1): - Add dockerhubUsers Map in getAvailableRegistries(), matching existing GCR dedup pattern — Docker Desktop creates 3 auth entries for the same account, now only one appears in the registry selection prompt Improved app name lookup error (P1): - Error message now explains the local cache may be stale and suggests using the app ID directly or running 'ecloud compute app list' Post-deploy/upgrade health note (P1): - Add informational note after deploy/upgrade success clarifying that "Running" means container started, not necessarily serving traffic - Deploy output includes a curl command to verify connectivity Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allows renaming an app's profile during upgrade via --name flag. The profile update happens after a successful upgrade, so if the upgrade fails the name stays unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
setProfile does a full replace, not a merge. Without fetching the existing profile first, passing only --name would wipe website, description, and xURL fields. Now fetches current profile via getInfos and preserves all existing fields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
seanmcgary
approved these changes
Apr 16, 2026
mcclurejt
approved these changes
Apr 16, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses RND-548: make ecloud CLI automation/AI-agent friendly.
ensureInteractive()guard to all prompt functions — in non-TTY environments (CI, agents), throws clear errors naming the missing flag instead of an opaqueExitPromptErrorgetAvailableRegistries(), matching existing GCR pattern — Docker Desktop creates 3 identical auth entries for the same accountecloud compute app listOut of scope (validated as not-bugs or needing backend work)
extractHostname()strips path correctly)--image-refbypass — WORKS CORRECTLY (prompt is already bypassed)--name+--skip-profileconflict — NOT A BUG (flags are independent)--nameon upgrade — BY DESIGN (upgrade takes existing app-id)Files changed (3)
packages/cli/src/utils/prompts.ts—ensureInteractive()helper, dockerhub dedup, error messagepackages/cli/src/commands/compute/app/deploy.ts— post-deploy health notepackages/cli/src/commands/compute/app/upgrade.ts— post-upgrade health noteTest plan
pnpm typecheck— no new type errors (57 pre-existing)pnpm lint(CLI package) — cleanpnpm format— cleanecho "" | node packages/cli/bin/run.js compute app deploy --environment sepolia→ clear non-interactive error--dockerfilewithout--image-ref→ error names--image-ref;--image-refwithout--name→ error names--nameecloud compute app info nonexistent-name→ error suggestsecloud compute app list🤖 Generated with Claude Code