HCP CLI
The hcp
CLI lets you administer HashiCorp Cloud Platform (HCP) resources and
services. You can interact with hcp
directly or integrate it in scripts to
automate your workflows. The HCP CLI is available across most platforms and lets
you efficiently execute common platform tasks and manage HCP resources at scale.
Installation
Refer to the installation guide for instructions on installing the HCP CLI.
Getting started
To get started with the hcp
CLI, first login to your account:
This will open a browser to allow you to interactively login. For other ways to
login, refer to the hcp auth login
command
reference.
After logging in, configure the CLI to interact with your HCP organization and project. This command will interactively prompt you to select the organization and project.
Once you have selected the HCP organization and project, you can use the HCP CLI to manage the resources for that project. If you want to quickly run a command against a different project, pass the --project
flag to
the command.
You have configured the HCP CLI! To verify, retrieve a list of HCP organizations you have access to.