Most coding-agent setups end the same way: the agent runs with every key in your .env, for as long as the session lives. A preview builder that needs two staging variables for ten minutes ends up holding your production keys indefinitely.
I built EnvsAI to make the opposite the default: a worker gets only the env vars it needs, for one job, and you can see every read.
The flow
- Put your variables in an EnvsAI project, split by environment (development, staging, production).
- The orchestrator (or the agent itself) asks for named keys and a lifetime:
node .envsai/envs-access.mjs request preview-builder DATABASE_URL,REDIS_URL 15
- You approve the request in the Agents page. For sensitive variables you can require a code from your authenticator app.
- The worker runs with exactly those two values injected into its process. Nothing is written to disk:
node .envsai/envs-access.mjs run-approved REQUEST_ID -- python worker.py
- When the command exits, the grant is revoked. It also expires on its own.
What you get as the owner
- An activity feed per project: which credential read which variable, when, and from which environment.
- One-time delivery for protected values: a second read of a protected key is denied (HTTP 403) and shows up in the feed.
- One-click revoke for any grant.
Setup
From a repository root with Node.js 20+:
curl -fsSLo envs-init.mjs https://envs.ai/downloads/envs-init.mjs
node envs-init.mjs --project preview --environment staging
It reads names from .env.example, writes the project connection under .envsai/, and gives you a runner. There are recipes for Node.js, Python, Go, Java, .NET, Ruby, PHP and Rust, plus Jenkins and GitHub Actions. An MCP server lets agents discover which keys exist without ever seeing values.
What it doesn't do (yet)
Once a value is delivered to a worker, the worker has it. Today EnvsAI limits which values and for how long, and records every read. Next on the roadmap: connectors, where the agent gets a short-lived EnvsAI token and EnvsAI adds the real API key to the outgoing request, so the agent never holds the secret at all.
Try it
Free for 2 projects, $9/month for 25 projects and reusable grant templates: envs.ai. The agent guide has every command.
I'd love feedback, especially from anyone running several agents against shared staging environments. What would you need before you'd trust a tool like this?
Top comments (0)