Let AI coding tools use your API keys without seeing them

An AI coding tool that can read your project can read its .env file, and anything it reads can end up in a conversation, a log or a commit. You can give it the names and keep the values.

Updated October 2026.

Where keys leak with agents

The general idea

Give the agent names, not values. It can know that STRIPE_SECRET_KEY exists and is needed, and start your app with it, without ever reading it:

  1. Keep values out of the project folder, so there’s no .env to read.
  2. Let the agent run commands through a tool that adds the variables to that one process.
  3. Approve those commands yourself, and keep live keys out of reach.

Password managers and hosted secret managers have CLIs that do part of this (op run, doppler run, infisical run). What changes between them is where the values live and who approves each use.

How Slinky does it

This keeps keys out of the model and out of files. It doesn’t stop a program you approved from using the key it was given.

Questions

Does this make running an agent completely safe?

No. Slinky keeps values out of the model’s context and out of files. A command you approve still runs with the keys it was given, and a determined program could misuse them. Slinky isn’t a sandbox.

Which tools work with Slinky?

Claude Code, Cursor, Codex and Claude. Connect them in Settings › Command Line & Agents. Any tool that can run a terminal command can use slinky run.

What if the agent needs a key I haven’t saved?

It asks Slinky, and Slinky opens Add Item with the name filled in. You paste the key there, not in the chat.

More guides

Give your secrets a home.

Free, about 6 MB, and nothing leaves your Mac.

Download for Macv2.0.0 · macOS 15 Sequoia · Apple silicon ·