Environment Variables

Manage secrets and configuration for your Strayl projects.

Environment variables let you store secrets (API keys, database URLs, tokens) and configuration values outside your code. Strayl manages them per project and per environment.

Adding variables

Go to Manage → Environment Variables and click Add Variable:

  1. Enter the Key — e.g., STRIPE_SECRET_KEY
  2. Enter the Value — e.g., sk_live_...
  3. Choose the Environment:
    • Production — available in deployed builds
    • Preview — available in the dev environment
    • Both — available in both

Variable scoping

Pre-set variables

Strayl automatically sets the following variables in every project:

Accessing in code

Variables are available via process.env as usual:

For Next.js, prefix with NEXT_PUBLIC_ to expose variables to the browser:

Bulk import

Import variables from a .env file by clicking Import .env:

Security

  • Variables are encrypted at rest
  • Values are never shown in logs
  • The AI agent cannot read variable values — it can only see the variable names
  • Team members need explicit permission to view sensitive variables

Using the AI agent with env vars

The agent knows your variable names (not values). You can ask it:

The agent will write code using these variable names. You set the actual values separately.

StraylSTRAYL

The place where your code product lives

© 2026 Strayl. All rights reserved.