/plugin-vsp

A plugin for Oh My Fish, help to switch multiple vault endpoint and token easily

Primary LanguageShell

vsp

A plugin for Oh My Fish

MIT License Fish Shell Version Oh My Fish Framework


Enables quick switching between Hasihcorp Vault profiles. If you have multiple vault endpint need to manage. Inspire by @mgoodness.

Prerequisites

  • setup vault profile in your ${HOME}/.vault/credentials like this:
[foot]
vault_addr = https://foot.example.com
vault_token = '1a2b3c4d5e6f7g8h9i'

[bar]
vault_addr = https://bar.example.com
vault_token = '1a2b3c4d5e6f7g8h9i'

Install

$ git clone git@github.com:terrych0u/plugin-vsp.git ~/.local/share/omf/pkg/

Uninstall

rm -rf ~/.local/share/omf/pkg/plugin-vsp

Usage

$ vsp <vault_profile>

Sets $VAULT_ADDR and $VAULT_TOKEN environment variables to the corresponding values from ${HOME}/.vault/credentials.

$ vgp

Echoes $VAULT_ADDR and VAULT_TOKEN.