Open-source kdbx tool lets AI agents use secrets without leaking them

nabsha · reddit · 2026-08-01

A developer noticed Claude Code reading .env files, exposing API keys in transcripts on remote servers. He built an open-source tool called kdbx that stores secrets in a KeePassXC vault outside the repo, injecting them into child processes via kdbx run -- npm test without printing anything. Agents can run commands needing credentials, but writing, revealing, or exporting secrets stays with the human. The tool stops accidents, not attacks. The author compared 1Password, Doppler, Infisical, sops, age, direnv, and pass, choosing KeePassXC for local, offline, out-of-repo, and per-project layout.

Original post →

More from coding & agent

coding & agent channel →