astro-cli
astro-cli copied to clipboard
Allow the option to return results in json format
- [x] I have checked that a similar feature request does not already exist.
✍️ Is your feature request related to a problem? Please describe.
It would be easier to programmatically use the cli if there were an option to return results in json format.
Describe the solution you'd like
Add --output
param that can be either text (default)
or json
💡 Additional context I realize that the houston graphql api will return json, however the simplicity of the astro cli is a nice alternative.
Are you an Astro Cloud or Astronomer Software user? Return results of any command?
Bumping this.
I have the need for machine-readable outputs for all commands, either JSON or YAML. Deployment inspect is not sufficient.
Here are my ugly hacks:
astro organization team delete $(astro organization team list | grep ${team_name} | rev | xargs | tr -s ' ' | cut -d ' ' -f 6 | rev)
astro organization team user remove --team-id $(astro organization team list | grep ${team_name} | rev | xargs | tr -s ' ' | cut -d ' ' -f 6 | rev) --user-id $(astro organization user list | grep ${astro_user_email} | rev | xargs | tr -s ' ' | cut -d ' ' -f 4 | rev)"
astro workspace delete $(astro workspace list | grep ${workspace_name} | rev | xargs | tr -s ' ' | cut -d ' ' -f 1 | rev)
astro workspace team add --workspace-id=$(astro workspace list | grep ${workspace_name} | rev | xargs | tr -s ' ' | cut -d ' ' -f 1 | rev) --team-id=$(astro organization team list | grep ${team_name} | rev | xargs | tr -s ' ' | cut -d ' ' -f 6 | rev)
astro deployment delete $(astro deployment list | grep ${deployment_name} | rev | xargs | tr -s ' ' | cut -d ' ' -f 1 | rev)
astro deployment service-account create --deployment-id=$(astro deployment list | grep ${deployment_name} | rev | xargs | tr -s ' ' | cut -d ' ' -f 1 | rev) --label=${label}`
+1 for this, got another request for supporting output format consistently.
Customer specifically mentioned astro deployment list
, but would ultimately like to have it in all commands.