Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI should be able to output JSON on request #54

Open
carltonwhitehead opened this issue May 14, 2021 · 1 comment
Open

CLI should be able to output JSON on request #54

carltonwhitehead opened this issue May 14, 2021 · 1 comment

Comments

@carltonwhitehead
Copy link
Contributor

carltonwhitehead commented May 14, 2021

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
@carltonwhitehead
Copy link
Contributor Author

carltonwhitehead commented May 21, 2024

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 carltonwhitehead changed the title CLI should output JSON by default CLI should be able to output JSON on request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant