What
aegisctl providers lists the configured providers with their health, as a human table. There is no machine-readable version, so scripting a health check means parsing text.
status, pending, and version already take a --json flag. This does the same for providers.
Scope
- Add a
--json (and -json) flag to the providers command, parsed the same way status and pending do it in cmd/aegisctl/main.go.
- When set, print the provider list as JSON, including each provider's health/status field so the JSON is as useful as the table.
- Leave the human table unchanged when the flag is absent.
- Update the
providers line in printUsage() to add (add --json for machine output).
Pointers
- Target:
cmdProviders at cmd/aegisctl/main.go:540.
- Reference:
cmdStatus (line 293) and cmdPending (line 748) show the flag parse and JSON branch to copy.
Acceptance
aegisctl providers --json prints valid JSON and nothing else on stdout, health included.
aegisctl providers output is unchanged.
- A small test in the style of
cmd/aegisctl/version_test.go covers the JSON path.
What
aegisctl providerslists the configured providers with their health, as a human table. There is no machine-readable version, so scripting a health check means parsing text.status,pending, andversionalready take a--jsonflag. This does the same forproviders.Scope
--json(and-json) flag to theproviderscommand, parsed the same waystatusandpendingdo it incmd/aegisctl/main.go.providersline inprintUsage()to add(add --json for machine output).Pointers
cmdProvidersatcmd/aegisctl/main.go:540.cmdStatus(line 293) andcmdPending(line 748) show the flag parse and JSON branch to copy.Acceptance
aegisctl providers --jsonprints valid JSON and nothing else on stdout, health included.aegisctl providersoutput is unchanged.cmd/aegisctl/version_test.gocovers the JSON path.