CommandsEnvironment

skytells env set

Create or update environment variables at project or app scope.

Overview

skytells env set creates or updates one or more environment variables. Variables can be set at the project level (available to all apps) or scoped to a specific app with --app. Changes take effect on the next app restart or deployment.


Syntax

skytells env set <KEY=value>... [--app <id>] [--json]

Arguments

ArgumentDescription
KEY=valueOne or more KEY=value pairs. Separate multiple pairs with spaces.

Flags

FlagDescription
--app <id>Scope the variable(s) to a specific app. Without this flag, variables are set at project scope.
--jsonOutput the result as JSON.

Examples

# Set a project-wide variable
skytells env set LOG_LEVEL=info

# Set a variable scoped to a specific app
skytells env set DATABASE_URL=postgres://user:pass@host:5432/db --app app_abc123

# Set multiple variables at once
skytells env set API_KEY=abc123 TIMEOUT=30 REGION=us-east-1

# Set a secret (the value is stored encrypted at rest)
skytells env set STRIPE_SECRET_KEY=sk_live_xxxxx --app app_abc123

# Set from a .env file
while IFS='=' read -r key value; do
  [[ "$key" =~ ^#|^$ ]] && continue
  skytells env set "${key}=${value}" --app app_abc123
done < .env

Apply environment changes

Environment variables are injected into the app process at startup. After setting variables, restart the app to apply them:

skytells env set NEW_SETTING=value --app app_abc123
skytells apps restart app_abc123

Or trigger a full redeployment to pick up both code and config changes:

skytells deploy app_abc123

Security guidance

Values are stored encrypted at rest in Skytells. They are masked in the Console and in skytells env ls output.

How is this guide?

On this page