heroku
Manage and deploy Heroku applications
TLDR
Log in to your Heroku account
Create a Heroku app
Show logs for an app
Run a one-off process inside a dyno (Heroku virtual machine)
List dynos (Heroku virtual machines) for an app
Permanently destroy an app
SYNOPSIS
`heroku COMMAND [ARGS...]`
`heroku help [COMMAND]`
Examples:
`heroku login`
`heroku apps:create [APP_NAME]`
`heroku deploy`
`heroku logs --tail`
The `heroku` command typically requires a subcommand to perform an action.
PARAMETERS
--app
Specify the Heroku application to operate on.
-a
Shorthand for --app.
--remote
Specify the Git remote to use for the application.
-r
Shorthand for --remote.
--json
Output in JSON format (where applicable), useful for scripting.
--version
Display the Heroku CLI version.
--help
Display help for the Heroku CLI or a specific command.
-h
Shorthand for --help.
--verbose
Enable verbose output for debugging.
--debug
Enable debug output for detailed troubleshooting, including HTTP requests.
DESCRIPTION
The `heroku` command is the official Command Line Interface (CLI) for interacting with the Heroku Platform-as-a-Service (PaaS). It empowers developers to manage their Heroku applications directly from the terminal, providing a powerful interface to the Heroku API.
With the Heroku CLI, users can perform a wide array of tasks, including creating new applications, deploying code, scaling dynos, configuring environment variables, managing databases, and inspecting application logs. It streamlines the development workflow by integrating common development practices like Git-based deployments and providing access to live application shells.
The CLI is highly extensible through a robust plugin architecture, allowing developers to add custom commands and integrate with other services. It serves as the primary tool for deploying, monitoring, and debugging applications hosted on the Heroku cloud platform, making complex cloud operations accessible through simple command-line invocations.
CAVEATS
The `heroku` command is not a native Linux utility but a separately installed client-side application. It requires an active internet connection and a Heroku user account for most operations, as it interacts directly with the Heroku cloud platform's API. Functionality is entirely dependent on the Heroku service availability. Command syntax and available subcommands can be extensive and context-dependent, often requiring specific subcommand knowledge.
SUBCOMMANDS
The `heroku` command acts as a dispatcher for hundreds of subcommands, each designed for specific tasks. Examples include `heroku apps` (to manage applications), `heroku ps` (to manage dynos/processes), `heroku config` (to manage environment variables), `heroku logs` (to stream application logs), and `heroku run` (to execute one-off commands).
PLUGINS
The Heroku CLI is highly extensible through a plugin architecture. Users can install community-developed or custom plugins using `heroku plugins:install
AUTHENTICATION
To use most `heroku` commands, you must first authenticate using `heroku login`. This command opens a browser for web-based authentication or prompts for credentials directly in the terminal, securely storing your session token locally.
HISTORY
Heroku, Inc. was founded in 2007, pioneering the Platform-as-a-Service (PaaS) model. The Heroku CLI has been an integral part of its offering since early on, evolving significantly over time. Initially developed in Ruby, the CLI transitioned to a modern architecture primarily written in Node.js and Go to enhance performance, cross-platform compatibility, and maintainability. This shift allowed for a more robust and faster user experience, keeping pace with the rapid expansion of the Heroku platform and its features. It remains the primary, and often preferred, method for developers to programmatically interact with their Heroku applications.