Skip to content

Naming

env-sync builds secret names from the env file location and env key.

Root files

Root files keep keys unchanged:

FileKeyGenerated name
.envDATABASE_URLDATABASE_URL
.env.productionAPI_KEYAPI_KEY

Package and app files

Files under packages/<name> or apps/<name> use the folder name as a prefix:

FileKeyGenerated name
packages/blog/.envDATABASE_URLBLOG_DATABASE_URL
apps/web/.env.productionPUBLIC_URLWEB_PUBLIC_URL

Current transformation

Current source behavior uppercases the package or app folder name and appends _ plus the env key.

It does not currently normalize hyphens or other non-underscore characters in folder names before building names.

GitHub validation

GitHub secret names are validated before syncing:

txt
^[A-Za-z_][A-Za-z0-9_]*$

Names starting with GITHUB_ are rejected.

If a generated name fails validation, rename the folder/key or use a file layout that produces a valid name.