← Catalog

pi-ai-vault

pi extension for ai-vault: one machine-wide encrypted secret store, live Bitwarden and Ente Auth. Works in pi and in omp (the omp fork reads the same manifest).

Package

Install

Install with PiG

pig install npm:pi-ai-vault

Install with Pi

pi install npm:pi-ai-vault
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./src/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.14.2 (README.md). PiG does not review it.

pi-ai-vault

中文版

The pi extension for ai-vault — omp installs the same package (omp is a pi-compatible fork; the manifest and tool API are identical, and the only differences are feature-detected at runtime in src/host.ts).

It hands one machine-wide encrypted secret store to your agent: ~/.ai-vault, shared by every agent on the machine. The extension does no cryptography itself; it only holds a session token.

Install

pi install npm:pi-ai-vault          # pi; brings the ai-vault CLI along
omp plugin install npm:pi-ai-vault   # omp; the same package

Then, in that host's session:

/vault init

(A dialog asks for the master password, twice. With a desktop it is the CLI's own window; without one, the host's prompt.)

You can also install straight from the repository: pi install git:github.com/xiaolikt/ai-vault.

Do not install pi-bitwarden or omp-vault as well: they register the same bw_* / vault_* tools. Both are archived.

Tools

ToolWhat it doesModel sees the secret?
vault_listlocal store metadatano
vault_getread one: local store first, then Bitwarden; a Bitwarden hit follows bitwarden.import (ask / import / read once)yes, user-approved on the spot
vault_addstore one, any Bitwarden type (login, note, card, identity, sshkey, bankaccount, driverslicense, passport); secret fields are typed in a dialogno
vault_importcopy Bitwarden logins into the local store (asks first)no
bw_list / bw_run / bw_clipboard / bw_reveallive Bitwarden through the bw CLIno (bw_reveal excepted)
bw_injectinject into the bash env (pi only; omp does not register it)no
ente_listEnte Auth entry metadatano
ente_codeone current TOTP/Steam code, confirmed per callyes, user-approved on the spot

Commands

/vault init | unlock | lock | status | list | add | remove
/vault mode [never|time|session]      unlock policy (switching needs the master password)
/vault settings [key value]           bitwarden.*, ente.*
/vault ente-key                       save Ente's ENTE_CLI_VAULT_KEY
/vault grant <name> [minutes] | revoke <name|all> | audit [n]
/vault import <bitwarden.json> | import-bw [search]
/bw status|unlock|lock|clear

Unlock policies

When the local store asks for its master password is a per-machine setting (/vault mode, switching needs the password):

ModeBehaviour
everyasks on every call; nothing is kept that could open the store
nevernever asks, and reads open no window — the "the agent may use these freely" passwords

By default (time) a read opens no window either: the master password that unlocked the session is the approval, and every read is audited. /vault confirm on puts a window on every read. | time | asks again N hours after the unlock (default 8) | | time (default, 4 h) | once, then every pi/omp process on the machine uses that unlock for N hours |

vault_get searches Bitwarden on a local miss; a hit is shown to you, then read once, then — following bitwarden.import — offered for import into ai-vault (so it never touches Bitwarden again) or used just this once. So only the passwords you approve for import ever enter ai-vault.

Bitwarden's own master-password prompts follow their own switch (bitwarden.unlock), and Ente's keychain is bypassed by ente.unlock — see /vault settings.

Ente

The ente CLI logs in once (ente account login --app auth); the extension is only its client: ente_list is metadata, ente_code confirms every time.

To skip the keychain entirely: ente vault key generate → /vault ente-key → /vault settings ente.unlock never. The key is sealed by ai-vault.

Security boundary, in one paragraph

The model's bash can find a session token and even list with one you opened by hand — but it cannot sign a read confirmation (the signing secret lives only in the extension process), cannot edit a token file (HMAC'd; an edit voids it), and cannot get a free grant (that costs the master password). Full details in the repository README, Security.

MIT