Connect Claude Code or ChatGPT Codex to your vault
One paste into your terminal and your coding agent knows how to send keys to your vault. Pick your agent (Claude Code or ChatGPT Codex), then Project (this repo only) or Global (every session, everywhere).
Not sure which one to pick?
Just trying it out? → Option 3 (paste a prompt, nothing to install).
Claude Code, for keeps? → Option 1. ChatGPT Codex? → Option 2.
Want the agent to create & save keys on its own? → Option 5 (the MCP server).
What happens when you paste the command
Each install command (Options 1, 2 and 4) does just two things:
(1) downloads a plain-text instruction snippet from
keyvault-sidekick.pages.dev/snippets/..., and
(2) writes it to a file your coding agent reads (Claude Code's
CLAUDE.md, Codex's AGENTS.md). The fetched content
is data, never executed. To see exactly what will be added before
you run it, paste just the irm URL (or curl URL) part on its
own — it prints the text without changing anything.
Option 1 · Claude Code · CLAUDE.md
RECOMMENDED
Claude Code reads CLAUDE.md on every session.
One install command appends the KeyVault snippet so Claude
knows the URL format forever.
Manual install — copy + paste yourself
View the raw snippet at /snippets/claude-md.txt,
or copy the content below into ./CLAUDE.md or ~/.claude/CLAUDE.md:
Option 2 · ChatGPT Codex · AGENTS.md
RECOMMENDED
ChatGPT Codex CLI reads AGENTS.md on every session.
Same install pattern as Option 1, just into Codex's memory file
(./AGENTS.md or ~/.codex/AGENTS.md).
Manual install — copy + paste yourself
View the raw snippet at /snippets/agents-md.txt,
or copy the content below into ./AGENTS.md or ~/.codex/AGENTS.md:
Option 3 · Paste in chat EASIEST · ONE SESSION ONLY · ANY AGENT
Try-it-out path. No file editing — paste once at the start of a Claude Code or ChatGPT Codex chat. Works for that session only.
Want it prefilled for a project?
The snippet below uses <N>/<V> placeholders.
For a complete, project-specific version with the project name and
its key names already filled in, open that project in your vault and click
🔌 Connect to AI — pick your agent and copy. Secret values are never
included.
/clear) and paste as your first message.
Preview what you're copying
Option 4 · Slash command POWER USER CLAUDE CODE ONLY
Adds a /keyvault-save KEY_NAME value [type] [project]
command to Claude Code. Great muscle memory.
(ChatGPT Codex CLI doesn't have user-defined slash commands yet —
stick with Options 2 or 3 for Codex.)
Manual install
View raw snippet at /snippets/slash-command.md.
Save into ./.claude/commands/keyvault-save.md (project) or
~/.claude/commands/keyvault-save.md (global).
Option 5 · MCP server FULL AUTONOMY LOCAL AGENTS
The hands-free path. Install a local MCP server and your
agent reads, writes, generates, and exports keys directly —
no prefill URL, no clicking Save. "Create a Stripe key and save it to
KeyVault project ITIL" just happens. Works with
Claude Code, Claude Desktop, Cursor, and Codex CLI.
Secrets stay on your machine — the server runs locally over a local
encrypted vault file (same AES-256-GCM format as this app). Note: when the agent
reads a key through the MCP, that value appears in the chat (that's how it uses
it). To deploy a secret without it ever showing in the chat, use the
keyvault CLI further down.
Requirements
Node.js 18+ and your KeyVault master password. The
server is one zero-dependency file — clone the repo and point your
agent at mcp/index.mjs.
PUT-YOUR-PASSWORD-HERE with your real
KeyVault master password — that exact placeholder is rejected, so it can't be run
as-is. --scope user registers it globally, so it works from every folder (not
just this one):
It passes your password to the server as an environment variable (so it isn't part of the AI's chat), but it does sit in plain text in Claude Code's config file — see Harden it below to keep it out of the config.
Harden it (optional)
Keep the password out of the config — point at a file only your user
account can read, instead of inlining it:
--env KEYVAULT_PASSWORD_FILE=$HOME/.keyvault-sidekick/password
Create that file (macOS/Linux):
umask 177 && printf %s 'PUT-YOUR-PASSWORD-HERE' > ~/.keyvault-sidekick/password.
On Windows, save it somewhere only your account can read.
Least privilege — add --env KEYVAULT_READONLY=1
and the agent can read, list, and export keys but cannot change
or delete anything. Without it, installing the MCP is like handing
the agent your unlocked vault — it can write and delete every key. (Prefer
values never touching the chat? Use the keyvault CLI below.)
Claude Desktop, Cursor, Codex CLI and the full tool list, security model, and browser ↔ MCP bridge are in the MCP setup guide ↗.
Set up with the wrong password, or won't connect? In your agent, just say “run keyvault_status” — it checks whether your password opens the vault (no secrets shown). Then see the troubleshooting guide ↗ — fix a typo'd password, re-key the vault, or reinstall.
Deploy secrets without exposing them
The same package ships a keyvault CLI that writes values to
stdout only — so they pipe straight to their destination
and never enter the AI's chat/transcript.
One-time setup — put the CLI on your PATH and give it your password (once per terminal):
cd keyvault-sidekick/mcp && npm link
export KEYVAULT_PASSWORD=PUT-YOUR-PASSWORD-HERE
Then pipe a value straight to its destination:
keyvault get Velocity STRIPE_SECRET | wrangler secret put STRIPE_SECRET
keyvault export-env Velocity > .dev.vars
✓ Test it now
After installing any option above, start a new chat in
Claude Code or ChatGPT Codex
(or use /clear) and paste this:
The agent generates the value, runs start "" "URL"
(or open / xdg-open), and your browser pops the prefill
modal with the key filled in. Click Save key and check your vault.
irm URL | Add-Contentandcurl URL >> fileonly write the response to a file — they never execute it. This is data, not a remote script.- The URLs point to
keyvault-sidekick.pages.dev/snippets/..., the same origin that serves the vault app itself. If you trust this site to run your vault, fetching plain-text instructions from it is the same trust level. (Your secrets are never stored on the server — they stay encrypted in your browser.) - You can preview the exact text before running:
irm https://keyvault-sidekick.pages.dev/snippets/claude-md.txt - The snippets contain no secrets, no keys, and no executable code — only instructions for Claude.
- Running the install twice will duplicate the entry.
Add-Contentappends;Set-Contentoverwrites. Adjust if you re-run.