Architecture

How It Works

Capykeys separates metadata from secrets at every layer. Nothing sensitive ever touches disk in cleartext, and nothing leaves your Mac without your explicit action.

In practice: your keys live in the macOS Keychain, encrypted in hardware, and your projects carry capy:// references instead. That is what keeps them away from AI — coding agents and assistants routinely read your repo, .env files, and shell history, and any key pasted there ends up in context windows and logs. A reference is an inert pointer with no secret material, so an agent that finds one learns only that a key exists. The real value is released just-in-time, behind a Touch ID prompt only a person can approve, and a copied key wipes itself from the clipboard 45 seconds later.

High-level architecture

The app and CLI share a single Swift package, CapykeysKit. All Keychain operations go through it.

Storage model

Two files live in your home directory. Only one of them is sensitive.

Copy flow

capy:// references

References are opaque strings that only resolve on the machine where the key exists. They are safe to commit to dotfiles, documentation, or CI configs.

Export / import

CLI resolution

Exactly what leaves your Mac

Capykeys runs no servers that see your data: no sync, no analytics, no telemetry, no account. It makes no network request on its own — every one is something you trigger:

  • Check for Updates — a request to the appcast to see if a newer version exists. Contains no key.
  • Test a key — sends that one key to the provider's own API to check it's valid (testing an OpenAI key calls OpenAI, over HTTPS). This is the only request that ever carries a key, and it goes only to that provider — the same place your own code would send it.
  • Fetch a provider logo — brand logos ship bundled with the app (no network), but for a provider without one you can manually pull its icon: one HTTPS request to that provider's own site, never a third-party icon service. Contains no key.

No request ever sends a key — or anything else from your vault — to Capykeys or any third party. Your vault is a file and a set of Keychain items, nothing more.