Install HCP CLI
The hcp
CLI is available as a pre-compiled binary or as a package for several
operating systems.
Homebrew is a free and open source package management system
for Mac OS X. Install the official hcp
CLI
formula from the terminal.
Install the HashiCorp tap, a repository of all of the HashiCorp Homebrew packages.
Install
hcp
withhashicorp/tap/hcp
.Note
This installs a signed binary and is automatically updated with every new official release.
Run
brew upgrade
to upgrade to the latest version.
Verify the installation
Verify the HCP CLI was installed correctly with the hcp
command. This will
return a list of commands and flags you can interact with.
Install tab autocomplete
Note
If you installed the CLI using one of the Linux packages, it will have automatically installed autocomplete.
Install autocompletion for the HCP CLI.
For the autocomplete to take effect, either create a new terminal session or source your terminal configuration.
To uninstall autocompletion for the HCP CLI, use -autocomplete-uninstall
.