vultr-cli icon indicating copy to clipboard operation
vultr-cli copied to clipboard

[Feature] - Output format

Open axos88 opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. Parsing output with scripts

Describe the solution you'd like An easy way to output say a csv or json document, or something that can be easily parsed programatically

Describe alternatives you've considered Regexes.......

axos88 avatar Jan 20 '20 20:01 axos88

Pls also have a look https://github.com/digitalocean/doctl:

Flags:
  -t, --access-token string   API V2 access token
  -u, --api-url string        Override default API endpoint
  -c, --config string         Specify a custom config file (default "$HOME/.config/doctl/config.yaml")
      --context string        Specify a custom authentication context name
  -h, --help                  help for doctl
  -o, --output string         Desired output format [text|json] (default "text")

sergerdn avatar Oct 16 '20 06:10 sergerdn

I do want a --no-header flag when listing instance, so I can do batch operation in bash shell easier.

yamada95 avatar Jun 23 '21 21:06 yamada95

I'd still love a CSV output as it's a much simpler format to work with in many scripts.

Justinzobel avatar Apr 17 '23 04:04 Justinzobel

JSON output format would be great!

fharper avatar Jun 21 '23 18:06 fharper

This change would be great, and would go miles towards more convenient migration to Vultr from competitors. Any movement since @relwell's PR? @optik-aper you mentioned govultr changes that superseded that PR, are those visible anywhere?

Levilutz avatar Sep 01 '23 22:09 Levilutz

@Levilutz Sorry, somehow I missed this mention. The changes are in govultr so yeah, we can make this a priority seeing that there is so much demand. I'll try to get it in for the next minor release.

optik-aper avatar Oct 23 '23 21:10 optik-aper

Any updates to this @optik-aper? It looks like we were very close to having this via #292 which was closed over a year ago. I'd like to transition to using the CLI but I won't be able to do that until the output can be parsed programmatically via JSON.

Many thanks!

chrisdeeming avatar Jan 31 '24 13:01 chrisdeeming

@chrisdeeming It's my main focus at the moment and I'm almost done. The next release will support a --output json flag on all commands.

optik-aper avatar Jan 31 '24 17:01 optik-aper

@chrisdeeming It's my main focus at the moment and I'm almost done. The next release will support a --output json flag on all commands.

Nice. Great work! Will be excited to check it out.

chrisdeeming avatar Jan 31 '24 17:01 chrisdeeming