.env files or your shell environment.
Loading Environment Variables
Evidence automatically loads environment variables from.env files with the prefixes:
EVIDENCE_*VITE_*
.env file:
Build and Output Directories
EVIDENCE_BUILD_DIR
Output directory for production builds.
evidence build, svelte.config.js
EVIDENCE_DATA_DIR
Directory where parquet data files are stored. Used during builds and by the dev server.
evidence dev, evidence build, evidence sources
EVIDENCE_DATA_URL_PREFIX
URL prefix for accessing data files in the browser. Should match the path structure of EVIDENCE_DATA_DIR relative to the static directory.
evidence dev, evidence build, evidence sources
EVIDENCE_PAGES_DIR
Directory containing Evidence markdown pages.
Source Configuration
EVIDENCE_SOURCE__[source]__[option]
Override any source connection option. Replace
[source] with your source name and [option] with the configuration key.EVIDENCE_SOURCE__<SOURCE_NAME>__<OPTION_NAME>
Example:
sources/my_database/connection.yaml.
Used by: evidence sources
EVIDENCE_VAR__[name]
Variables for query interpolation. Use
${name} in your SQL queries and source configurations.EVIDENCE_VAR__<VARIABLE_NAME>
Example:
.env file:
sources/mydb/orders.sql):
sources/api/connection.yaml):
evidence sources, query execution
Runtime and Build Flags
EVIDENCE_IS_BUILDING
Set to
true automatically during builds to indicate build-time execution.evidence build
Usage: Internal flag, automatically set. Used by Evidence to differentiate build-time from runtime behavior.
EVIDENCE_STRICT_MODE
Enable strict mode which fails on warnings and errors. Used by
evidence build:strict.evidence build:strict
Usage:
EVIDENCE_DEBUG
Enable debug logging for Evidence internals (Node.js environment).
--debug flag on CLI commands
Example:
VITE_EVIDENCE_DEBUG and VITE_PUBLIC_EVIDENCE_DEBUG.
VITE_EVIDENCE_DEBUG
Enable debug logging in Vite build and runtime.
--debug flag or manually in .env
Used by: Evidence SDK, query engine
VITE_PUBLIC_EVIDENCE_DEBUG
Enable debug logging in browser runtime.
--debug flag or manually in .env
Deployment and URLs
EVIDENCE_URL_PREFIX
URL prefix for Evidence internal routes and assets.
VITE_EVIDENCE_SPA
Build and serve the application in single-page application (SPA) mode with client-side routing.
evidence preview, SvelteKit adapter
Node.js Configuration
NODE_OPTIONS
Node.js runtime options. Evidence automatically adds
--max-old-space-size=4096 if not already set.Advanced Configuration
EVIDENCE_DISABLE_INCLUDE
Disable automatic inclusion of Evidence dependencies during the build. Advanced use only.
Debugging Environment Variables
Use theenv-debug command to see all Evidence-related environment variables:
Environment Variable Precedence
- Shell environment variables (highest priority)
.envfile in project root- Default values (lowest priority)
Related
- evidence dev - Development server
- evidence build - Production builds
- evidence sources - Source data generation
- Configuration File - Configuration files