HerokuAndy Smith6 min readintro
6 Lesser-Known Heroku CLI Commands You Probably Aren’t Using
Summary
A short‑list of six Heroku CLI commands that can reduce UI‑driven context switches: exporting config vars, inspecting live DB queries, SSH‑like dyno access, running detached jobs, enabling shell autocomplete, and opening add‑on dashboards.
- heroku config -s > .env – dump all config vars to a local .env (or append a single var).
- heroku pg:ps – view active Postgres queries with duration and PID.
- heroku ps:exec – open a secure SSH tunnel into a running dyno for live debugging.
- heroku run:detached – fire‑and‑forget long‑running jobs; monitor via heroku logs --dyno.
Each command eliminates a mouse‑driven step, keeping developers in the terminal and preserving focus. For teams that already rely on the Heroku CLI, these shortcuts shave minutes per day and reduce the risk of accidental credential leaks or interrupted background jobs.
4/10

