Skip to main content

Install Piiano CLI

Piiano Vault CLI is available as a standalone binary for Linux and macOS, as well as a container image.

Standalone binary

Binaries for Linux and macOS are available as tarballs in the vault-releases repository.

You can install the binary using Homebrew for macOS or Linux like this:

brew install piiano/tap/pvault-cli

Container image

Where your Vault containers are in-accessible for exec-ing, use the containerized image of the CLI hosted at piiano/pvault-cli.

First, pull the image:

docker pull piiano/pvault-cli:1.11.1

To simplify working with the pvault CLI, create an alias for it:

alias pvault="docker run --rm -i --add-host='host.docker.internal:host-gateway' -v \$(pwd):/pwd -w /pwd piiano/pvault-cli:1.11.1"
caution

Docker Desktop displays a warning when mapping the home directory to a container.

Therefore, you should run this command from a different directory or replace the \$(pwd) in the alias with the desired local directory (e.g., /tmp).

You can now check the status of your Piiano Vault container to make sure it's running correctly:

pvault status

Environment variables

Setting environment variables for the CLI (see Global flags) is done by adding the -e flag to the docker command:

docker run -rm -i -v $(pwd):/pwd -w /pwd  -e PVAULT_ADDR=http://localhost:8123 piiano/pvault-cli:1.11.1

TLS

To connect to local Vault installations listening on TLS from the same host, you can set the address as following:

docker run -rm -i -v $(pwd):/pwd -w /pwd piiano/pvault-cli:1.11.1 --addr https://host.docker.internal:8123 status