Overview
The Envark TUI (Terminal User Interface) provides a rich interactive shell for environment variable analysis. Access it by runningenvark or envark -i.
Navigation
Keyboard shortcuts:- Type
/— Open command dropdown menu - Arrow ↓↑ — Navigate dropdown suggestions
- Tab — Autocomplete selected command
- Enter — Execute command
- Ctrl+C — Clear output or exit
- Up/Down arrows navigate previous commands
- History persists for 100 entries per session
scan
Scan project for environment variables.s, map
Filter results by variable status.Options:
all- Show all variables (default)missing- Variables used but not definedunused- Variables defined but never usedrisky- Variables with high or critical riskundocumented- Variables not in .env.example
- Total environment variable count
- Defined vs undefined breakdown
- Missing variables that will cause crashes
- Risk level distribution
- Complete variable list with locations
All Variables
Missing Only
Risky Variables
- Displays animated spinner during scan
- Caches results for faster subsequent runs
- Typical scan time: < 2s for 500-file projects
risk
Analyze environment variable security risks.r, risks
Minimum risk level to display.Options:
info- Show all findings (default)low- Show low and abovemedium- Show medium and abovehigh- Show high and critical onlycritical- Show critical only
| Level | Criteria | Examples |
|---|---|---|
| Critical | Used but not defined, no default | JWT_SECRET, DATABASE_URL |
| High | Secret-like name in committed file | API_KEY=xxx in .env |
| Medium | Multiple usages, no default | SERVICE_URL used 5+ times |
| Low | Undocumented or unused | Defined but not in .env.example |
| Info | Fully configured | Has definition, usage, and docs |
All Risks
Production-Critical Only
Medium and Above
missing
Find variables that are used in code but not defined.m, undefined
Identifies:
- Variables accessed without definition
- No default value provided in code
- Will cause runtime crashes if not set
- Critical - Used 5+ times, no fallback
- High - Used 2-4 times
- Medium - Single usage, no default
duplicates
Find duplicate or conflicting variable definitions.d, dups
Detects:
- Same variable defined in multiple .env files
- Conflicting values across environments
- Shadowed definitions
undocumented
Find variables not documented in .env.example.u, undoc
Checks for:
- Variables used in code
- Not present in .env.example
- Makes onboarding difficult
usage
Show detailed usage information for a specific variable.env
Name of the environment variable to analyze.
- All code locations where variable is accessed
- Definition locations (.env files)
- Default values in code
- Documentation status
- Risk assessment
graph
Show variable dependency graph.g, deps
Generates:
- Relationships between variables
- Clustering patterns (which vars are used together)
- File-to-variable mappings
validate
Validate a .env file against code requirements.v, check
Path to the .env file to validate.Relative to current working directory.
- All required variables present
- No syntax errors
- Value format validation (URLs, numbers, etc.)
- Security checks (no secrets in wrong files)
Default .env
Production Environment
Custom Path
generate
Generate .env.example template from codebase.gen, template
Where to write the generated template.If omitted, prints to console.
- All variables used in code
- Placeholder values (secrets masked)
- Inline comments explaining purpose
- Grouped by category (DB, Auth, API, etc.)
Print to Console
Write to File
Custom Path
help
Show command help information.h, ?
Specific command to get help for.If omitted, shows all commands.
All Commands
Specific Command
clear
Clear the terminal screen.cls, c
Behavior:
- Clears all output from screen
- Preserves command history
- Does not reset session state
cd
Change the project directory.project
Path to new project directory.Can be absolute or relative.
Relative Path
Absolute Path
Show Current Path
exit
Exit the Envark TUI.quit, q
Behavior:
- Displays goodbye message
- Exits with code
0 - Clears any active spinners
Command Execution Flow
- Input parsing - Command and arguments extracted
- Command lookup - Matches name or alias
- Spinner display - Animated indicator during execution
- Tool execution - Underlying analysis runs
- Result rendering - Formatted output displayed
- Error handling - User-friendly error messages
| Command | Small Project | Large Project |
|---|---|---|
| scan | < 500ms | 2-5s |
| risk | < 200ms | 1-3s |
| missing | < 100ms | < 1s |
| validate | < 100ms | < 500ms |
| generate | < 200ms | < 1s |
| usage | < 50ms | < 200ms |
| graph | < 300ms | 1-2s |