Prerequisites
Before installing Envark, ensure your system meets these requirements:
Node.js Version
Node.js 18.0.0 or higher is requirednode --version
# Should output v18.0.0 or higher
Package Manager
One of: npm (comes with Node.js), yarn, pnpm, or bun
Terminal Access
A modern terminal that supports ANSI colors and Unicode characters for the best TUI experience
Envark requires Node.js 18+ as specified in package.json engines field. Earlier versions are not supported.
Installation Methods
Choose the installation method that works best for your workflow:
Quick Start (No Installation)
The fastest way to try Envark - no installation required:
This method downloads and runs Envark in one command. Perfect for CI/CD pipelines or trying before installing.
Global Installation
Install Envark globally to run it from anywhere on your system:
After global installation, run Envark with:
Project-Local Installation
Add Envark as a dev dependency to your project:
npm install --save-dev envark
Run via package.json scripts or npx:
{
"scripts" : {
"env:check" : "envark scan" ,
"env:risk" : "envark risk critical" ,
"env:validate" : "envark validate .env"
}
}
Local installation is recommended for CI/CD integration to lock the Envark version with your project dependencies.
Build from Source
For development or contributing to Envark:
Clone Repository
git clone https://github.com/yourusername/envark.git
cd envark
Build TypeScript
This compiles src/ to dist/ using TypeScript.
Run Development Version
# Run without building (uses bun)
npm run dev
# Or run the built version
npm start
The npm run dev command uses bun to run TypeScript directly from src/index.ts without compilation - great for rapid development.
Verify Installation
Confirm Envark is installed correctly:
Check Version
View Help
Test Interactive Mode
envark --version
# Output: envark v0.1.1
MCP Server Configuration
To use Envark as an MCP server with AI-powered IDEs, you need to configure your IDE:
Automatic Configuration
Envark provides an init command that auto-configures supported IDEs:
VS Code
Claude Desktop
Cursor
Windsurf
envark init vscode
# Creates .vscode/mcp.json in current directory
If the config file already exists, Envark will print the configuration instead of overwriting. You’ll need to manually merge the settings.
Manual Configuration
If automatic configuration fails or you need custom settings, manually add Envark to your IDE’s MCP config:
VS Code (.vscode/mcp.json)
Claude/Cursor/Windsurf
{
"servers" : {
"envark" : {
"type" : "stdio" ,
"command" : "npx" ,
"args" : [ "-y" , "envark" ]
}
}
}
Using npx -y envark ensures the latest version runs without installation. For locked versions, use a local installation and specify the path: "command": "node_modules/.bin/envark"
Restart Your IDE
After configuration, restart your IDE to load the MCP server:
Verify MCP connection
Check your IDE’s MCP server status panel. Envark should appear as “Connected”.
Configuration Files
Envark creates these files during operation:
Path Purpose .envark/cache.jsonCached scan results with file hashes .envark/ai-history.jsonAI conversation history (if using AI features)
Add .envark/ to your .gitignore to avoid committing cache files:
Environment Variables for AI Features
If you plan to use Envark’s AI assistant, configure your preferred provider:
OpenAI
Anthropic Claude
Google Gemini
Ollama (Local)
export OPENAI_API_KEY = "sk-..."
You can also configure AI providers interactively in TUI mode with the /config command.
Troubleshooting
Command Not Found
If envark command is not recognized after global installation:
# Check npm global bin path is in your PATH
npm config get prefix
# Should output a directory like /usr/local or ~/.npm-global
# Add to PATH if needed (add to ~/.bashrc or ~/.zshrc)
export PATH = "$( npm config get prefix)/bin: $PATH "
Permission Errors
On Linux/macOS, you might need sudo for global installation:
# Option 1: Use sudo (not recommended)
sudo npm install -g envark
# Option 2: Fix npm permissions (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH =~ /. npm-global / bin : $PATH
npm install -g envark
Node Version Too Old
Envark requires Node.js 18+. Upgrade with:
nvm install 18
nvm use 18
MCP Server Not Connecting
Verify config path
Ensure the MCP config file is in the correct location for your IDE
Check JSON syntax
Validate your MCP config JSON has no syntax errors
Test standalone
Run npx envark in terminal to verify Envark works outside the IDE
Check IDE logs
Look for MCP connection errors in your IDE’s developer console
Updating Envark
Keep Envark up to date for the latest features and bug fixes:
Global Installation
Project-Local
Check for Updates
When using npx envark, you always get the latest version unless you specify a version: npx [email protected]
Next Steps
Now that Envark is installed, learn how to use it:
Quickstart Guide Complete tutorial from first scan to advanced features
CLI Reference Comprehensive command-line documentation