Skip to main content

Overview

Envark features a sophisticated React/Ink-powered Terminal User Interface (TUI) that provides an interactive environment for managing your environment variables. The TUI supports multiple modes, intelligent command completion, and real-time feedback.

Starting the TUI

envark
This launches the interactive terminal interface with:
  • ASCII banner and version information
  • Command input with autocomplete
  • Real-time scanning feedback
  • Color-coded output

UI Modes

The TUI operates in three distinct modes:
Normal Mode is the default interface for running commands and viewing results.Features:
  • Command dropdown with fuzzy matching
  • Keyboard shortcuts for all commands
  • Tab completion
  • Command history
# Type / to see all available commands
/scan

# Use shortcuts for faster access
s        # Same as /scan
r        # Same as /risk
m        # Same as /missing

Available Commands

Scanning Commands

/scan

Shortcut: sScan project for all environment variables
/scan
Displays:
  • Total variables found
  • Defined vs missing counts
  • Critical issues summary
  • Top 10 variables with status

/risk

Shortcut: rAnalyze security and configuration risks
/risk
Shows risk breakdown:
  • Critical, High, Medium, Low counts
  • Top risky variables
  • Issue details and recommendations

/missing

Shortcut: mFind undefined but used variables
/missing
Identifies variables that:
  • Are referenced in code
  • Have no definition in .env files
  • Have no default values

/duplicates

Shortcut: dFind duplicate or conflicting definitions
/duplicates

Validation Commands

# Validate a .env file
/validate .env
v .env

# Generate .env.example template
/generate
g

# Show dependency graph
/graph
gr

AI Commands

AI commands require an AI provider to be configured. Use /ai-config to set one up.
Shortcut: chStart an interactive conversation with the AI assistant.
/chat
The AI assistant can:
  • Answer questions about environment variables
  • Explain best practices
  • Help debug configuration issues
  • Provide framework-specific advice
Shortcut: aAsk a one-off question without entering chat mode.
/ask How do I secure my database password?
a What's a good naming convention for API keys?
Shortcut: anGet AI-powered analysis of your entire environment configuration.
/analyze
Returns:
  • Summary of findings
  • Security recommendations
  • Best practice suggestions
Shortcut: suGet suggestions for improving a specific variable.
/suggest DATABASE_URL
su API_KEY
Shortcut: exGet detailed explanation about an environment variable.
/explain NODE_ENV
ex PORT
Shortcut: tplGenerate a .env template for your project type.
/template Node.js web application
tpl Next.js app with authentication

Utility Commands

/help              # Show all commands
h

/clear             # Clear the output
c

/exit              # Exit Envark
q

Keyboard Navigation

Arrow Keys

  • ↑/↓ - Navigate command dropdown
  • ↑/↓ - Navigate provider/model selection in wizard

Special Keys

  • Enter - Execute command or select option
  • Tab - Autocomplete selected command
  • Ctrl+C - Cancel/Clear/Exit
  • Backspace - Delete character

Command Dropdown

As you type / followed by letters, Envark shows a filtered dropdown of matching commands:
# Typing /s shows:
 /scan Scan project for environment variables
  /suggest Get AI suggestions for a variable

# Typing /ri shows:
 /risk Analyze environment variable risks
The dropdown automatically hides AI commands if no provider is configured.

Output Formatting

Envark provides structured, color-coded output:

Scan Results

┌─ SCAN SUMMARY ────────────────────────────────────────────┐
│  Total: 42  Defined: 38  Missing: 4  Critical: 2
└──────────────────────────────────────────────────────────┘

Variables:
  DATABASE_URL              [CRITICAL] ✓
  API_KEY                   [HIGH] ✗
  PORT                      [LOW] ✓
  ...

Risk Analysis

┌─ RISK ANALYSIS ───────────────────────────────────────────┐
│  Critical: 2  High: 5  Medium: 12  Low: 23
└──────────────────────────────────────────────────────────┘

  ⚠ SECRET_KEY [CRITICAL]
    → Used in code but not defined in any .env file
    → Looks like a secret but is in a potentially committed file

Validation Results

┌─ VALIDATION ──────────────────────────────────────────────┐
│  Status: ✗ INVALID
│  Passed: 35  Warnings: 3  Failed: 4
└──────────────────────────────────────────────────────────┘
The footer displays:
  • Current Envark version
  • AI provider status (provider/model or “Not configured”)
  • Current mode indicator
  • Keyboard hints
~ | Envark v0.1.0 | AI: OpenAI/gpt-4o | CHAT MODE    [Ctrl+C] Cancel

AI Provider Configuration

Envark supports multiple AI providers with easy setup:
Models Available:
  • gpt-4o
  • gpt-4-turbo
  • gpt-4
  • gpt-3.5-turbo
/ai-config
# Select OpenAI
# Enter API key
# Choose model

Tips and Best Practices

Use Shortcuts

Learn the single-letter shortcuts (s, r, m, etc.) for faster workflow.

Tab Completion

Press Tab to autocomplete commands from the dropdown instead of typing the full name.

Chat for Learning

Use /chat mode to learn about environment variable best practices interactively.

Clear Often

Use /clear or c to clean up the output and keep your terminal focused.

Architecture

The TUI is built with:
  • React - Component-based UI structure
  • Ink - React renderer for terminal interfaces
  • Three UI Modes - Normal, Config Wizard, Chat
  • Real-time State Management - React hooks for responsive UI
  • Persistent Configuration - AI settings saved to ~/.envark/
See the implementation in src/cli/app.tsx:1-724.

Build docs developers (and LLMs) love