feat: add --format json support to apps:list

The `apps:list` command now accepts a `--format` flag that defaults to `stdout` and can be set to `json` to emit the app names as a JSON array, matching the JSON output the `:report` subcommands already provide. When no apps exist, the JSON output is an empty array.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-07-06 11:50:56 -04:00
1 parent ce69ca76ad
commit 21c27e99cc
5 files changed
+67 -6

No files matched your search

+2 -2
View File
@@ -23,7 +23,7 @@ Additional commands:`
apps:create <app>, Create a new app
apps:destroy <app>, Permanently destroy an app
apps:exists <app>, Checks if an app exists
apps:list, List your apps
apps:list [--format stdout|json], List your apps
apps:lock <app>, Locks an app for deployment
apps:locked <app>, Checks if an app is locked for deployment
apps:rename <old-app> <new-app>, Rename an app
@@ -43,7 +43,7 @@ func main() {
args.Usage = usage
args.Parse(os.Args[2:])
if err := apps.CommandList(); err != nil {
if err := apps.CommandList("stdout"); err != nil {
common.LogFailWithError(err)
}
case "apps:help":