Skip to content

Prepare

Generate .env file from .env.* files.

Installation

NPM version

bash
$ npm i -D @import-meta-env/prepare

Usage

bash
$ npx import-meta-env-prepare -x .env.example

By default, when running above command, the CLI will load environment variables from .env.local.defaults and .env.local, merge both, then create an .env file in your project root:

ini
# .env
# Generated by '@import-meta-env/prepare'

NAME=world

Released under the MIT License.