keyshroud keeps API keys in your self-hosted Vaultwarden and injects them into the commands your AI coding agent runs. Any secret value that shows up in tool output is replaced with <redacted:NAME> before the model reads it.
Free, MIT-licensed, local-only · npm i -g keyshroud
# inside Claude Code or pi, the agent tries to read a key $ echo $GH_TOKEN <redacted:GH_TOKEN> # ...but the key still works $ keyshroud run -- gh api user -q .login dinhkarate # the model saw the name, never the value
You need Node.js 22.18+, the Bitwarden CLI (bw), and a Vaultwarden or Bitwarden account.
npm i -g keyshroud @bitwarden/cli
One CLI, plus plugins for Claude Code and pi, and an MCP server.
bw config server https://vault.example.com
keyshroud doctor
Unlock credentials come from your OS keychain. doctor reports what is missing.
keyshroud run -- claude
Or install the Claude Code plugin: /plugin marketplace add dinhkarate/keyshroud
Every feature works with names and references, never with values.
keyshroud run streams stdout and stderr through a redactor. A secret is never split across chunks and slips through, and masking is on by default when output isn't going to a terminal.
pi tool_result and Claude Code PostToolUse hooks scrub tool results, including commands the agent ran without keyshroud. (Claude Code can't rewrite failed calls, so secret-using commands go through keyshroud run.)
keyshroud mcp gives Codex, Cursor and any MCP client secrets_run, secrets_list and secrets_request. None of them return values.
bw:// referencesWrite GH_TOKEN=bw://GitHub/fields/token in a .env.refs file you can commit. References cover passwords, usernames, notes, TOTP codes, URIs and custom fields.
inject renders {{ bw://… }} templates into files only you can read (mode 0600). scan finds leaked values in your repo before you commit.
Runs on the Vaultwarden you already host. No SaaS, no account with us, no telemetry. Adding a secret uses a masked prompt, so the value never enters the chat.
One vault, every coding agent you use. Setup for each is in the docs.
codex mcp add keyshroud -- keyshroud mcp
MCPCursor & Claude DesktopOne mcpServers entry. secrets_run returns masked output.
MCPCline, OpenCode, Gemini CLIAny client that speaks MCP over stdio.
CLIAny shell or CIkeyshroud run -- <cmd> injects env and masks stdout/stderr.
The closest tools, side by side. keyshroud is the only one that keeps values out of the model and off someone else’s cloud.
Your vault, masked agent output, plugins for the agents you use.
op runPolished, but your secrets live in 1Password’s cloud.
op runSelf-hosted too, but it hands values to the model.
Also nearby: varlock (env schemas with log redaction) and dotenvx (encrypted .env files). Neither plugs into agent tool output. As of 2026-10-13.
Redaction is defense in depth, not a sandbox.
auth.json (only references are stored)keyshroud scan)Every key you paste lives on in the transcript, the provider’s logs and every future context window.
.env while debugging and the key lands in the transcriptbw:// references, never values<redacted:NAME>npm i -g keyshroud · No account · No telemetry · MIT