---
title: "Vault"
description: "Mimir's palette-only Bitwarden panel: unlock, search, copy one field, lock and the session security model."
canonical_url: "https://mimir.atnatewos.dev/docs/vault"
markdown_url: "https://mimir.atnatewos.dev/docs/vault.md"
last_updated: "2026-12-06"
x_farming_labs_generated_preamble: true
---

# Vault
URL: /docs/vault
LLM index: /llms.txt
Description: Mimir's palette-only Bitwarden panel: unlock, search, copy one field, lock and the session security model.

# Vault

The Vault is a separate Bitwarden integration. It is reached **only through the
command palette** (`Alt+P`, then `vault`): there is no Vault tab, no `Alt` slot, no
rail and no section. It has no configuration of its own and writes nothing to
disk.

The integration is the `bw` CLI. The CLI owns login, sync and the encrypted
store; Mimir is a keyboard-first view over it that copies one field at a time.

## Requirements

- The Bitwarden CLI on `PATH`:

  ```sh
  snap install bw
  # or
  npm install -g @bitwarden/cli
  # or unpack the release zip and put `bw` on your PATH
  ```

- A logged-in account. Run `bw login` once in Terminal (or anywhere); Mimir does
  not collect credentials for login.

`MIMIR_BW` may name a specific binary when `bw` is not on `PATH`.

If `BW_SESSION` is exported when Mimir starts, that session belongs to the
shell: Mimir reads with it but never runs `bw lock` or `bw unlock` against it.
If it expires, the panel explains the situation and asks you to refresh the key
in that shell and restart Mimir. It does not offer a password unlock there,
because a new `bw unlock` would rotate the session it inherited.

## Using it

| Step | What happens |
| --- | --- |
| Palette → `Vault: Bitwarden secrets…` | Opens the panel and reads `bw status` |
| `BW_SESSION` set | Use the shell's session read-only; no password prompt and no lock |
| Locked, no `BW_SESSION` | Type the master password, `Enter` to unlock |
| Unlocked | The item list opens; `/` filters locally |
| `Enter` / `u` / `t` | Copy the password / username / one-time code |
| `l` | Lock a session Mimir created; an inherited session is left alone |
| `Esc` | Close the panel (an unlocked session stays in memory for this window) |

List keys: `j`/`k` or arrows move, `Enter` copies the password, `u` the username,
`t` the TOTP code, `/` filters, `r` reloads, `l` locks, `Esc` closes. In the
filter, typing narrows the list, `Enter` copies the selected password and `Esc`
returns to the list.

The panel shows every item type (login, note, card, identity) with name, username
and host. Notes, cards and identities have no password field to copy; `bw` reports
that and the panel shows the message.

Pasting the master password works. The panel blurs whatever had focus behind it
before it opens, so a paste cannot fall through into a shell or an editor.

## Security model

- **Nothing is stored.** A session key Mimir creates exists only in Mimir's
  memory; an inherited `BW_SESSION` stays in the environment where it already
  lived. No file, log, notice or config entry contains either, and closing
  Mimir ends its own key.
- **The master password never enters a widget.** The unlock screen is drawn from
  a length counter; the password is held in a ref and passed to `bw` through its
  environment (`unlock --passwordenv`), not through the command line, so it does
  not appear in argv. A same-user process can still inspect the child's
  environment while `bw` runs; that is the limit of a CLI-based unlock.
- **Session keys travel by environment, never argv.** Reads and locks pass the
  key to `bw` in the child environment. Mimir never writes it to a file, log or
  config entry.
- **Searches see summaries only.** `bw list items` is filtered down to name,
  username, host and whether a TOTP exists. Passwords, notes and TOTP seeds are
  dropped before anything reaches the UI.
- **Secrets are read one at a time.** A copy runs `bw get <field> --raw`, writes
  the value to the clipboard and forgets it. The value is never rendered and
  never kept in state.
- **The clipboard is the boundary.** Whatever you copy lives in the clipboard
  (and possibly a clipboard manager) until it is replaced. Mimir does not clear
  it; on a remote shell the copy may use OSC 52 and end up in the terminal's
  clipboard.
- **Sessions have an owner.** A key Mimir unlocked is Mimir's and `l` may lock
  it. A `BW_SESSION` inherited from the shell is the user's: Mimir only reads
  with it, never locks or rotates it, and reports an invalid one instead of
  falling back to the password prompt. A transient `bw` failure keeps the
  session and offers `r`; an authentication failure drops a Mimir-owned session
  or rejects an inherited one.

When no `BW_SESSION` is present, unlocking here issues a new key and Bitwarden
invalidates earlier keys. That is the CLI's behaviour; Mimir only does it when
the user explicitly unlocks a session it will own.

## What stays outside Mimir

- `bw login`, `bw logout`, `bw sync` and account or server changes.
- Editing, creating, deleting, sharing and attachments.
- Auto-fill and browser integration.
- Storing secrets anywhere in Mimir, the config, workspace state or notes.

If `bw` is missing the panel says so instead of pretending to unlock. If the
account is not logged in it points at `bw login`. Missing tools are reported
where they are used, never faked.

A `FetchError` while logging in or unlocking means the CLI could not reach
Bitwarden; it is not a rejected password or code. The Node runtime packaged
inside `bw` trusts its own roots, so it rejects certificates the system already
trusts. Mimir starts `bw` with `NODE_EXTRA_CA_CERTS` pointing at the system
bundle, and a shell started from Mimir inherits the same variable, which is why
`bw login` works there too.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
