Secrets
How Interleave encrypts, stores and uses your app's secrets, and what it refuses to use.
Your app needs secrets to boot: API keys, signing keys, a test user's password. Interleave keeps them in a per-project vault. They're encrypted on your machine before upload, and nobody can read them back, including you.
How values are protected
- Encrypted on your machine. The CLI seals each value to the project's public key (a libsodium sealed box) before it leaves your machine. The API stores ciphertext only.
- Decrypted only in the sandbox. Values are opened at boot, inside the isolated sandbox that runs your app.
- Never in your repo.
interleave.ymlholdssecret://NAMEreferences, never values. - Redacted from evidence. Known secret values are masked in logs, recordings' event streams, PR comments, checks and model prompts.
- Write-only.
interleave secrets listshows names, classes and update times. There is no way to read a value back.
Adding and changing secrets
interleave init uploads the secrets it finds in your .env* files. To add or change one later:
interleave secrets set STRIPE_SECRET_KEYYou're prompted for the value, masked. Or pipe it in:
printf %s "$VALUE" | interleave secrets set STRIPE_SECRET_KEYNever pass the value as an argument. The CLI refuses NAME=value, so the value stays out of your shell
history.
Or add it from the dashboard: Projects → your repo → Environment → Add variable. The value is encrypted in your browser before it's sent, the same way the CLI does it. Pick a class, or let Interleave detect it from the value.
Then reference it in interleave.yml:
env:
STRIPE_SECRET_KEY: secret://STRIPE_SECRET_KEYList and remove:
interleave secrets listinterleave secrets rm STRIPE_SECRET_KEYSetting or removing secrets needs the admin or owner role. Members can list names. See Teams.
Classes
init and secrets set classify every variable from its name and value. Override the detected class
with --class.
| Class | What it is | In the sandbox |
|---|---|---|
third-party-test-secret | A test-mode key for a service, like sk_test_… | Encrypted, uploaded and used. |
app-secret | Your app's own signing or session key, like NEXTAUTH_SECRET | A stable generated placeholder (secret://generated/NAME), since any value works. |
plain-config | Non-secret configuration | Written into interleave.yml as is. |
self-url | A URL to the app itself, like NEXTAUTH_URL | Kept. |
remote-url | A URL to a remote service | Kept. Check it isn't production. |
local-service | A local database or cache URL | Provisioned as a sandbox service. |
other-local | Something else that points at your machine | init asks you what to do. |
third-party-live-secret | A live key that can spend money or touch real data | Blocked. |
telemetry-prod | Production telemetry, like a live Sentry DSN | Turned off. |
missing | Referenced but not set locally | A placeholder until you set it. |
Live keys are blocked
Tests click through real flows: checkout, sending email, deleting records. With a live key, a test can
spend real money or touch production data. So init blocks keys it recognizes as live and turns off
production telemetry.
Use test-mode keys (Stripe sk_test_… and so on). If you really need a live value, opt it in with
--keep:
interleave init --keep SOME_LIVE_KEYFork pull requests
By default Interleave doesn't run on PRs from forks at all, and automatic runs never start for them. See GitHub → Fork pull requests. The GitHub Action can't authenticate on fork PRs either, because GitHub doesn't give fork workflows access to repository secrets.
Not uploading anything
interleave init --no-upload skips the upload. Secrets are empty in the sandbox, which works for apps
that boot without them. interleave scan --recipe drafts interleave.yml without contacting the cloud
at all.