Heroku CLI
$ heroku Official High RiskHeroku CLI (heroku) manages Heroku apps, dynos, config vars, add-ons, and Postgres databases via oclif commands, supporting --json on read commands, -a (--app) scoping, and mandatory --confirm <app> validation on destructive operations.
brew install heroku/brew/heroku heroku is well-known to LLMs and offers --json across app/dyno/addon reads with strong --confirm <app> safety.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Consistent --json flag across info/list commands and predictable colon-delimited oclif subcommands.
- Supports
--jsonacrossapps:info,ps,releases, andaddons
Requires typing or passing --confirm <app> to execute destructive commands like apps:destroy or pg:reset, preventing accidental wipes.
- Mandatory
--confirm <app>guard on destructive operations
Available via Homebrew and npm on macOS, Linux, and Windows, though Node/oclif runtime startup is slightly slower.
- Homebrew
heroku/brew/herokuand npmherokupackages
Comprehensive PaaS control including releases, rollback, config vars, and Postgres.
- Full Heroku platform management in one CLI
Official heroku/cli repository maintained by Heroku (Salesforce).
- Official
heroku/cliunder ISC license
Thorough Heroku Dev Center command reference and --help docs.
- Complete Dev Center CLI documentation
Security, Auth & Guardrails
Stores OAuth credentials in ~/.netrc (or OS keychain via heroku login), or authenticates headlessly via HEROKU_API_KEY.
CLI is free (ISC); paid Heroku dynos and add-ons incur monthly usage billing.
# Heroku CLI Agent Rules - Always pass `-a <app>` explicitly rather than relying on git remote inference. - Pass `--json` on `apps`, `ps`, `releases`, and `addons` read calls. - Never pass `--confirm <app>` on `apps:destroy` or `pg:reset` without human approval.
Agent-Ready Command Recipes
Safe Read-Only Queries
heroku apps:info -a my-app --json
Returns app region, stack, dynos, and buildpacks as structured JSON.
heroku ps -a my-app --json
Inspects dyno process types, sizes, and states.
Controlled Writes & Previews
heroku ps:scale web=1 -a my-app
Targets a named app with -a and sets explicit dyno concurrency.
Strengths for Agents
- +
--confirm <app>acts as a strong guardrail against accidental app or database destruction. - + Consistent
--jsonsupport across inspection subcommands. - + Supports headless CI/agent authentication via
HEROKU_API_KEY.
Caveats & Pitfalls
- ! Node.js/oclif startup latency and auto-update checks can add overhead.
- ! Lacks a dry-run mode for config changes or scaling operations.