Guide · Safari

Save an API key straight from the provider's page

A provider shows you a new key once. You copy it, paste it somewhere to keep it, and hope the clipboard and that somewhere stay private.

In shortTurn on Latchkey for Safari. When a page shows a new key, press Save to Latchkey, name it, and approve. Later, the extension can fill it into a key field on the right site after you approve with Touch ID.

Why new keys end up in the wrong places

Most services only issue keys in their dashboards, and show the value once. The fast path is copy, paste into a note or a chat, then into an env file. Each stop is another copy of a secret, and some of them sync or get backed up.

Latchkey for Safari recognises the key on the page and keeps the value in the page until you press Save, when it goes to the app. Spotting happens in the page.

Save a key

  1. Turn the extension on

    Open Safari, then Settings, then Extensions, and enable Latchkey. Safari asks you to allow it on each site, or on all of them. Its toolbar button says whether it can reach Latchkey and lists what it found on the page. Use Safari's website permissions to choose which sites it may inspect.

  2. Make the key at the provider

    Go to the provider's key page and create the key. The extension knows about twenty or so providers, including Stripe, OpenAI, Anthropic, GitHub and npm. It also catches private keys, database URLs that contain a password, and long random values labelled as a secret or token. It skips masked values, examples, Stripe and PostHog public keys, and bare hashes.

    When the page says it won't show the key again, the save panel opens by itself, once. Otherwise a Save to Latchkey button appears on the box holding the key, for strong matches.

  3. Choose a place and a name

    The panel opens beside the key, not over it. Choose where it goes, either shared or a project's environment, and give it a name. A live or test key is matched to production or development when it can be. Press Save to Latchkey.

  4. Approve and copy the reference

    The app asks you to approve, and shows the page's site. After the save, the panel shows the latchkey:// reference, ready to copy, and a new item's note says where it came from. Saving over an existing item keeps the old value in its history.

    Example reference
    STRIPE_KEY=latchkey://shop/development/STRIPE_KEY
  5. Fill it back in later

    Click into a field that expects a key, token or secret, and a Latchkey badge appears in it. Pick an item from the list, approve with Touch ID, and the value goes into that field. Fill asks every time.

If it missed the key

Select the text, Control-click, and choose Save Selection to Latchkey. Less certain finds aren't marked on the page. The toolbar button shows a count, and its panel lists them with a short preview, never the value.

What this doesn't do

See what the extension can and can't reach. To use the saved key in a project, keep references in your env files.

Related