Read the Full Documentation (Wiki)
Automatically generate .env.example files by scanning your codebase for environment variable usage.
Stop letting your environment templates fall out of sync.
Asyq scans your source code to detect variable usage and automatically generates a complete .env.example file—ensuring your team never struggles with missing configuration keys again.
npm install -D asyq
# or
pnpm add -D asyq
# or
yarn add -D asyqnpx asyq initChoose between two modes:
- Default - Fast generation with variable names only
- AI-assisted - Adds descriptions and example values (requires OpenAI API key)
| Command | Description |
|---|---|
npx asyq init |
Interactive setup |
npx asyq init --force |
Overwrite existing files |
npx asyq init --monorepo |
Generate for each workspace |
npx asyq init --debug |
Show scan diagnostics |
| Option | Description |
|---|---|
--root <dir> |
Project root to scan (default: .) |
--out <file> |
Output filename (default: .env.example) |
--force |
Overwrite without confirmation |
--include-lowercase |
Include mixed-case variables |
--debug |
Print detailed diagnostics |
--monorepo |
Generate for root + workspaces |
# Basic usage
npx asyq init
# Force overwrite
npx asyq init --force
# Monorepo project
npx asyq init --monorepo
# Custom output
npx asyq init --out .env.template
# Scan specific directory
npx asyq init --root ./packages/apiSet your OpenAI API key:
export OPENAI_API_KEY=sk-...
npx asyq initOr enter it when prompted (not saved to disk).
