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.
First, install the HashiCorp tap, a repository of all of the HashiCorp Homebrew packages.
Now, install hcp
with hashicorp/tap/hcp
.
Note
This installs a signed binary and is automatically updated with every new official release.To update to the latest, run:
Verify the installation
To verify the HCP CLI was installed correctly, try 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.To install autocompletion for the HCP CLI, run:
For the autocomplete to take effect, either create a new terminal session or source your terminal configuration.
To uninstall autocompletion for the HCP CLI, run: