This package does to Heroku CLI what Magit did to git. It transforms the heroku
commands into useful, quick and intuitive interface using transient.
You can install heroku.el
from MELPA or MELPA Stable:
M-x package-install RET heroku RET
Make sure that Heroku CLI is installed and you have logged in using heroku login
(heroku.el will prompt you to login if you didn’t, but it’s better to be logged in already).
Heroku.el has a main point of entry, called heroku-list
:
M-x heroku-list RET
This opens up a list with all apps that you have access to, and you can start managing them right away (see screenshot). Once you’re in the list you can always see available commands by pressing ?
You can also run some of the commands without starting heroku-list
and get prompted for an app name to run on. Some of these commands:
heroku-logs
heroku-run
heroku-run-bash
heroku-run-python
heroku-run-detached
heroku-sql
heroku-restart
They will not let you set command line arguments and options, but will allow for quick actions when you know exactly what you want to do.
I have been using this package for almost two years without releasing it, and I rarely if ever need to open heroku’s web interface or run CLI commands. The most useful actions that I use all the time:
Set the cursor on an app and press l
, the logs options menu will pop up:
Normally I just press ll
to start tailing logs immediately. A new buffer will open with your logs and some basic highlighting (ERROR will be red, WARNING yellow etc.)
Choose an app in the list and press r
for run
:
You can quickly run bash on the app with rb
and python with rp
Pressing rr
will prompt you for command to run in the minibuffer, and rd
will do the same, but command you give will run detached.
Press yr
to quickly restart a dyno.
App commands menu with available actions (you can see it by pressing ?
)
Editing environment variables right from within emacs. You can also easily create new ones.
Running heroku-sql
opens Emacs’s sql buffer for psql
and you can start working with the db:
There was previously a small heroku.el package that had two commands: heroku-run
and heroku-sql
. Both of these commands are present in this implementation and can be used the same way, to preserve backward compatibility.
The project uses break versioning, meaning that upgrading from 1.0.x to 1.0.y will always be safe, upgrade to 1.y.0 might break something small, and upgrade to y.0.0. will break almost everything.