Environment variables and secrets
Values per environment, secrets encrypted with your project's key, build-time values and deploy tokens.
Variables belong to an environment: production, preview, development or one you create. A deploy takes a snapshot of its environment’s variables when it is made; changing a variable affects the next deploy, never a running one, until you redeploy or run run env apply.
Commands
npx @sypnia/run env set NEXT_PUBLIC_SHOP_NAME "La Espiga" --env production
npx @sypnia/run env set DATABASE_URL --secret --env production # asked without echo
npx @sypnia/run env ls --env production # secrets show as ••••
npx @sypnia/run env pull --env development > .env.local # plain values for local work; secrets only with --include-secrets and permissionPlain values and secrets
| Plain variable | Secret | |
|---|---|---|
| Visible after saving | yes | never; only replaced or deleted |
| Stored | encrypted at rest | encrypted with the project’s own key (AWS KMS), in AWS Systems Manager Parameter Store |
| Available at build time | if listed in build.env | only if marked --build, masked in logs |
| Reaches your code | in process.env at run time | the same, decrypted by the runtime’s role, never written to the artifacts |
Names starting with NEXT_PUBLIC_, PUBLIC_ or VITE_ are embedded in browser code by your framework: Run refuses to store a secret under those names.
From other products
Connecting Sypnia Data, Files or Mail to an app adds their variables (SYPNIA_DATA_URL, the publishable key as plain, the secret key as a secret) to the environments you choose.
Deploy tokens
A deploy token lets CI deploy one app to chosen environments, and nothing else: run tokens create --app laespiga --env preview,production. It is shown once, stored hashed, and revoked with run tokens revoke. For GitHub Actions, Run can trust the workflow’s OIDC token instead, so no secret is stored in GitHub.