Announcing Heroku CLI Autocomplete for Bash and Zsh

Today we're excited to announce that Heroku CLI Autocomplete for Bash and Zsh is generally available. Heroku CLI Autocomplete makes your workflow faster and more seamless by helping you complete command and flag names when you press the tab key. Autocomplete completes all Heroku CLI commands and will automatically support new commands as they are added. You can also complete values for some flags and args—including apps, pipelines and config vars—so you won't need to run multiple commands to find and cross-reference them.

A GIF showing the Heroku CLI autocomplete in action

We build the CLI first and foremost for human usability; Autocomplete takes usability a step further, making it easier than ever to discover, learn, and interact with each aspect of the CLI.

CLI Autocomplete Features

Below are examples of the three different types of completions. Note that these examples are all in Zsh and that descriptions are not supported in Bash.

Command Name Completion

You can start writing a command and then press tab to see the different possibilities for completing it.

An example of command name completion in a terminal window

Flag Name Completion

Most CLI commands make use of flags to provide additional input. Flags are prefaced with two dashes (--), such as --app. Some commands have many flags and remembering them can be difficult. You can easily view all available flags for each command by typing -- and then the tab key.

An example of flag name completion in a terminal window

Flag Value Completion

Most flags require you to provide a value. For example,--app requires you to specify the name of an app. With Autocomplete, you can complete values for many popular flags, including --app, --pipeline, --space, and --team.

An example of flag value completion in a terminal window

Completion for Config Vars and Add-on Names

You can complete config vars and add-on names when the CLI knows the app. The CLI can infer the app via the git remote or you can provide the app name via a flag.

An example of config var completion in a terminal window

Getting Started

To get started, update your CLI, install the @heroku-cli/plugin-autocomplete plugin and run the setup:

$ heroku update && heroku plugins:install autocomplete && heroku autocomplete

You may choose to run the install and setup commands separately if you prefer:

$ heroku update
$ heroku plugins:install autocomplete
$ heroku autocomplete

The specific instructions you'll receive depend on whether you are using Bash or Zsh. After you finish setup, Autocomplete is ready to use with the tab key.

We are not planning to support shells besides Bash and Zsh at this time.

Autocomplete and oclif

As we announced earlier this year, the Heroku and Salesforce CLIs are built upon an open source framework: oclif. We're incorporating what we've learned developing Heroku CLI Autocomplete into an oclif plugin. oclif developers can learn more about trying out this feature in our oclif Gitter.


We hope you enjoy using Heroku CLI Autocomplete as much as we do. Please send us feedback to

Browse the archives for news or all blogs Subscribe to the RSS feed for news or all blogs.