asyq
v8.3.5
Published
Generate .env.example from your project's env usage
Downloads
2,672
Maintainers
Readme
Asyq CLI — Environment Variable Scanner & .env Generator with AI
Automatically generate .env.example files by scanning your codebase for environment variable usage.
Installation
npm install -D asyq
# or
pnpm add -D asyq
# or
yarn add -D asyqUsage
npx asyq initChoose between two modes:
- Default - Fast generation with variable names only
- AI-assisted - Adds descriptions and example values (requires OpenAI API key)
Commands
| 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 |
Options
| 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 |
Examples
# 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).

