Skip to content
← Back to Community
Heroku CLI
Profile icon
dnrtc

Has anyone set up a Bash REPL that has the Heroku CLI working? If so, I'd like to see how it was done.

Voters
Profile icon
Yudi1gg
Profile icon
SkelingtonDoge
Profile icon
vishwas007
Profile icon
nightsailor
Profile icon
asianova
Profile icon
RafaMurua
Profile icon
GrandMoff100
Profile icon
HackermonDev
Profile icon
Vandesm14
Profile icon
dnrtc
Comments
hotnewtop
Profile icon
HackermonDev

Nope, not yet. But this would be a good idea.

Profile icon
GrandMoff100

Yes! I used the source tarball from their download and install page and then used wget to download it to the REPL, and then extracted it and ran the ./heroku/bin/heroku binary. Logging in is a little tricky but you can do it because the web browser window is visible in REPL.

Profile icon
GrandMoff100

You can actually specify the -i flag so you can log in via the cmd line.

Profile icon
asianova

@GrandMoff100 can you walk me through it? I looked up https://devcenter.heroku.com/articles/heroku-cli#other-installation-methods and saw the files; which version did you use and did you run wget url_to_file directly on the REPL terminal?

Profile icon
GrandMoff100

@asianova Sure! I went to the downloads page for the Heroku CLI. I then copied the download address link of the latest version for linux (the OS repl runs on), then went to a repl and used wget <download url>. Once you finish that you can use tar to extract the contents of the new archive file. Then you're set at this point and the Heroku-cli binary should be in a folder called bin, inside of the extracted files folder. You can use it via ./<extracted_files_folder>/bin/heroku. Does that help?

Profile icon
asianova

@GrandMoff100 hi, thank you! It worked, but I noticed the Heroku setup didn't persist after I close the session. Good workaround, but it might prevent me from using Repl.it in the long run!

Profile icon
AlexisCortes

@GrandMoff100 can you show me the exact code?

Profile icon
GrandMoff100

@AlexisCortes Sure Thing! :)
To install

$ wget https://cli-assets.heroku.com/heroku-linux-x64.tar.gz $ tar -zxf heroku-linux-x64.tar.gz $ rm heroku-linux-x64.tar.gz

Then whenever you would use heroku, replace it with ./heroku/bin/heroku because this new heroku binary hasn't been added to PATH.