Stop passing .env files around.
Encrypted environment variables that load when you cd into a repo and unload when you leave.
Self-hosted on your own Cloudflare account.
Website · 40-second demo · npm
$ npm install -g @thisisamank/noenv-cli
$ cd ~/code/backend
noenv: loaded 12 secrets for github.com/acme/backend (development)
$ npm run dev # your app sees DATABASE_URL, STRIPE_KEY, …
$ cd .. # and they are gone againDeploy, create a passkey, install the CLI, approve your terminal, and move your .env files in, in 40 seconds.
- Loads secrets by repository. The git
originis the project. There is nothing to configure per repo. - Encrypts on your machine. Values are encrypted before they leave your laptop. The server only ever stores ciphertext.
- Updates live. A secret that you or a teammate saves shows up at your next prompt.
- Keeps every version. Each change is a new version, and rollback is one click.
- Replaces
.envfiles. Admins can warn about, block, or migrate and delete.envfiles on team machines. - Runs on your own Cloudflare account. One Worker, one D1 database, and one KV namespace. No third party sees your data.
1. Deploy. Click the button above. Enter your email as ADMIN_EMAIL, and a random string of at least 16 characters that you make up as SETUP_TOKEN. For EMAIL_FROM, enter a sender address on a domain with Email Sending enabled to email invites, or keep none. Optionally, enter your team's name as TEAM_NAME. The CLI saves the deployment under this name on each laptop.
2. Create your admin passkey. Open https://<your-worker>.workers.dev/dashboard/ and sign up with the same email and setup token. If invitation emails are on, the dashboard emails you a setup link instead. Passkeys use Touch ID, Face ID, or a security key. There are no passwords.
3. Install the CLI. It needs Node.js 22 or newer.
npm install -g @thisisamank/noenv-cli4. Connect your shell. Add these lines to ~/.zshrc or ~/.bashrc. The dashboard shows them with your URL filled in.
export NOENV_URL="https://<your-worker>.workers.dev"
eval "$(noenv shell zsh)" # or: noenv shell bashOpen a new terminal and cd into a repo. Your browser opens once so you can approve the terminal with your passkey.
5. Add a project.
cd ~/code/backend
noenv init # creates the project, a development environment, and .noenv
noenv secret set API_KEY # prompts for the value and keeps it off screen| Command | What it does |
|---|---|
noenv status |
Show the deployment, your account, and the current project |
noenv secret set KEY |
Save a secret (a new version) |
noenv secret list |
List the secrets in this environment |
noenv secret history KEY |
List the versions of a secret |
noenv secret rollback KEY VERSION |
Restore an older version |
noenv migrate |
Move this repo's .env files into noenv |
noenv exec -- CMD |
Run a command with this repo's secrets, without the shell hook |
noenv wrangler [KEY...] |
Push secrets to your Worker; without KEY, pick them in a list |
noenv grant EMAIL ROLE |
Give someone access to this project and share the key |
Set the environment with environment = "staging" in a .noenv file in the repo, or with NOENV_ENVIRONMENT=staging for one shell.
The dashboard does the rest: projects, secret history and rollback, team invites, policies, and devices. Values are set with noenv secret set, so each version is signed with the environment key.
Commit the .noenv file that noenv init creates. It tells teammates' shells that the repo uses noenv, so access problems show up as messages instead of silence.
noenv wrangler copies secrets from noenv to your Worker with wrangler secret bulk. The values go to Wrangler on stdin, so they never show on screen or land in a file.
noenv wrangler # pick the secrets in a list
noenv wrangler STRIPE_KEY API_KEY # push these, no listIn the list, use the arrow keys or j/k to move, space to select, a to select all, enter to push, and esc to cancel.
To push some keys every time you change them, list them in .noenv:
[wrangler]
secrets = ["STRIPE_KEY", "API_KEY"] # pushed after `noenv secret set` and `noenv secret rollback`
environment = "production" # optional: the noenv environment to copy from (default: the current one)
env = "staging" # optional: passed to wrangler as --envThe keys in this list start selected in noenv wrangler. Without a terminal, for example from an agent or CI, noenv wrangler pushes this list. The CLI uses the wrangler in the repo's node_modules, or the one on your PATH. Rollbacks made in the dashboard do not push to Wrangler. Run noenv wrangler after them.
Coding agents run each command in a fresh shell, so the cd hook does not run for them. Tell them to use noenv exec:
noenv exec -- npm run dev
noenv exec -- npx wrangler deploynoenv exec finds the repository from the current directory, picks the account for it (see Multiple accounts), loads the secrets, and runs the command. When the agent moves to another repository, the next exec uses that repository's account and secrets. It removes secrets that your shell loaded for a different repository first, so values do not leak from one project into another. It prints which project it loaded, never the values. Outside a noenv project it runs the command without secrets.
To save a secret without a prompt, pipe the value: printf '%s' "$VALUE" | noenv secret set KEY.
Add a line like this to your agent instructions (CLAUDE.md, AGENTS.md):
Run commands that need environment variables with `noenv exec -- <command>`. Do not create .env files.Each noenv deployment is one team. If you work with more than one team, for example your company, a client, and your own projects, add each deployment as an account:
noenv account add https://noenv.acme.com # saved as "acme", the name the deployment reports
noenv account add https://noenv.me.dev personal
noenv auth acme # sign in to each account onceThe deployment reports its team name, so every teammate gets the same account name. Admins set it with TEAM_NAME when they deploy. Without it, the name comes from the Worker's address. Pass your own name after the URL if you prefer.
noenv init saves the deployment URL in the repository's .noenv file. With one account, it uses that account. With more than one, it asks which one to use. Agents and scripts pass it: noenv init --account acme.
version = 1
deployment = "https://noenv.acme.com"
environment = "development"The hook, noenv exec, and every other command use the local account with that URL, whatever you named it. The URL is the same for every teammate, so names can differ from laptop to laptop without breaking anything. If no account has that URL, noenv tells you the command to add it. It never connects to a URL from .noenv on its own, so a cloned repository cannot point your shell at another server.
In a repository whose .noenv names no deployment, noenv uses NOENV_ACCOUNT, then the default account (the first one you add, or noenv account default NAME), then NOENV_URL.
When you cd from a repository of one account to a repository of another, noenv unloads the first set of secrets and loads the second. noenv account list shows each account and whether you are signed in.
- Invite people from Team or from a project's Members card. You get a link to send them.
- They open the link and create a passkey.
- They connect their shell as in step 4 above.
- Run
noenv grant their@email.com editorto share the environment key.
Roles: reader loads secrets, editor also writes them, admin also manages members and policies.
noenv can email invites and the first admin's setup link through Cloudflare Email Sending. Without it, the dashboard and noenv invite give you the link to send yourself.
- Onboard your domain:
npx wrangler email sending enable example.com - Set the sender address on that domain. With the Deploy button, enter it as
EMAIL_FROM. Later, or from a checkout:npx wrangler secret put EMAIL_FROM(for examplenoenv@example.com).
The EMAIL binding is already in wrangler.jsonc. When email is on, the first admin gets the setup link by email, so only someone with access to ADMIN_EMAIL can claim the deployment.
- Each environment has its own key pair. Secrets are sealed to the environment's public key, so anyone with write access can add a value without being able to read the others.
- Each member gets the environment's private key wrapped for their own key, which lives in
~/.config/noenv. - The Worker checks who you are and what role you have before it returns anything. It never sees a plaintext value.
- The newest values come from KV in one read. D1 holds every version, the permissions, and the policies.
- The CLI keeps the last encrypted bundle of each environment in
~/.config/noenv. Acddecrypts it locally and makes no network request. A background refresh fetches the newest bundle, and the shell loads it when it arrives. zsh prints the result as soon as it lands. bash prints it at the next prompt.
It protects against secrets leaking through .env files, chat, and repositories. It does not stop someone with access from reading the variables in their own shell.
npm install
npm test # unit and integration tests
npm run typecheck
npm run setup -- --admin you@example.com # deploy from this checkout with your wrangler login
npm run build -w @thisisamank/noenv-cli && cd cli && npm link # use the local CLI instead of the npm oneThe code is split into packages/ (shared libraries), worker/ (the API), cli/, and dashboard/. See spec.md for the full design.

