@adewale0o/envlock
v1.3.0
Published
π Envlock β Secure credential vault for AI agents. Store, manage, and inject API keys without exposing them in chat.
Maintainers
Readme
Stop pasting API keys into chat. Store them securely. Let your AI agent access them safely.
π€ The Problem
Every day, millions of users paste API keys, tokens, passwords, and credentials directly into AI chat interfaces. This is dangerous:
| Risk | What Happens | |------|-------------| | π Conversation History | Keys get stored on AI provider servers β forever | | π Data Breaches | If the provider gets hacked, your keys are exposed | | π£ Prompt Injection | Malicious prompts can trick the AI into leaking your keys | | π€ Training Data | Keys might end up in model training data | | π Screen Sharing | Anyone who sees the chat sees your secrets | | π No Revocation | You can't "un-paste" a key from chat history |
π‘ The Solution: Envlock
Envlock is a secure local vault that sits between users and AI agents. Instead of pasting keys into chat, users input them through a secure web form, and AI agents read them through a safe API.
β OLD WAY:
User β [pastes key in chat] β AI Agent β External API
β
Key exposed in chat history, logs, training data
β
ENVLOCK WAY:
User β [pastes key in web form] β Encrypted Vault β AI Agent β External API
β β
Never enters chat Encrypted at rest
Localhost only Agent reads via APIβ‘ Quick Start
Step 1: Install (AI Agent does this)
npm install -g @adewale0o/envlockStep 2: Initialize (AI Agent does this)
envlock init
# You'll set a master password. This encrypts everything.Step 3: Start Web UI (AI Agent does this)
If agent and user are on the same computer:
envlock serve
# β http://127.0.0.1:3847/?token=abc123...If agent is on a server and user is on a different device:
envlock serve --expose
# β http://192.168.1.100:3847/?token=abc123...Step 4: User Opens Link (User does this)
The agent tells the user: "Open this link to add your API keys"
The user:
- Opens the URL in their browser
- Sees a clean form with service templates (OpenAI, Stripe, Discord, etc.)
- Picks the service they want
- Pastes their API key into the form
- Clicks "Save Securely"
- Done! Key is encrypted in the vault. Never touched chat.
Step 5: Agent Reads Keys (AI Agent does this)
envlock get OPENAI_API_KEY
# β sk-1234567890...The Complete Flow
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β User β β Envlock β β AI Agent β
β β β (Vault) β β β
β Opens link ββββββββββΆβ Web form β β β
β Picks svc β β AES-256 β β β
β Pastes key ββββββββββΆβ Encrypts β β β
β β β Stores β β β
β β β βββββββββββ Reads key β
β β β β β Calls API β
β β β β β Done β
β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
Key NEVER enters chat. Key NEVER leaves localhost. Key is ALWAYS encrypted.π€ For AI Agents
Envlock is designed specifically for AI agents to install and manage. Here's how different agents use it:
OpenClaw
# OpenClaw agent runs:
npm install -g envlock && envlock init
# Agent starts web UI, gets URL
envlock serve
# β "Open http://127.0.0.1:3847/?token=xxx to add your keys"
# Agent tells user the URL
# User opens link, adds keys
# Agent reads keys via:
envlock get OPENAI_API_KEY --rawClaude Code
# Claude Code can install and use Envlock:
npm install -g envlock
# Initialize vault
envlock init
# Create slots for needed keys
envlock create ANTHROPIC_API_KEY -d "Anthropic API key" -t api_key
# Start web UI for user input
envlock serve
# Later, read keys programmatically
envlock api get ANTHROPIC_API_KEY --jsonCursor / Windsurf / Any AI Agent
# Any AI agent can use the JSON API
envlock api list --json
envlock api get KEY_NAME --json
envlock api create NEW_KEY --json
envlock api set NEW_KEY --json
envlock api export --jsonAgent API Reference
All agent API calls return JSON and support --json flag:
# List all secrets
envlock api list --json
# β {"success": true, "slots": [{"name": "OPENAI_API_KEY", "type": "api_key", ...}]}
# Get a specific secret
envlock api get OPENAI_API_KEY --json
# β {"success": true, "slot": "OPENAI_API_KEY", "value": "sk-..."}
# Create a new slot
envlock api create NEW_KEY --json
# β {"success": true, "slot": "NEW_KEY"}
# Set a value
envlock api set NEW_KEY --json
# β {"success": true, "slot": "NEW_KEY"}
# Export all secrets as env vars
envlock api export --json
# β {"success": true, "secrets": {"KEY1": "val1", "KEY2": "val2"}}
# Check vault status
envlock api status --json
# β {"success": true, "initialized": true, "locked": false, "slots": 5}Agent Permissions
When registering agents, you can set granular permissions:
# Register with specific permissions
envlock api register --json
# Permissions: read, list, write, create, delete, execute
# Scoped access β agent only sees specific slots
envlock api register --json
# allowedSlots: ["OPENAI_API_KEY", "STRIPE_KEY"]π Web UI β The Core Feature
The web UI is why Envlock exists β instead of pasting API keys into chat (where they get logged, stored, and potentially leaked), users paste them into a clean web form that goes straight into an encrypted vault.
β DON'T DO THIS:
User: "here's my API key: sk-1234567890..."
β Key is now in chat history, logs, training data
β
DO THIS INSTEAD:
Agent: "Open http://127.0.0.1:3847/?token=xxx to add your keys"
User: *opens link, picks OpenAI, pastes key in form*
β Key goes directly into encrypted vault. Never in chat.Two Modes β Which One Do I Use?
Mode 1: Localhost (Default)
envlock serveYour Computer
ββββββββββββββββββββββββββββββββ
β AI Agent (OpenClaw, etc.) β
β β β
β Envlock Vault (encrypted) β
β β β
β Web UI at 127.0.0.1:3847 ββββ Only accessible from THIS machine
ββββββββββββββββββββββββββββββββWhen to use:
- β AI agent runs on YOUR computer (Cursor, Claude Code desktop, OpenClaw local)
- β You open the browser on the SAME machine
- β Most secure β nothing leaves your computer
How it works:
- Agent runs
envlock serve - Agent gives you the URL:
http://127.0.0.1:3847/?token=abc123 - You open that URL in your browser ON THE SAME COMPUTER
- You see the form, pick a service, paste your key
- Key is encrypted and stored locally
- Agent reads it when needed
Who can access: Only you, from the same machine. Nobody else can reach 127.0.0.1.
Mode 2: Network Exposed (--expose)
envlock serve --exposeYour VPS/Server Your Laptop/Phone
ββββββββββββββββββββββββ ββββββββββββββββ
β AI Agent β β Browser β
β β β β β
β Envlock Vault ββββββββββββ You open β
β β β network β the URL β
β Web UI at β β β
β 0.0.0.0:3847 β ββββββββββββββββ
ββββββββββββββββββββββββWhen to use:
- β AI agent runs on a VPS/cloud server (DigitalOcean, AWS, etc.)
- β You want to add keys from your laptop or phone
- β You're on the same WiFi/LAN network as the server
How it works:
- Agent runs
envlock serve --exposeon the server - Agent gives you the URL:
http://192.168.1.100:3847/?token=abc123 - You open that URL from ANY device on the same network
- You see the form, pick a service, paste your key
- Key is encrypted and stored on the server
- Agent reads it when needed
Who can access: Anyone on the same network who has the token URL. The token is required β without it, you just see a "enter token" page.
Quick Decision Guide
| Your Setup | Command | Why |
|------------|---------|-----|
| Agent on my laptop, I use my laptop | envlock serve | Same machine = localhost is enough |
| Agent on a VPS, I use my laptop | envlock serve --expose | Different machines = need network access |
| Agent on a VPS, I'm on the internet | envlock serve --expose + firewall/port forward | Need to open port on your VPS |
| Just me, just testing | envlock serve | Simplest option |
Security β Is This Safe?
Yes. Here's why:
| Layer | Protection |
|-------|-----------|
| π Token auth | URL contains a random 32-char token. No token = no access |
| π Localhost default | Only exposed to the internet if YOU choose --expose |
| π Encrypted | All secrets are AES-256 encrypted on disk |
| π« No chat | Keys never enter conversation history |
| π Audit log | Every access is logged with timestamp |
| β° One-time token | Token changes each time you restart envlock serve |
Even with --expose:
- The server only listens on your local network (LAN), not the internet
- A random token is required for every request
- Without the token, you see nothing useful
- The token changes every restart
Web UI Features
| Feature | Description |
|---------|-------------|
| π¨ Clean Dark UI | Purple-themed, minimal, not generic AI slop |
| π 46 Templates | Pick OpenAI, Stripe, Discord, AWS, etc. |
| π Bulk Add | Paste multiple NAME=value pairs at once |
| π₯ Import .env | Paste your existing .env file |
| π Encrypted | All data encrypted immediately |
| π Token Protected | URL contains one-time access token |
What Users See
Dashboard:
ββββββββββββββββββββββββββββββββββββββββββββββββ
β π Envlock 5 secrets [+ Add] β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β Your Secrets β
β βββββββββββ βββββββββββ βββββββββββ β
β β π β β π« β β π β β
β β OPENAI β β STRIPE β β DB_URL β β
β β β
Set β β β
Set β β β
Set β β
β βββββββββββ βββββββββββ βββββββββββ β
β β
β Add by Service β
β π€ AI & Machine Learning β
β βββββββ βββββββ βββββββ βββββββ β
β βOpenAIβ βAnthroβ βGeminiβ β HF β β
β βββββββ βββββββ βββββββ βββββββ β
β π± Social Media β
β βββββββ βββββββ βββββββ βββββββ β
β βTwittrβ βDiscrdβ βTelegrβ βSlackβ β
β βββββββ βββββββ βββββββ βββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββAdd Secret Form (e.g., OpenAI):
ββββββββββββββββββββββββββββββββββββββββββββββββ
β β Back π€ OpenAI β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β API Key * β
β ββββββββββββββββββββββββββββββββββββββββ β
β β sk-... ποΈ β β
β ββββββββββββββββββββββββββββββββββββββββ β
β β
β Organization ID β
β ββββββββββββββββββββββββββββββββββββββββ β
β β org-... β β
β ββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββ β
β β π Save Securely β β
β ββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββπ¦ 46 Service Templates
Pre-built forms so users don't have to figure out field names. Agents can use templates programmatically:
# List all templates
envlock templates
# List by category
envlock templates -c social
# Use a template interactively
envlock from-template openai
# Use via web UI
# β http://127.0.0.1:PORT/add?template=openai&token=xxxπ€ AI & Machine Learning (5)
| ID | Service | Fields |
|----|---------|--------|
| openai | OpenAI | API Key, Org ID |
| anthropic | Anthropic (Claude) | API Key |
| google-ai | Google AI (Gemini) | API Key |
| huggingface | Hugging Face | Access Token |
| replicate | Replicate | API Token |
π± Social Media (11)
| ID | Service | Fields |
|----|---------|--------|
| twitter | Twitter / X | API Key, API Secret, Access Token, Access Secret, Bearer Token |
| discord | Discord | Bot Token, Client ID, Client Secret |
| telegram | Telegram | Bot Token, Chat ID |
| slack | Slack | Bot Token, App Token, Webhook URL |
| instagram | Instagram | Username, Password, Access Token |
| facebook | Facebook / Meta | Access Token, App ID, App Secret |
| linkedin | LinkedIn | Access Token, Client ID, Client Secret |
| youtube | YouTube / Google | API Key, Client ID, Client Secret, Refresh Token |
| tiktok | TikTok | Access Token, Client Key, Client Secret |
| reddit | Reddit | Client ID, Client Secret, Username, Password |
| pinterest | Pinterest | Access Token, App ID |
π οΈ Developer Tools (1)
| ID | Service | Fields |
|----|---------|--------|
| github | GitHub | Personal Access Token, Username |
βοΈ Cloud & Infrastructure (7)
| ID | Service | Fields |
|----|---------|--------|
| aws | AWS | Access Key ID, Secret Access Key, Region, Session Token |
| gcp | Google Cloud | Project ID, Service Account JSON |
| azure | Azure | Client ID, Client Secret, Tenant ID, Subscription ID |
| vercel | Vercel | API Token |
| netlify | Netlify | Auth Token |
| digitalocean | DigitalOcean | API Token |
| flyio | Fly.io | API Token |
ποΈ Databases (6)
| ID | Service | Fields |
|----|---------|--------|
| postgres | PostgreSQL | Connection URL, Host, Port, User, Password, Database |
| mysql | MySQL | Connection URL, Host, User, Password, Database |
| mongodb | MongoDB | Connection URI |
| redis | Redis | Connection URL |
| firebase | Firebase | API Key, Auth Domain, Project ID, Service Account |
| supabase | Supabase | Project URL, Anon Key, Service Role Key |
π³ Payments (2)
| ID | Service | Fields |
|----|---------|--------|
| stripe | Stripe | Secret Key, Publishable Key, Webhook Secret |
| paypal | PayPal | Client ID, Client Secret, Mode |
π§ Email & Communication (3)
| ID | Service | Fields |
|----|---------|--------|
| sendgrid | SendGrid | API Key |
| mailgun | Mailgun | API Key, Domain |
| twilio | Twilio | Account SID, Auth Token, Phone Number |
π Analytics & Monitoring (3)
| ID | Service | Fields |
|----|---------|--------|
| datadog | Datadog | API Key, Application Key |
| sentry | Sentry | DSN, Auth Token |
| newrelic | New Relic | License Key, App Name |
π DevOps & CI/CD (2)
| ID | Service | Fields |
|----|---------|--------|
| docker | Docker Hub | Username, Password |
| npm | npm | Access Token |
π‘οΈ VPN & Network (2)
| ID | Service | Fields |
|----|---------|--------|
| vpn | VPN Credentials | Server, Username, Password, Config |
| ssh | SSH Key | Host, Username, Private Key, Passphrase |
π§ Custom / Generic (4)
| ID | Service | Fields |
|----|---------|--------|
| api-key | Generic API Key | API Key, API Secret, Base URL |
| oauth | OAuth Credentials | Client ID, Client Secret, Redirect URI, Access Token, Refresh Token |
| basic-auth | Username & Password | Username, Password |
| bearer-token | Bearer Token | Token, Base URL |
π Commands
Core Vault
| Command | Description |
|---------|-------------|
| envlock init | Initialize vault with master password |
| envlock create <name> | Create a new secret slot |
| envlock set <name> | Set value for a secret |
| envlock get <name> | Retrieve a secret |
| envlock delete <name> | Delete a secret |
| envlock list | List all secret slots |
| envlock status | Show vault status |
Web UI & Templates
| Command | Description |
|---------|-------------|
| envlock serve | π Start web UI for users to input secrets |
| envlock templates | π List 46 service templates |
| envlock from-template <id> | β Add credentials from a template |
| envlock import-env <file> | π₯ Import secrets from a .env file |
Generation & Analysis
| Command | Description |
|---------|-------------|
| envlock generate | π Generate passwords, API keys, tokens, UUIDs |
| envlock strength [pwd] | πͺ Analyze password strength |
| envlock health [name] | π₯ Check credential format validity |
Organization
| Command | Description |
|---------|-------------|
| envlock search <query> | π Search secrets by name, description, or tags |
| envlock tag <name> <tags> | π·οΈ Add tags to a secret |
| envlock fav <name> | β Toggle favorite status |
| envlock history [name] | π View change history |
| envlock profiles | π Manage environment profiles (dev/staging/prod) |
Security & Sharing
| Command | Description |
|---------|-------------|
| envlock lock | π Lock the vault |
| envlock unlock | π Unlock the vault |
| envlock rotate | π Change master password |
| envlock backup | πΎ Create encrypted backup |
| envlock restore <id> | β»οΈ Restore from backup |
| envlock backups | π List backups |
| envlock share <name> | π Create shareable encrypted bundle |
| envlock import <bundle> | π₯ Import encrypted bundle |
Export & Injection
| Command | Description |
|---------|-------------|
| envlock export | Export secrets as env vars (shell/dotenv/docker/json) |
| envlock inject <cmd> | Run a command with secrets injected |
| envlock api <method> | π€ Agent API (JSON in/out) |
System
| Command | Description |
|---------|-------------|
| envlock audit | π View audit log |
| envlock config | βοΈ View/set configuration |
π Security
Encryption
| Layer | Algorithm | Details |
|-------|-----------|---------|
| Vault | AES-256-CBC | All secrets encrypted at rest |
| Key Derivation | PBKDF2 | 100,000 iterations, SHA-256 |
| File Permissions | 0600 | Owner-only read/write |
| Web UI | Token-protected | One-time access token in URL |
| Network | Localhost only | Never exposed to internet |
What Gets Stored
~/.envlock/
βββ vault.enc # π Your encrypted secrets
βββ slots.enc # π Slot metadata (names, types, tags)
βββ meta.json # π Vault metadata
βββ config.json # βοΈ Configuration
βββ audit.json # π Audit log
βββ agents.json # π€ Registered agents
βββ agent-requests.json # π Pending access requests
βββ profiles/ # π Environment profiles
βββ history/ # π Change history
βββ backups/ # πΎ Encrypted backupsAudit Log
Every action is logged with timestamp and details:
envlock auditπ Envlock Audit Log:
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββββββ
β Time β Event β Details β
βββββββββββββββββββββββββββββββΌββββββββββββββββββΌββββββββββββββββββββ€
β 5/2/2026, 4:30:00 AM β vault_init β - β
β 5/2/2026, 4:30:05 AM β slot_created β {"name":"OPENAI"} β
β 5/2/2026, 4:30:10 AM β secret_set β {"name":"OPENAI"} β
β 5/2/2026, 4:31:00 AM β secret_accessed β {"name":"OPENAI"} β
β 5/2/2026, 4:32:00 AM β webui_started β {"port":3847} β
βββββββββββββββββββββββββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββπ― Export Formats
# Shell
envlock export --format shell
export OPENAI_API_KEY="sk-..."
export STRIPE_SECRET_KEY="sk_live_..."
# dotenv
envlock export --format dotenv
OPENAI_API_KEY="sk-..."
STRIPE_SECRET_KEY="sk_live_..."
# Docker
envlock export --format docker
-e OPENAI_API_KEY="sk-..." -e STRIPE_SECRET_KEY="sk_live_..."
# JSON
envlock export --format json
{"OPENAI_API_KEY": "sk-...", "STRIPE_SECRET_KEY": "sk_live_..."}Inject into Commands
# Run any command with secrets as env vars
envlock inject node app.js
envlock inject python main.py
envlock inject docker compose upπ Password Generator
Generate secure passwords, API keys, tokens, and UUIDs:
# Generate a password
envlock generate --type password --length 32
# Generate an API key with prefix
envlock generate --type apikey --prefix sk
# Generate a token
envlock generate --type token --length 64
# Generate a UUID
envlock generate --type uuid
# Generate and save directly
envlock generate --type password --length 24 --save MY_PASSWORD
# Analyze password strength
envlock strength "MyP@ssw0rd!"
# β Score: π Excellent
# β Entropy: ~72 bits
# β Length: 12 charsπ Environment Profiles
Manage separate secrets for different environments:
# Create profiles
envlock profiles --create dev
envlock profiles --create staging
envlock profiles --create prod
# List profiles
envlock profiles
# Compare profiles
envlock profiles --diff dev,prodπ₯ Health Checks
Validate that your credentials are correctly formatted:
# Check all secrets
envlock health
# Check a specific secret
envlock health OPENAI_API_KEYπ₯ Credential Health Check:
ββββββββββββββββββββββ¬βββββββββββ¬βββββββββββ
β Secret β Format β Details β
ββββββββββββββββββββββΌβββββββββββΌβββββββββββ€
β OPENAI_API_KEY β β
Valid β OpenAI β
β GITHUB_TOKEN β β
Valid β GitHub β
β SHORT_KEY β β οΈ Check β Too shortβ
ββββββββββββββββββββββ΄βββββββββββ΄βββββββββββπ§ Technical Deep Dive β What's Happening in the Background
The Full Flow (Step by Step)
When an AI agent uses Envlock, here's exactly what happens at each layer:
1. Installation
npm install -g @adewale0o/envlock- npm downloads the package to your global
node_modules - The
envlockandelcommands become available globally - No background services, no daemons, no system modifications
- Everything runs on-demand when you invoke a command
2. Initialization (envlock init)
User enters master password
β
PBKDF2 derives encryption key (100,000 iterations, SHA-256)
β
Creates ~/.envlock/ directory (permissions: 0700)
β
Creates vault.enc (AES-256 encrypted, permissions: 0600)
β
Creates slots.enc (encrypted metadata, permissions: 0600)
β
Creates meta.json, config.json, audit.jsonWhat's stored on disk:
~/.envlock/vault.encβ Your secrets, encrypted with AES-256-CBC~/.envlock/slots.encβ Slot metadata (names, types, tags), also encrypted~/.envlock/meta.jsonβ Vault creation date, version (not encrypted, no secrets)~/.envlock/config.jsonβ Your preferences (not encrypted, no secrets)~/.envlock/audit.jsonβ Access log (not encrypted, no secrets)
3. Web UI (envlock serve)
envlock serve
β
Generates random 32-char access token
β
Starts HTTP server on 127.0.0.1:RANDOM_PORT (or 0.0.0.0 with --expose)
β
Serves HTML/CSS/JS directly from memory (no external dependencies)
β
User opens URL with token in browser
β
Token is validated on every request (query param or header)
β
User fills form β POST /api/secret β encrypted immediately β saved to vault.enc
β
Server runs until Ctrl+CThe web server:
- Pure Node.js
http.createServerβ no Express, no frameworks - All HTML/CSS/JS is embedded in the source code (no external assets)
- Token is required for every API request
- Without token, user sees a "enter token" page
- Server binds to localhost by default (127.0.0.1)
- With
--expose, binds to 0.0.0.0 (all network interfaces) - CORS headers set for local development
- No WebSocket, no long-polling β simple HTTP request/response
4. Agent API (envlock api)
envlock api get OPENAI_API_KEY --jsonAgent calls: envlock api get OPENAI_API_KEY --json
β
CLI loads vault.enc, decrypts with master key
β
Finds slot OPENAI_API_KEY in slots
β
Decrypts value from vault
β
Outputs JSON: {"success": true, "slot": "OPENAI_API_KEY", "value": "sk-..."}
β
Agent uses the value to call OpenAI APIAgent permissions:
- Agents register with
envlock api register - Each agent has:
permissions(read/list/write/create/delete/execute) - Each agent has:
allowedSlots(which secrets they can access, or*for all) - Rate limiting: max 1000 requests/hour per agent (configurable)
- All access logged in audit.json
5. Encryption Details
| Layer | Algorithm | Key Size | Details | |-------|-----------|----------|---------| | Key Derivation | PBKDF2 | 256-bit | 100,000 iterations, SHA-256 | | Vault Encryption | AES-256-CBC | 256-bit | Each value encrypted separately | | Backup Encryption | AES-256-CBC | 256-bit | Entire vault bundled and encrypted | | Share Bundles | AES-256-CBC | 256-bit | Single secret encrypted with bundle password | | Profile Export | AES-256-CBC | 256-bit | Profile data encrypted with password |
How encryption works:
- You set a master password
- PBKDF2 turns that password into a 256-bit key (100,000 iterations)
- Every secret is individually encrypted with AES-256-CBC using that key
- The encrypted data is written to
vault.enc - Without the master password, the data is unreadable
- Even if someone steals
vault.enc, they can't decrypt it without your password
6. Network Modes Explained
Localhost Mode (envlock serve):
βββββββββββββββββββββββββββββββββββ
β Your Computer β
β β
β βββββββββββββ βββββββββββββ β
β β AI Agent β β Browser β β
β β (Node.js) β β (Chrome) β β
β βββββββ¬ββββββ βββββββ¬ββββββ β
β β β β
β ββββββββ¬ββββββββ β
β β β
β ββββββββΌβββββββ β
β β Envlock β β
β β 127.0.0.1 β β
β βββββββββββββββ β
βββββββββββββββββββββββββββββββββββ- Server binds to
127.0.0.1(loopback address) - Only processes on THIS machine can connect
- Your phone, another computer, or the internet CANNOT reach it
- This is the safest option
Network Mode (envlock serve --expose):
ββββββββββββββββββββββββ ββββββββββββββββββββ
β Your VPS/Server β β Your Laptop β
β β β β
β ββββββββββββ β LAN β ββββββββββββ β
β βAI Agent β β ββββββ β β Browser β β
β ββββββ¬ββββββ β β ββββββββββββ β
β β β β β
β ββββββΌβββββββ β ββββββββββββββββββββ
β βEnvlock β β
β β0.0.0.0 β β
β ββββββββββββ β
ββββββββββββββββββββββββ- Server binds to
0.0.0.0(all network interfaces) - Accessible from any device on the same network
- "Same network" means: same WiFi, same LAN, same VPN, or same private cloud network
- NOT accessible from the internet (unless you open ports on your firewall)
- Token authentication still required
What "same network" actually means:
| Scenario | Same Network? | Works? |
|----------|--------------|--------|
| Laptop + phone on home WiFi | β
Yes | --expose works |
| Two computers in same office | β
Yes | --expose works |
| VPS + your laptop via VPN | β
Yes | --expose works |
| Your laptop + friend's laptop (different houses) | β No | Need tunnel or port forward |
| Your laptop + random VPS on internet | β No | Need firewall rule + port forward |
If you need internet access (advanced):
- Open the port on your VPS firewall (e.g.,
ufw allow 3847) - Use the VPS's public IP:
http://YOUR_VPS_IP:3847/?token=xxx - Or use a tunnel:
ngrok http 3847(creates a temporary public URL) - β οΈ Only do this if you understand the security implications
ποΈ Architecture
envlock/
βββ src/
β βββ index.js # Main CLI (33 commands)
β βββ lib/
β βββ vault.js # π Core encrypted vault
β βββ agent-bridge.js # π€ Agent API system
β βββ web-ui.js # π Web server + UI
β βββ templates.js # π¦ 46 service templates
β βββ password-gen.js # π Password generator
β βββ profiles.js # π Environment profiles
β βββ history.js # π Change history
β βββ health-check.js # π₯ Credential validation
β βββ backup.js # πΎ Backup/restore
β βββ audit.js # π Audit logging
β βββ config.js # βοΈ Configuration
β βββ logo.js # π¨ ASCII art
βββ tests/
β βββ test.js # β
42 tests
βββ README.md
βββ LICENSE # MIT
βββ package.jsonπ€ Contributing
- Fork it
- Create your branch (
git checkout -b feature/awesome) - Commit (
git commit -m 'Add awesome feature') - Push (
git push origin feature/awesome) - Open a PR
π License
MIT Β© Envlock Contributors
