Status. Scan, import and undo, kj add, kj get, kj run, the tray app and kj license activate work today. Pro auto-fill and reminders also work and are labelled Pro below.

KeyJar

Key vault for people who use coding agents

Find every copy of every API key.

KeyJar scans your machine for stray AI and API keys, moves them into one encrypted vault, and swaps each .env value for a kj:// reference.

example output, fake keys
$ kj scan ~
Scanned 48,211 files in /home/dev in 6.2s

ANTHROPIC   sk-ant-api03-••••••••••Xq4f   138 files
  ~/code/agent-lab/.env                    line 3
  ~/code/agent-lab/.claude/settings.json   line 12
  ~/notes/keys.md                          line 41
  ~/.zsh_history                           27 hits
  … 134 more
OPENAI      19 keys  sk-proj-••••         235 files
OPENROUTER  sk-or-v1-••••••••8d21           9 files

22 keys across 386 locations, 4 providers
→ kj import  vault them and rewrite .env files
~/code/agent-lab/.envafter import
- ANTHROPIC_API_KEY=sk-ant-api03-••••Xq4f+ ANTHROPIC_API_KEY=kj://anthropic/agent-lab- OPENROUTER_API_KEY=sk-or-v1-••••8d21+ OPENROUTER_API_KEY=kj://openrouter/personal  DATABASE_URL=postgres://localhost/lab
$ kj run -- npm run dev
every kj:// value resolved, then npm starts
ready on http://localhost:3000

Key values above are fake and masked. The output is an example: counts, paths and wording on your machine will differ.

Detects keys from
  • Anthropic
  • OpenAI
  • OpenRouter
  • Gemini
  • GitHub
  • Hugging Face
  • and any other provider, by slug

Sound familiar?

“Gitignored, never pushed, stolen anyway.”
r/devops
“the key was never in my code. How could it leak?”
r/ClaudeAI
“Is there any way to get an alert when your API keys expire”
r/CommandCode

One developer reported an agent finding a stray key in an old .env and spending $1,180 with it overnight. The risky copies are the ones you forgot: old .env files, notes, shell history, configs an agent wrote for you. You can't rotate what you can't find.

How it works

Three commands, five minutes.

Everything runs on your machine. No account and no cloud. Your keys are never sent to KeyJar.

01 works today

Scan

KeyJar walks your home folder and groups every hit by key, so one key in 138 files shows up as one key with 138 locations. It changes nothing until you say yes.

$ kj scan ~
02 works today

Import and replace

Each key goes into the vault. Its .env values become kj:// refs, file by file, after you approve each one. Every other copy is listed for you to clean up. kj undo reverses an import.

$ kj import
03 works today

Run

Start your app or agent through kj run. It sets only the variables whose value is a kj:// ref and leaves the rest to your app's own .env loader. If a ref fails to resolve, or two env files disagree about one, the command does not start.

$ kj run -- claude

What you get

One jar, every key, clearly labelled.

The free app does the vault, the scan, import and undo, kj run and the tray app. Pro adds the parts that watch your keys for you.

Free works today

No plaintext keys on disk

One encrypted vault file (XChaCha20-Poly1305). The key that opens it lives in your OS keychain, not next to it.

vault.kjvencrypted
vault keyOS keychain
Free works today

Find every copy, replace it with a ref

Scan rules grouped by key, every location listed, then kj://provider/label written in place where it is safe to, with kj undo to take it back.

sk-ant-api03-••••Xq4f → kj://anthropic/agent-lab

Most stray copies (shell history, JSON, source) are listed for you to clean up by hand, never rewritten.

Pro Pro

Know when a key dies

Created, last resolved and expiry on every key. One desktop notification summarises what needs you: 14, 3 and 0 days before a key expires, and when it has sat idle for 90 days. kj remind shows the list and kj remind --check runs the same check from cron.

Auto-fill reads OpenRouter (expiry, usage, limit), GitHub (expiry), xAI (created date) and Hugging Face (created date, expiry). You turn it on once, and kj autofill off turns it off. For other providers you type the date once.

Free works today

Works with your agents

Uses each tool's own key hook, so there is no plugin to install and no client code to change. Claude Code's apiKeyHelper calls kj get. Anything that reads .env works with kj run.

"apiKeyHelper": "kj get kj://anthropic/agent-lab"
Free works today

Add a key in two seconds

kj add reads the key from a hidden prompt or stdin, never from an argument, so it stays out of shell history. The tray app adds quick add on Ctrl+Shift+K (not available on Wayland), a key list, a detail view and a scan.

Security, plainly

What we protect, and what we don't.

A key tool that oversells its security is a liability. Here is the actual threat model.

KeyJar protects against

  • Stray copies. Old .env files, notes, shell history and agent configs that still hold a live key. Scan finds them.
  • Plaintext at rest. A .env file holding a kj:// ref carries no key, so a backup or synced copy of it leaks nothing.
  • Forgotten keys. See every key, where it lives and when it was last resolved, so idle ones get revoked.
  • Surprise expiry. Reminders before a key stops working, not after your agent fails at 2am Pro

KeyJar does not protect against

  • The process you run. kj run puts the real key in that process's environment. An agent you start that way can read it, and so can anything it spawns.
  • Malware running as you. Code with your user's access can ask your keychain, the same as KeyJar does.
  • Keys that already leaked. If a key is in a public repo or a transcript, rotate it at the provider. Importing it doesn't un-leak it.
  • Spend. KeyJar doesn't cap usage. Set a spend limit at each provider too.

Read the full threat model →

Pricing

Free core. Pro once, no subscription.

The launch price goes up as buyers come in. Buy early, pay less, keep it.

KeyJar core

$0free
  • Encrypted vault, key in OS keychain
  • kj run, kj get and the public kj:// spec
  • kj scan, kj import and kj undo
  • Tray app with quick add, list, detail and scan
Download free

KeyJar Pro

Launch tier 1 of 4
$19one-time, first 50 buyers
  • Everything in core
  • Expiry and idle reminders Pro
  • Provider metadata auto-fill, opt-in Pro
  • Browser capture when you create a key v1.1
$19
first 50
$29
next 100
$39
next 200
$49
after
Get Pro for $19

Auto-fill and reminders are in the current release. You get a license key to enter with kj license activate. Covers every v1.x release plus one year of updates. Keep using your version after that.

FAQ

Straight answers.

Does KeyJar send my keys anywhere?

No. The vault stays on your machine and no key is ever sent to KeyJar. Two network calls exist. Activating or re-checking a Pro license key contacts the payment provider. Pro auto-fill, which is off until you say yes, sends a key only to the provider that issued it (OpenRouter, GitHub, xAI or Hugging Face) to read its dates. kj autofill off stops it. Details.

Can my agent still read the key?

If you hand it the key, yes. kj run resolves refs into that process, so the agent can use and read them. What KeyJar removes is the plaintext copies lying on disk.

I already use 1Password. Why this?

1Password keeps what you save in it. KeyJar starts from the copies you never saved: it finds them and rewrites .env files to refs. Pro adds reminders for keys that go idle or are about to expire.

What does import change on my disk?

Only a dotenv line whose whole value is the key is rewritten, and you approve it first. Places KeyJar can't safely rewrite, like shell history, are listed for you to clean up by hand. kj undo reverses an import. It puts the key values back in the files, so a plaintext copy returns.

Is the kj:// format locked to KeyJar?

No. It is a short public spec, on this site under Specs. Any tool can write references and resolve them by calling kj.

How do I know the download is genuine?

Every release lists a SHA-256 checksum for each file. Compare it with the file you downloaded before you run it. The steps are in Docs, verify a download. A checksum on the same page as the file only catches a corrupted download, so keep the checksum from a second place if you can.

What happens after the year of updates?

You keep your version and every v1.x release forever. Renewing later is optional.

Run one scan. See where your keys are.

Free to download, with a checksum for every release.

Download KeyJar
$ curl -fsSL https://keyjar.dev/install | sh