Skip to main content
AI coding agents (Claude Code, Codex, Cursor, …) run your app with whatever command they find: npm run dev, pytest, go run .. By default they expect a local .env file and have no idea your secrets live in Enkryptify, so they either fail with missing env vars or recreate a .env you don’t want. There are two ways to make agents pick up secrets through the Enkryptify CLI automatically. Use either one, or both together.
Both approaches require the CLI to be configured once. Run ek login and then ek setup in your project (see the Quickstart). After that, every command works without further setup.

Approach 1: Bake ek run into your commands

Wrap the commands an agent naturally runs so secrets are injected automatically. The agent keeps calling npm run dev or make test and gets your Enkryptify secrets without knowing Enkryptify exists.
Wrap your scripts in package.json with ek run --:
package.json
Now npm run dev, pnpm dev and yarn dev all run with secrets injected, with no change needed from the agent.
This is the most reliable approach because it doesn’t depend on the agent reading or following instructions. The secrets are wired into the command itself.

Approach 2: Tell your agent to use ek run

Add a short instruction to your agent’s rules file so it prefixes commands with ek run -- and never touches .env files. Pick your agent below for the correct file location, then copy the prompt into it.
Add the following to CLAUDE.md in your project root (create it if it doesn’t exist):
CLAUDE.md
Instructions are advisory. For a guarantee, combine this with Approach 1 so secrets are wired into the commands themselves.

Next steps