You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Admin CLI outputs human-readable-ish formatted plain text. It would greatly improve the experience of interacting with the Admin CLI by script (thinking of it as a kind of shell-based API) to adjust it to output JSON on request.
Because the surface area of the Admin CLI is already quite large, retrofitting this capability in place at-once may be quite cumbersome to develop. Therefore it will be necessary for individual subcommands to opt-in to JSON output capabilities. After the initial support for this is arranged, it's fine to submit PRs adding JSON capabilities to as few as one subcommand, or in such a small grouping of similar subcommands as is convenient and comfortable for a developer. No need to block on migrating everything all at once.
Subcommand invoked with JSON format preference:
If Subcommand supports JSON format preference, emit JSON
If Subcommand does not support JSON format preference, emit suitable error and exit
The text was updated successfully, but these errors were encountered:
The Admin app is meant to be a human interface, not as an API. It would be silly for JSON to be the default.
I think there is some merit to the idea of it having some JSON capabilities, and that those capabilities should be implemented consistently throughout, where feasible. In other words, I'm comfortable with there being some exclusions to content available in JSON, but those should be few and exceptional.
EDIT: Changed the issue title and description to reflect this perspective.
carltonwhitehead
changed the title
CLI should output JSON by default
CLI should be able to output JSON on request
May 21, 2024
Currently the Admin CLI outputs human-readable-ish formatted plain text. It would greatly improve the experience of interacting with the Admin CLI by script (thinking of it as a kind of shell-based API) to adjust it to output JSON on request.
Because the surface area of the Admin CLI is already quite large, retrofitting this capability in place at-once may be quite cumbersome to develop. Therefore it will be necessary for individual subcommands to opt-in to JSON output capabilities. After the initial support for this is arranged, it's fine to submit PRs adding JSON capabilities to as few as one subcommand, or in such a small grouping of similar subcommands as is convenient and comfortable for a developer. No need to block on migrating everything all at once.
The text was updated successfully, but these errors were encountered: