Single binary
Static file server, proxy, and gateway in one executable. Zero third-party Go dependencies — the standard library only.
One Go binary serves your static site and injects .env secrets server-side — invisible to DevTools and the Network tab.
node_modules {VAR} replaced server-side
View raw prompt • View on GitHub • Works with Cursor, Kilo Code, Copilot, Claude
fetch() calls written in front-end JavaScript ship your API key to every
visitor. A conventional backend fixes that but brings a runtime, a dependency
tree, and a deployment to maintain.
envGo is the narrow alternative: a single static binary that serves your HTML and
holds the key. No Node.js, no node_modules, no runtime to install — roughly
2–8 MB depending on platform. See how it compares → Comparison.
Single binary
Static file server, proxy, and gateway in one executable. Zero third-party Go dependencies — the standard library only.
Secrets never reach the browser
{NAME} placeholders are substituted inside the Go process. DevTools, the
Network tab, and browser memory only ever see placeholders and boolean flags.
Fixed-route gateway
Public mode serves /api/<name> from a JSON config, with per-route
variable allow-sets, rate limiting, and optional bearer auth.
Hot reload
Edit .env while running — changes are picked up within about 1.5 seconds, no
restart.
Cross-platform
macOS, Linux, and Windows on amd64 and arm64, all from one codebase.
Built-in diagnostics
A metadata-only dashboard, typo detection for env keys, and warnings when PHP code would expose a secret.
⬇ envgo-windows-amd64.exe · ARM64 build
mkdir C:\envgocopy $env:USERPROFILE\Downloads\envgo-windows-amd64.exe C:\envgo\envgo.exe[Environment]::SetEnvironmentVariable( "Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";C:\envgo", "User")# Open a NEW terminal, then:envgo -vExtract the ZIP and double-click Install_envGo.command, or install manually:
mkdir -p ~/.local/bincp dist/envgo-darwin-arm64 ~/.local/bin/envgo # or envgo-darwin-amd64chmod +x ~/.local/bin/envgoenvgo -vNeed a different build, or a checksum to verify one? Download.
The next two commands are identical on every platform:
mkdir myapp && cd myappenvgo init # writes .env, .env.example, index.html, .gitignore, README.md# put a real key in .env, then:envgo run dev # opens http://127.0.0.1:8080/Your page uses the key without ever seeing it:
<div id="MY_SECRET"></div><script src="/__env.js"></script>// The browser sends the literal text {OPENAI_API_KEY};// the Go process substitutes the real value before forwarding.await fetch("/proxy", { method: "POST", headers: { "Content-Type": "application/json", "X-EnvGo-Token": token }, body: JSON.stringify({ target_url: "https://api.openai.com/v1/chat/completions", headers: { Authorization: "Bearer {OPENAI_API_KEY}" }, }),});The page above pairs with this .env — the <div id="…"> elements and every
{…} placeholder must match a key in the file:
MY_SECRET=some-real-valueOPENAI_API_KEY=sk-your-real-key-hereHOST=127.0.0.1PORT=8080MODE_PUBLIC=false# CONFIG=envgo.routes.jsonHOST/PORT/MODE_PUBLIC/CONFIG are not secrets — they control where and how envGo runs:
HOST/PORT choose where envgo run dev listens (PORT=3000 → http://127.0.0.1:3000/). Only for envgo run.MODE_PUBLIC=true (or MODE=public, ENVGO_MODE, CONFIG=envgo.routes.json) switches to public mode without flags — envgo run dev alone serves /api/<name> with envgo.routes.json. false/local keeps local /proxy mode. Flag --config always wins. See CLI Commands.| Local mode | Public mode | |
|---|---|---|
| Enable with | (default) or MODE_PUBLIC=false in .env | --config envgo.routes.json or MODE_PUBLIC=true / CONFIG=envgo.routes.json in .env |
| Browser calls | /proxy with a session token | /api/<name>, no token |
| Target URL comes from | The browser, restricted by --allow | The config file |
| Rate limiting | None | Per-route, per-IP |
| Use for | Development and private tools | Anything publicly reachable |
Getting Started
Core Concepts
Modes
Guides
Reference
envGo is MIT licensed. Free for personal and commercial use, with no paid tier, no licence key, no usage limit, and no telemetry — the binary makes no outbound connections of its own, only the upstream calls you ask it to proxy.
Feedback is genuinely welcome, and a confusing error message is as useful to hear about as a bug. See License & feedback for where to report an issue, ask a question, or propose a change.
envGo is deliberately small, and it is worth knowing what that costs:
default_rate_limit is empty by default, which means unlimited. Rate
limiting must be opted into explicitly..php source is served as a file rather
than producing an error.trust_proxy: true all clients share one
bucket.The full list is in the Threat Model.