LatchkeyLatchkey
← Docs

OpenAI + Latchkey

Integration notes

Keep OpenAI API keys off disk as plaintext. Latchkey encrypts them on your machine and gates agent access by name.

Typical env names

  • OPENAI_API_KEY

Setup

  1. Install the CLI. npm i -g @stitchaxis/latchkey (always use the @stitchaxis scope; unscoped latchkey is a different package)
  2. Add the key by name. latchkey add OPENAI_API_KEY (paste when prompted; the value is never printed back)
  3. Allowlist the project. List OPENAI_API_KEY in .latchkey.toml so only that project may request it
  4. Run through the gate. latchkey run -- your-agent-or-script so the child process receives the env after you approve

Honest notes

  • The open-access scan command finds OpenAI-shaped strings offline: npx -y @stitchaxis/latchkey@latest scan
  • Latchkey does not call OpenAI for you. It only stores and injects the key you already have.
  • Once injected, the child process can still read its own environment. That residual risk is documented on /security.

More tools: Anthropic · Cursor · Claude Code · Vercel · Supabase · Stripe · GitHub. Pricing and licences: pricing.