Five minutes from an installed CLI to a command running with a secret it never had on disk. This assumes you have installed enveil and have an account on https://enveil.oxidt.com.
Sign in
export ENVEIL_SERVER=https://enveil.oxidt.com
enveil loginPick the organization the project should live in when the browser asks. On a machine without a browser, use enveil login --device.
Create the project
In the root of your repository:
enveil init --project my-app --create--create makes the project on the server if it does not exist yet, with three environments: dev, staging and prod. init then writes .enveil.toml:
server = "https://enveil.oxidt.com"
project = "my-app"
environment = "dev"Commit it. It names the project and its default environment, and holds no secret.
Store a secret
enveil set STRIPE_SECRET_KEYSTRIPE_SECRET_KEY:
Wrote STRIPE_SECRET_KEY to my-app/dev.Leave the value off the command line: set asks for it at a hidden prompt, or reads it from stdin when you pipe it in. Either way it stays out of shell history and the process list.
printf %s "$NEW_KEY" | enveil set STRIPE_SECRET_KEY
enveil set STRIPE_SECRET_KEY -e prod # another environmentSee what is stored
enveil listSTRIPE_SECRET_KEYlist fetches key names only, so it discloses nothing and is not recorded as a read.
Run a command with it
enveil run -- bun run devThe command starts with STRIPE_SECRET_KEY in its environment. Nothing is written to disk, and run exits with the command's own status, so it works in scripts and pipelines. The fetch is recorded in the audit trail as one export of my-app/dev.
Undo a bad rotation
Set a new value, then look at the history:
enveil set STRIPE_SECRET_KEY
enveil history STRIPE_SECRET_KEYv2 2026-10-08T09:14:02.481203+00:00 user 6f1c2a90-… (current)
v1 2026-10-08T09:02:37.106554+00:00 user 6f1c2a90-…history shows who wrote each version and when, never a value. If v2 broke something, restore v1:
enveil rollback STRIPE_SECRET_KEY 1Restored STRIPE_SECRET_KEY in my-app/dev from v1 as v3.The old ciphertext is copied forward as a new version. It is never decrypted, so nobody sees the value on the way.
Document the keys
enveil exampleThis writes .env.example with one empty KEY= line per stored key, sorted. It fetches names only, so it is safe to run anywhere and safe to commit. In CI, enveil example --check exits non-zero when a stored key is missing from the file.
Next
- Hand an agent its own scoped credential: Coding agents
- Move existing
.envfiles in withenveil import: Migrating from .env - How
-p,-eand--serveroverride the file: Projects and environments