@vite-env/cli
v0.5.2
Published
CLI for @vite-env/core — check, generate, types
Downloads
1,118
Maintainers
Readme
@vite-env/cli
CLI companion for @vite-env/core — validate, generate, and type your Vite environment variables.
Install
pnpm add -D @vite-env/cliCommands
vite-env check
Validate environment variables against your env.ts schema without starting the dev server. Useful in CI pipelines.
npx vite-env check
npx vite-env check --config ./env.ts --mode productionvite-env generate
Generate a .env.example file from your schema with type hints, defaults, and required flags.
npx vite-env generate
npx vite-env generate --output .env.examplevite-env types
Regenerate vite-env.d.ts from your schema without running the dev server.
npx vite-env typesOptions
All commands accept:
| Flag | Default | Description |
| ---------- | -------- | --------------------------- |
| --config | env.ts | Path to env definition file |
check also accepts:
| Flag | Default | Description |
| -------- | ------------- | ------------------------------- |
| --mode | development | Vite mode for .env file loading |
generate also accepts:
| Flag | Default | Description |
| ---------- | -------------- | ---------------- |
| --output | .env.example | Output file path |
