LinuxCommandLibrary

heroku

Manage and deploy Heroku applications

TLDR

Log in to your Heroku account

$ heroku login
copy

Create a Heroku app
$ heroku create
copy

Show logs for an app
$ heroku logs --app [app_name]
copy

Run a one-off process inside a dyno (Heroku virtual machine)
$ heroku run [process_name] --app [app_name]
copy

List dynos (Heroku virtual machines) for an app
$ heroku ps --app [app_name]
copy

Permanently destroy an app
$ heroku destroy --app [app_name]
copy

SYNOPSIS

heroku COMMAND [OPTIONS]

PARAMETERS

apps
    List your Heroku apps.

auth:login
    Login to your Heroku account.

config
    Display environment variables for an app.

create [NAME]
    Create a new Heroku app. Optionally provide a name.

deploy
    Deploy the code to the application (often uses git).

logs
    View the application logs.

ps:scale
    Scale dynos (Heroku's container units).

run
    Run a one-off process on Heroku.

addons
    Manage Heroku add-ons.

--remote
    Specify a git remote to use.

--app
    Specify an app to run the command against.

--version
    Display the Heroku CLI version.

-h, --help
    Show help for a command.

DESCRIPTION

The heroku command is a powerful CLI tool used to interact with the Heroku platform. It allows developers to create, manage, and deploy applications to Heroku's cloud environment.

Using the heroku command, developers can perform a wide range of tasks, including: creating new Heroku applications, deploying code, viewing application logs, scaling dynos (Heroku's container units), managing add-ons (databases, caching services, etc.), configuring environment variables, and running one-off processes.

The heroku command simplifies the process of deploying and managing web applications by providing a convenient and centralized interface for interacting with Heroku's API. It supports various authentication methods, including username/password and API keys. It also features advanced features like integration with git for seamless deployment and the ability to manage multiple Heroku accounts and applications.

Overall, the heroku command is an indispensable tool for developers working with the Heroku platform, streamlining application deployment and management tasks.

CAVEATS

The heroku command requires the Heroku CLI to be installed on your system. It also requires a valid Heroku account and authentication credentials. Some commands might require specific Heroku permissions to execute successfully. Heroku commands may change over time so refer to the official documentation for the latest information.

AUTHENTICATION

The heroku command uses either username/password authentication (deprecated) or API keys. API keys are recommended for security and can be managed through the Heroku dashboard.

GIT INTEGRATION

The heroku command is tightly integrated with git for code deployment. Deploying typically involves pushing changes to a git remote associated with your Heroku application.

PLUGINS

The heroku command supports the installation of plugins to extend its functionality. You can find and install plugins using the heroku plugins:install command.

HISTORY

The Heroku CLI was developed to provide a command-line interface for interacting with the Heroku platform. It has evolved over time to support new Heroku features and services. Initially focused on deploying Ruby applications using git, it has expanded to support other languages and deployment methods. Regular updates and improvements are released by Heroku to enhance functionality and address user feedback.

SEE ALSO

git(1)

Copied to clipboard