Skip to content

feat(shorebird_cli): add account apps subcommand#3743

Open
nickshorebird wants to merge 2 commits intomainfrom
nick/agentic-account-apps
Open

feat(shorebird_cli): add account apps subcommand#3743
nickshorebird wants to merge 2 commits intomainfrom
nick/agentic-account-apps

Conversation

@nickshorebird
Copy link
Copy Markdown
Contributor

@nickshorebird nickshorebird commented May 6, 2026

Summary

  • Adds shorebird account apps, which lists apps the current user has access to. Mirrors the account orgs shape so the account namespace stays parallel (whoami, orgs, apps).
  • Pure CLI add. Reuses the existing codePushClientWrapper.getApps() already used internally by release/patch flows. No new wrapper, protocol, or server work.
  • Human output: space-separated app_id display_name latest_release_version latest_patch_number, w/ - for unreleased apps. --json returns { apps: [{ app_id, display_name, latest_release_version, latest_patch_number }] }.
  • Help-text column labels match JSON keys verbatim, so an agent reading --help and then parsing --json sees identical field names. Caught while comparing the three account subcommands' help output side-by-side.
  • Closes the last CLI-only gap in the account surface from the agentic smoke test. Remaining account capabilities (org create, member mgmt, API keys, usage/plan, audit logs, transfer-app-to-org) all need backend work and will land separately.

Why not a plain app command?

I originally planned to have app, eg shorebird app, but each of the app commands are either semantically covered already, eg create w/ release, or logically fit better into account or other parents.

Testing

  • 10 new tests in apps_command_test.dart: precondition failure, auth required, populated and empty-state human output, API-error path in human and JSON modes, JSON success shape w/ flat fields, projection check (no created_at/updated_at leak), empty-array case
  • dart test packages/shorebird_cli: 2028 passed, 1 skipped (pre-existing), 0 failures
  • dart analyze --fatal-warnings lib test: clean on new files
  • dart format: clean
  • Manual smoke against an authenticated dev environment: shorebird account apps and shorebird account apps --json both render correctly; forced-unauthenticated path returns the expected JSON error envelope

@nickshorebird nickshorebird self-assigned this May 6, 2026
@nickshorebird nickshorebird added enhancement New feature or request cli The issue pertains to the shorebird CLI labels May 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@nickshorebird nickshorebird requested review from bdero and easymac May 6, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli The issue pertains to the shorebird CLI enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant