# vaultp

> Switch Vault profile

Latest version **0.2.1** (published 2019-07-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install vaultp
pnpm add vaultp
yarn add vaultp
bun add vaultp
```

Provides the commands `_vaultp`, `_vaultp_prompt`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2019-07-31 |
| First published | 2019-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | rick |
| Maintainers | pchikoian |
| Keywords | vault |

## Links

- npm: https://www.npmjs.com/package/vaultp
- Repository: https://github.com/pchikoian/vaultp
- Homepage: https://github.com/pchikoian/vaultp#readme
- Issues: https://github.com/pchikoian/vaultp/issues
- npm.io page: https://npm.io/package/vaultp

## Dependencies (1)

- [inquirer](https://npm.io/package/inquirer.md) ^6.5.0

## Recent versions

- 0.2.1 (latest) — 2019-07-31
- 0.2.0 — 2019-07-30
- 0.1.3 — 2019-07-30
- 0.1.1 — 2019-07-29
- 0.1.0 — 2019-07-29
- 0.0.7 — 2019-07-29

## README

# 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

```sh
npm install -g vaultp
```

Add the following to your `.bashrc` or `.zshrc` config
```sh
alias vaultp="source _vaultp"
```

## Usage
```sh
vaultp
```

or

```sh
vaultp default
```

## Shell prompt
```sh
function vault_prompt {
  local profile="${VAULT_PROFILE:=default}"

  echo "%{$fg_bold[blue]%}vault:(%{$fg[yellow]%}${profile}%{$fg_bold[blue]%})%{$reset_color%} "
}
```

```sh
PROMPT='OTHER_PROMPT_STUFF $(vault_prompt)'
```

## Authors

Created by [rick lin](https://github.com/pchikoian) with inspiration from [awsp](https://github.com/johnnyopao/awsp)

---
_Source: https://npm.io/package/vaultp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
