CLI Reference

Commands

No Results

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.

Some of the most common are:

No Results

Evidence's dev and build commands run using Vite, and so support Vite's options.

Evidence's preview command runs using npx serve and supports Serve's options

Environment Variables

You can set environment variables to configure Evidence in production. Most of these are used to set database credentials securely.

The format of environment variables for database credentials is EVIDENCE_SOURCE__[source_name]__[variable_name].

You can copy all your current environment variable values from the settings page at localhost:3000/settings.

N.B. Environment variables are case sensitive, so you should preserve the case specified in the settings page.

.env Files

Evidence will read in environment variables from a .env file in the root of your project. This is useful for local development.