Book a 90-minute product workshop led by HashiCorp engineers and product experts during HashiConf Digital Reserve your spot

Getting Started

Advanced Shell Configuration

»Command Completion

The vault binary includes command-line completion for subcommands, flags, and path arguments where supported for the Bash, Fish, or ZSH shell. Other shells are not currently supported.

Use the vault command to install command-line completions like this:

$ vault -autocomplete-install

The command is expected to return no output upon successful execution.

This installs the helpers in your shell configuration file depending on the type of shell you use:

  • Bash: ~/.bashrc
  • Fish: ~/.config/fish/completions/
  • ZSH: ~/.zshrc

Once you have installed the completions, you should restart your terminal session or reload the shell to begin using them.

$ exec $SHELL

Now when you type vault followed by pressing tab, Vault will suggest command options:

agent      auth       delete     lease      login      operator   plugin     print      secrets    ssh        token      write
audit      debug      kv         list       namespace  path-help  policy     read       server     status     unwrap

This extends into sub-commands as well; for example, here is what typing vault operator followed by pressing tab suggests as sub-commands:

generate-root  key-status     raft           rotate         step-down
init           migrate        rekey          seal           unseal

These completions are helpful for beginners to discover commands and also handy for advanced Vault users who frequently need to quickly and accurately execute more complex commands.

»Next Steps

If you visited this page from the Install Vault section of the Getting Started guide, then your installation of Vault is complete. Please proceed to Starting the Server to continue getting started with Vault.

»Help and Reference