15 unstable releases (5 breaking)

new 0.6.2 May 16, 2024
0.6.0 Mar 25, 2024
0.3.0 Jul 29, 2023
0.2.0 Mar 8, 2023

#391 in Database interfaces

Download history 105/week @ 2024-02-12 197/week @ 2024-02-26 25/week @ 2024-03-04 93/week @ 2024-03-11 116/week @ 2024-03-25 28/week @ 2024-04-01 103/week @ 2024-04-08 143/week @ 2024-05-13

143 downloads per month


678 lines


Rust CLI and library for encrypting keys and values using client-side encryption with AWS KMS keys.

Usage: vault [OPTIONS] [COMMAND]

  delete, -d, --delete  Delete an existing key from the store
  describe, --describe  Describe CloudFormation stack parameters for current configuration
  exists, -e, --exists  Check if a key exists
  all, -a, --all        List available secrets
  lookup, -l, --lookup  Print secret value for given key
  store, -s, --store    Store a new key-value pair
  info, -i, --info      Print region and stack information
  help                  Print this message or the help of the given subcommand(s)

  -b, --bucket <BUCKET>            Override the bucket name [env: VAULT_BUCKET=]
  -k, --key-arn <KEY_ARN>          Override the KMS key arn for storing or looking up [env: VAULT_KEY=]
  -r, --region <REGION>            Specify AWS region for the bucket [env: AWS_REGION=]
      --vault-stack <VAULT_STACK>  Optional CloudFormation stack to lookup key and bucket [env: VAULT_STACK=]
  -h, --help                       Print help (see more with '--help')
  -V, --version                    Print version

ANSI color output can be disabled by setting the env variable NO_COLOR=1.


Using the shell script:


Note: works on Windows too, use Git for Windows Bash to run it.

Manually from terminal:

# debug
cargo build
cargo run
# release
cargo build --release
cargo run --release
# pass arguments
cargo run --release -- --help

Depending on which build profile is used, Cargo will output the executable to either:



You can install a release binary locally using cargo install.

Use the shell script:


The script calls cargo install and checks for the binary in path. If you run the command directly, note that you need to specify the path to the directory containing Cargo.toml. From the repo root you would do:

cargo install --path rust/

Cargo will put the binary under $HOME/.cargo/bin by default, which you should add to PATH if you don't have it there, so the binaries installed through Cargo will be found.

If you still get another version when using vault, you will need to put the cargo binary path $HOME/.cargo/bin first in path.

Format code

Using rustfmt

cargo fmt

Lint code

Using Clippy

cargo clippy
cargo clippy --fix

Update dependencies

cargo update


~720K SLoC