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

json out on cli ? #20

Open
gedw99 opened this issue Sep 5, 2024 · 5 comments
Open

json out on cli ? #20

gedw99 opened this issue Sep 5, 2024 · 5 comments

Comments

@gedw99
Copy link

gedw99 commented Sep 5, 2024

Would you be open to adding json and jq json parsing on the CLI ?

https://github.com/cli/cli/blob/trunk/pkg/cmdutil/json_flags.go is a decent example of it.

Is allow automation for devs and users, so that alerts can easily be upgraded but also any other automation aspects.

The GitHub CLI example does a nice job os encapsulating it for cobra.

https://github.com/cli/cli/blob/trunk/pkg/cmd/project/delete/delete.go#L74 shows how easy it is to add it to a command.

@pomdtr
Copy link
Owner

pomdtr commented Sep 5, 2024

yeah this would be nice to have!

I might even be able to reuse the cmdutil package from the github cli

@gedw99
Copy link
Author

gedw99 commented Sep 5, 2024

Yes I would reuse it .. copy / paste

@gedw99
Copy link
Author

gedw99 commented Oct 23, 2024

hey @pomdtr

polite ping ..

If this still on the cards ?

I used that GitHub cmdutils package for a project and it worked well.

@pomdtr
Copy link
Owner

pomdtr commented Oct 23, 2024

I did not take the time to add it yet, but it would definitely be useful (especially in the smallweb api command).

@gedw99
Copy link
Author

gedw99 commented Oct 23, 2024

I think it will really help just for usability and automation.

I guess it will help the API code because then the API is calling the CLI and so getting JSON back out ?

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

2 participants