Skip to content

Environment variables

Which environment variables Elide programs see in process.env, the TMPDIR and ELIDE_SYS_TMP values Elide sets, loading .env files, and --allow-env.

Read offlineelide help env-variables

On this page

Programs read their application environment through process.env; writes do not reach subprocesses.

Variables Elide sets

Variable Value
TMPDIR A per-run directory, removed on exit. TMP and TEMP on Windows.
ELIDE_SYS_TMP The system temporary directory. os.tmpdir() returns it.

Elide does not set NODE_ENV.

Dotenv files

Since Elide 1.6.2, application commands load .env and then .env.local before the program starts. Inherited environment variables take precedence. Use --env-file to choose files explicitly or --no-env to disable automatic loading. See Environment and properties for directory selection, precedence and encrypted values.

process.loadEnvFile([path]) loads a file from JavaScript; its default path is ./.env.

Security

Python’s os.environ holds no inherited host variables unless --allow-env[=NAMES] passes them, before the script or -c: elide --allow-env=PATH,HOME python build.py. subprocess then finds commands on the granted PATH. elide.pkl reads only a short list of variables, and --allow-env lets it read more (Build Flags). It does not filter process.env.

Variables that configure Elide itself: Runtime Environment Variables.

Was this page helpful?