Commands (CLI)
HCP Vault Secrets provides a command-line interface (CLI) that wraps common functionality and formats the outputs.
Each command is represented as a command or subcommand, and there are a number of command and subcommand options available: HTTP options, output options, and command-specific options.
Download and install CLI
The HCP Vault Secrets CLI tool is available for download from releases.hashicorp.com/vlt. Refer to the Install HCP Vault Secrets CLI tutorial for a step-by-step instruction.
Usage
For more information, examples, and usage about a subcommand, click on the name of the subcommand in the sidebar or one of the links below:
Basic command workflow
To start managing your secrets using HCP Vault Secrets CLI, here are the command execution flow.
Run the
login
command to authenticate with your HCP Vault Secrets account.Initialize and select your target environment with the
config init
command.Use the arrow keys to select your target project.
Create an application using the
apps create
command.Create a secret for the application using the
secrets create
command.Retrieve the secret value using the
secrets get
command.Use the
--plaintext
parameter to retrieve the secret as plain text.
Tip
Refer to the HCP Vault Secrets Quick Start tutorials to learn more.