heroku / heroku-pg

this code is now in https://github.com/heroku/cli
ISC License
15 stars 17 forks source link

Structured output from toolbelt commands, for use in scripts #104

Open slepkin opened 7 years ago

slepkin commented 7 years ago

As mentioned in https://github.com/heroku/cli/issues/42, it's useful to be able to output JSON (or any other standardized structure) when a command is run in the CLI. Many CLI commands have --json as an option, but pg:info does not. I envision it like this:

$heroku pg:info
{
    "FOLLOWER_DATABASE": {
        "Plan": "Premium 2",
        "Following": "DATABASE",
        ...
    },
    "DATABASE": {
        "Plan": "Premium 4",
        ...
    }
}
msakrejda commented 7 years ago

I agree this would be useful, but I don't think we can offer a stable output format here without stabilizing and formalizing the internal APIs we use to get this info. That's something we're definitely interested in, but we don't have a timeline right now.