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

Add CLI flag for JSON output #54

Open
NathanUrwin opened this issue Mar 19, 2018 · 5 comments
Open

Add CLI flag for JSON output #54

NathanUrwin opened this issue Mar 19, 2018 · 5 comments

Comments

@NathanUrwin
Copy link

No description provided.

@rehtlaw
Copy link

rehtlaw commented Jul 10, 2018

I very much support this. I'm currently writing python scripts to automate setting up a machine to use with some other scripts I already wrote, and having JSON output would make this a lot easier.

@JamesClonk
Copy link
Owner

I don't quite understand what for. 🤔
After all, the Vultr API is already responding with JSON. If you're writing python scripts to automate stuff, why not simply calling the API directly and parsing it's JSON output?
The API is quite simple actually: https://www.vultr.com/api/
You'll have much more fine-grained control that way 😄 👍

@rehtlaw
Copy link

rehtlaw commented Jul 13, 2018

I'll have a look at the API directly, but I still feel like it would be nice to get direct json output from the executable (like doctl).

@NathanUrwin
Copy link
Author

NathanUrwin commented Aug 4, 2018

Hey @JamesClonk 👋

For the simple reason that it would be used (probably a lot)! I would also argue that if an upstream API returns JSON then the downstream API (in this case your CLI) should have an option for returning JSON too. Just for debugging reasons at the very least.

Thanks in advance for your time and consideration! 👍

@rmb938
Copy link

rmb938 commented Nov 10, 2018

@JamesClonk I would also like json output. This allows users to pipe the output to jq (https://github.com/stedolan/jq) and filter things.

Yes we can just use the API directly using curl however the CLI makes it way easier to interact with the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants