Output formats
This documentation is part of the Use the CLI guide. You can view the complete guide here: Install and use the Stackhero CLI to manage your stacks and services from the command line, scripts, CI, and AI agents.
Every CLI command accepts a global --format option:
human(default): Displays readable tables and text for interactive use.json: Returns machine-readable JSON, which is useful for scripts and AI agents.script: Returns only raw value(s), which makes it easy to assign the output to shell variables.
For example:
stackhero organizations-list --format=json
stackId=$(stackhero --format=script stack-create --name="My stack")