Overview
Envark provides multiple execution modes to fit your workflow:- Interactive TUI - Full-featured terminal interface
- Direct Commands - Run individual commands from the shell
- MCP Server - Background service for AI assistants
Usage Patterns
Command Reference
envark
Launches the interactive TUI or starts the MCP server based on context.- If
stdinis a TTY (interactive terminal): Launch full TUI mode - If
stdinis piped: Start MCP server for AI assistant integration - No arguments required
0- Success1- Fatal error
envark -i, —interactive
Explicitly launch interactive TUI mode.-i--interactivetui
- Persistent readline interface
- Command history (100 entries)
- Tab completion
- Dropdown command menu (
/) - Real-time output rendering
envark init
Initialize MCP configuration for AI assistants.Target IDE or AI assistant platform.Options:
claude- Claude Desktop (default)cursor- Cursor editorvscode- Visual Studio Codewindsurf- Windsurf IDE
VS Code Format
Claude/Cursor/Windsurf Format
- If config file exists: Prints manual instructions without overwriting
- If directory doesn’t exist: Creates parent directories automatically
- Invalid IDE: Exits with code
1and lists valid options
envark help
Display help information.help--help-h
- Command list
- Supported IDEs
- Usage examples
- Documentation links
envark version
Display version information.version--version-v
Note: The output currently shows “argis” - this is a known issue in the source code at src/index.ts:285.
Direct Command Execution
All TUI commands can be executed directly from the shell:Exit Codes
| Code | Meaning |
|---|---|
0 | Successful execution |
1 | Fatal error or invalid arguments |
- Unknown IDE in
initcommand - File system errors during config creation
- Unhandled exceptions in tool execution
- Invalid command arguments
Environment Variables
Envark respects these environment variables:OpenAI API key for AI assistant features.Used by: AI commands (
/ask, /analyze, etc.)Anthropic API key for Claude integration.Used by: AI commands when OpenAI is not configured
Google Gemini API key.Alternative name:
GOOGLE_API_KEYUsed by: AI commands when OpenAI/Anthropic not configuredOllama model name for local AI.Default:
llama3.2Used by: AI commands as fallback (no API key required)Signal Handling
Envark gracefully handles termination signals: SIGINT (Ctrl+C):- In TUI mode: Displays goodbye message and exits
- In MCP mode: Closes server connection cleanly
- Closes MCP server connection
- Exits with code
0
Working Directory
All commands operate on the current working directory by default:cd command to change directories:
Performance
Typical command execution times:| Project Size | Scan Time | Risk Analysis | Validation |
|---|---|---|---|
| Small (< 50 files) | < 500ms | < 200ms | < 100ms |
| Medium (50-500 files) | < 2s | < 1s | < 500ms |
| Large (> 500 files) | 2-5s | 1-3s | < 1s |
- Results cached in
.envark/cache.json - Cache invalidated on file changes
- Reduces subsequent scan times by 80%+
Examples
Quick Project Audit
CI/CD Integration
GitHub Actions
Pre-commit Hook
.git/hooks/pre-commit
Docker Integration
Dockerfile