Skip to content
This repository has been archived by the owner on Mar 2, 2025. It is now read-only.

Examples

Matt Carlotta edited this page Aug 30, 2024 · 8 revisions

Click here for language specific examples, otherwise, here are some basic use cases:

Parsing an example.env file from a custom directory with debug logging and printing the parsed result to standard out as stringified JSON:

nvi --files example.env --directory dist/client --debug --print json

Parsing one or many .env files from a nvi.toml configuration file typically located at a project's root directory (and then running a system command):

nvi --config standard

Parsing an .env file, checking the parsed ENVs for required keys, and then, if good, applying those ENVs to a spawned "npm" child process:

nvi --files .env --required KEY1 KEY2 -- npm run dev
Clone this wiki locally