Skip to Content
interleavedocs

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.yml holds secret://NAME references, 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 list shows 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_KEY

You're prompted for the value, masked. Or pipe it in:

printf %s "$VALUE" | interleave secrets set STRIPE_SECRET_KEY

Never 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_KEY

List and remove:

interleave secrets list
interleave secrets rm STRIPE_SECRET_KEY

Setting 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.

ClassWhat it isIn the sandbox
third-party-test-secretA test-mode key for a service, like sk_test_…Encrypted, uploaded and used.
app-secretYour app's own signing or session key, like NEXTAUTH_SECRETA stable generated placeholder (secret://generated/NAME), since any value works.
plain-configNon-secret configurationWritten into interleave.yml as is.
self-urlA URL to the app itself, like NEXTAUTH_URLKept.
remote-urlA URL to a remote serviceKept. Check it isn't production.
local-serviceA local database or cache URLProvisioned as a sandbox service.
other-localSomething else that points at your machineinit asks you what to do.
third-party-live-secretA live key that can spend money or touch real dataBlocked.
telemetry-prodProduction telemetry, like a live Sentry DSNTurned off.
missingReferenced but not set locallyA 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_KEY

Fork 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.

On this page

Graph view