beginner⏱ 3 minutesevnx v0.2.0+
evnx init
Reference documentation for the evnx init command: modes, options, and project setup.
Prerequisites
evnx init — Command Reference
Initialize .env.example and .env files using Blank, Blueprint, or Architect modes with schema-driven variable generation.
Before you start
Command signature
evnx init [OPTIONS]Options reference
| Flag | Type | Default | Description |
|---|---|---|---|
--path, -p | string | . | Output directory for generated files |
--yes, -y | bool | false | Skip prompts, use defaults (non-interactive) |
--verbose, -v | bool | false | Enable detailed debug output |
--help, -h | bool | false | Display help information |
Initialization modes
| Mode | Trigger | Behavior | Best for |
|---|---|---|---|
| Blank | Interactive → Select | Creates minimal .env templates | New projects, manual config |
| Blueprint | Interactive → Select / --yes default | Pre-configured stack (e.g., T3, FastAPI) | Quick start with known stacks |
| Architect | Interactive → Select | Step-by-step: language → framework → services → infra | Custom stack composition |
Exit codes
| Code | Meaning | Use case |
|---|---|---|
0 | ✅ Initialization completed successfully | Success in scripts/CI |
1 | 🚨 Init failed (schema error, write failure) | Fail pipeline on setup issues |
2+ | ⚠️ Runtime errors (IO, parsing, validation) | Debug tooling or schema issues |
Basic usage examples
Interactive setup (recommended)
# Launch mode selector with guided prompts
evnx initNon-interactive default (Blueprint mode)
# Skip prompts, use first available blueprint
evnx init --yesCustom output path
# Generate files in ./config directory
evnx init --path ./config --yesVerbose debugging
# Show selection summary and resolution steps
evnx init -vCombine flags for CI/CD
# Silent init with custom path for automation
evnx init --yes --path /app/config --verboseGenerated files
| File | Purpose | Overwrite behavior |
|---|---|---|
.env.example | Team template with placeholders + docs | Always updated |
.env | Local secrets (gitignored) | Created only if missing |
.gitignore | Auto-appends .env* patterns | Appends if patterns missing |
Environment variables
| Variable | Values | Default | Description |
|---|---|---|---|
NO_COLOR | 1, true | false | Disable colored output for terminals |
CI | 1, true | false | Auto-enable non-interactive defaults |
See also
- ›Init Basics Tutorial — Step-by-step setup guide
- ›Blueprint Catalog — Available pre-configured stacks
- ›Schema Reference — Extend languages, services, and vars
- ›Team Collaboration — Share
.env.examplesafely