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 the raw value or values, 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")