Skip to main content

CLI Reference

Commands

CommandDescription
npm run devStart the development server in the current directory.
npm run buildBuild the project for production.
npm run build:strictBuild, but fails on query or component errors.
rRestart the dev server (when running).

You can stop the server with Ctrl + C / + C.

Options

Append flags with an extra -- after the command to modify behavior.

For example, npm run dev -- --port 4000 will start the development server on port 4000.

Evidence runs a Vite server, and so supports Vite's options.

Some of the most common are:

FlagDescriptionDetail
--open [path]Open browser to path on startup (string)Default --open / opens in root of the project.
--host [host]Specify hostname (string)--host 0.0.0.0 can be helpful in containers
--port <port>Specify port (number)Automatically increment if default 3000 is in use.

Environment Variables

You can set environment variables to configure Evidence in both development and production.

Evidence does not currently support a .env file, but you can set environment variables in your terminal before running the command.

All Redshift environment variables are set using the PostgreSQL variables.

VariableDescriptionOptions (if applicable)
DATABASEThe database to use.bigquery , snowflake , redshift, postgres, mysql, sqlite, duckdb, csv
BIGQUERY_PROJECT_IDBigQuery Project ID
BIGQUERY_CLIENT_EMAILBigQuery Client Email
BIGQUERY_PRIVATE_KEYBigQuery Private Key
SNOWFLAKE_ACCOUNTSnowflake Account ID
SNOWFLAKE_USERNAMESnowflake Username
SNOWFLAKE_PASSWORDSnowflake Password
SNOWFLAKE_DATABASESnowflake Database
SNOWFLAKE_WAREHOUSESnowflake Warehouse
POSTGRES_USERPostgres Username
POSTGRES_HOSTPostgres Host
POSTGRES_DATABASEPostgres Database
POSTGRES_PASSWORDPostgres Password
POSTGRES_PORTPostgres Port
POSTGRES_SCHEMAPostgres Schema
POSTGRES_SSLPostgres SSLtrue , false, no-verify
POSTGRES_CONNECTIONSTRINGPostgres Connection String
MYSQL_USERMySQL Username
MYSQL_HOSTMySQL Host
MYSQL_DATABASEMySQL Database
MYSQL_PASSWORDMySQL Password
MYSQL_PORTMySQL Port
MYSQL_SOCKETPATHMySQL Socket Path
MYSQL_SSLMySQL SSLtrue , false, no-verify
SQLITE_FILENAMESQLite Filename
DUCKDB_FILENAMEDuckDB Filename
SEND_ANONYMOUS_USAGE_STATSSend anonymous usage statsyes , no