Skip to main content

What are secrets?

Secrets are encrypted environment variables that you access at runtime through ctx.env. Use them for API keys, database URLs, external service tokens, and any sensitive values.

Configure secrets

You have three ways to configure secrets with the CLI:
Pass KEY=VALUE pairs directly:
Keys must be UPPER_SNAKE_CASE (pattern: ^[A-Z][A-Z0-9_]*$).

Access secrets in your function

Use ctx.env inside the handler:
index.ts

ctx.env methods

Blocked variables

Internal platform variables with the __FN_ prefix are blocked. Calling ctx.env.get("__FN_COMPANY_ID") returns undefined.

Local development

In local development, the jelou functions dev server loads secrets from your .env file:
.env
You can specify a different file:
Never commit your .env file to the repository. jelou functions init adds it automatically to .gitignore.

List and delete secrets

Secrets in CI/CD

In CI pipelines, use system environment variables to inject secrets:
deploy.yml