vault-cli
v0.0.13
Published
CLI for HashiCorp's Vault
Downloads
7
Readme
Vault CLI
CLI for HashiCorp's Vault.
Assumptions:
- Requires Node >= 7.10.1. If you need support for Node v4.8.4 and above, use version 0.0.12 of the Vault CLI -
npm install [email protected]
. - GitHub and Token are the only supported Auth Backends.
- Your secret endpoint URL is -
VAULT_ADDR/v1/secret/project/environment
.
Install
$ npm install vault-cli -g
Usage
Add environment variables:
$ export VAULT_ADDR=ADDRESS_TO_THE_VAULT_SERVER
$ export VAULT_AUTH_TOKEN=YOUR_VAULT_TOKEN
$ export VAULT_AUTH_METHOD=AUTH_METHOD
VAULT_AUTH_METHOD
must be eithertoken
orgithub
Help
$ vault-cli help
Read ALL Secrets
$ vault-cli PROJECT ENVIRONMENT read
Want to create a .env file in the current directory?
$ vault-cli PROJECT ENVIRONMENT dotenv
Add a SINGLE Secret
$ vault-cli PROJECT ENVIRONMENT add SECRET_NAME SECRET_VALUE
Update a SINGLE Secret
$ vault-cli PROJECT ENVIRONMENT update SECRET_NAME NEW_SECRET_VALUE
Remove a SINGLE Secret
$ vault-cli PROJECT ENVIRONMENT remove SECRET_NAME