0.2.1 • Published 5 years ago

vaultp v0.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vaultp - VAULT Profile Switcher

Switch Vault profile easily

Preparation

Setup your profile in ~/.vault/config (create folder if not exists)

config example:

{
  "default": {
    "address": "https://vault.example.com",
    "token": "toke1"
  },
  "profile2": {
    "address": "https://vault2.example.com",
    "token": "toekn2"
  }
}

Setup

npm install -g vaultp

Add the following to your .bashrc or .zshrc config

alias vaultp="source _vaultp"

Usage

vaultp

or

vaultp default

Shell prompt

function vault_prompt {
  local profile="${VAULT_PROFILE:=default}"

  echo "%{$fg_bold[blue]%}vault:(%{$fg[yellow]%}${profile}%{$fg_bold[blue]%})%{$reset_color%} "
}
PROMPT='OTHER_PROMPT_STUFF $(vault_prompt)'

Authors

Created by rick lin with inspiration from awsp

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago