Skip to content

Repository files navigation

EnvHaven

EnvHaven

Batteries-included development environment for agentic workflows.

Build License: MIT

EnvHaven product overview

As tools like Claude Code, OpenCode and Codex gain agency, they need full system access to be effective. Running them locally carries risk (rm -rf accidents, credential leaks) and friction (installing runtimes, approving every action).

EnvHaven is an isolated, remote environment with every major AI coding tool built-in. The container provides the isolation, so all agents ship with full access by default. No approval prompts, no confirmation dialogs. Your local machine stays untouched.

Workflow Freedom:

  • Browser-only: Deploy the image, open VS Code in your browser, run opencode. Zero setup.
  • Local editor + remote AI: Use the Haven CLI to sync your project. Edit in Neovim, Zed, Jetbrains, et al. while agents run in the container. Changes sync in ~200ms.

Why EnvHaven

πŸ›‘οΈ Zero-Risk AI environment Give autonomous agents full access in a containerized environment. If they break something, nuke the workspace and start over. Your local machine stays untouched.

πŸ–₯️ Pick Up Where You Left Off Start Claude Code on your laptop, close the lid, resume from your desktop: same session, same state. Your AI agents and dev servers keep running while you're away. Come back from any device.

🌲 Evergreen AI Tooling The landscape moves too fast to manage manually. EnvHaven ships with 17 AI CLI tools (Claude Code, OpenCode, Codex, Kimi Code CLI, Muse Code, Goose, etc.) built-in and ready to run.

🌐 Instant Public URLs (Managed only) Every managed workspace gets a wildcard *.envhaven.app domain. Deploy a web app, webhook receiver, or Discord bot. Live instantly, with no ngrok, no tunnels, no DNS.

πŸ’Ύ Persistent & Owned Unlike ephemeral environments (Codespaces) or walled gardens (Replit), EnvHaven workspaces are persistent Linux environments you own.

⚑ Open Model

  • Self-Hosted: Free forever, open-source Docker image and CLI. Run it on your own server.
  • Managed (from $12/mo): Zero-config hosting with custom domains, always-on workspaces, and no DevOps.

Who It's For

Persona Use Case
Vibe Coders That ship by prompting their way to products. Need a "magic box" where code just runs, already fully setup.
AI-Native Devs Power users of agentic coding tools like Claude Code or OpenCode that want a standardized, pre-configured backend for their agents.
Setup Purists Developers married to their beautifully tuned and customized editor. Use Haven CLI to keep your workflow while agents run wild in a contained environment.
Bot Builders Those who vibe-code 24/7 persistent scripts (Discord, Telegram or even trading bots).

Quick Start

Path A: Browser-Only (Zero Setup)

Deploy the image and code immediately in the browser.

docker run -d \
  --name envhaven \
  -p 8443:8443 \
  -p 2222:22 \
  -e PASSWORD=password \
  -e SUDO_PASSWORD=password \
  ghcr.io/envhaven/envhaven:latest
  1. Open http://localhost:8443 (Password: password)
  2. Open terminal; you're dropped into a persistent session
  3. Run opencode, claude, or codex and start coding

Path B: Local Editor + Remote AI (Haven CLI)

Use your local editor. Files sync bidirectionally. Agents run in the container.

1. Install Haven CLI

curl -fsSL https://envhaven.com/install.sh | bash

2. Connect to your workspace

cd my-project

# Managed workspace (shorthand)
haven connect . myproject-alice

# Self-hosted container
haven connect . abc@your-server.com:2222

Files sync in ~200ms.

3. Run remote commands

haven opencode     # Runs OpenCode in the container
haven make build   # Runs make in the container
haven npm install  # Runs npm in the container

Self-hosted? You'll need to configure SSH keys first. See SSH Access.

What's Included

The image (ghcr.io/envhaven/envhaven) comes batteries-included.

AI Coding Agents

No API keys are pre-set. You can set them directly in the UI via the bundled EnvHaven Extension in code-server.

You can also provide your own keys via env vars (-e ANTHROPIC_API_KEY=...) or config files.

The image includes 17 AI coding agents.

Tool Command Description Authentication
Claude Code claude Anthropic's official CLI ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, or /login in the CLI
Codex codex OpenAI's coding agent ChatGPT/device login, an API key via codex login --with-api-key, or CODEX_ACCESS_TOKEN
OpenCode opencode AI coding agent from Anomaly ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, or GOOGLE_API_KEY
Antigravity CLI agy Google's agent-first CLI GEMINI_API_KEY, or run agy to sign in
Grok Build grok SpaceXAI's coding agent XAI_API_KEY or grok login --device-auth
Kimi Code CLI kimi Moonshot AI's open-source coding agent kimi login --region global (use mainland-cn for kimi.com)
Muse Code muse Meta's agentic coding assistant META_API_KEY or browser sign-in on first run
OpenClaw openclaw Personal AI assistant gateway Provider API keys or openclaw onboard
Hermes Agent hermes Self-improving agent from Nous Research Provider API keys or hermes setup
Pi pi Minimal extensible coding agent Provider API keys or /login in the CLI
Goose goose Extensible open-source agent ANTHROPIC_API_KEY or OPENAI_API_KEY; run goose configure
Qwen Code qwen Alibaba's coding assistant OPENAI_API_KEY with an OpenAI-compatible endpoint
Mistral Vibe vibe Mistral's minimal CLI coding agent MISTRAL_API_KEY
Factory droid Factory's Droid coding agent Browser login or FACTORY_API_KEY
Kiro kiro-cli AWS-powered AI CLI Browser or device-flow login
Amp amp Frontier coding agent AMP_API_KEY or amp login
fx fx Tiny native coding agent from Vercel Labs AI_GATEWAY_API_KEY, or run fx to sign in

Zero-Friction Permissions

EnvHaven workspaces are structurally isolated. The container provides the isolation, so all agents are pre-configured with full access by default. No approval prompts, no confirmation dialogs. Agents execute immediately.

You can re-enable prompts per tool by editing the relevant config or unsetting the env var. See the in-workspace AGENTS.md for details.

Runtimes & SDKs

Language Version Notes
Node.js 22.x LTS
Bun 1.3.5 Fast JS runtime
Python 3.12 Via mise
Go 1.22
Rust Stable Via rustup

Dev Tools

  • Core: zsh, git, curl, wget, unzip
  • Utils: ripgrep, fd, jq, sqlite3, htop
  • Media: ffmpeg (video/audio), playwright (browser automation)
  • Integrations: gh (GitHub CLI), docker (client)

Haven CLI Architecture

The CLI enables a hybrid workflow: Local Editor + Remote Compute.

  • Latency: ~200ms bidirectional sync.
  • Compatibility: Works with any editor.
  • Independence: The sync daemon runs in the background; close the CLI and sync continues.
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                            YOUR MACHINE                                β”‚
β”‚                                                                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  Local Editors  β”‚     β”‚    Haven CLI    β”‚     β”‚  Local Builds   β”‚   β”‚
β”‚  β”‚                 β”‚     β”‚                 β”‚     β”‚                 β”‚   β”‚
β”‚  β”‚  vim            β”‚     β”‚  haven connect  β”‚     β”‚  binaries       β”‚   β”‚
β”‚  β”‚  vscode         β”‚     β”‚  haven status   β”‚     β”‚  native apps    β”‚   β”‚
β”‚  β”‚  zed            β”‚     β”‚  haven <cmd>    β”‚     β”‚  certs+signing  β”‚   β”‚
β”‚  β”‚                 β”‚     β”‚                 β”‚     β”‚                 β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚           β”‚                       β”‚                       β”‚            β”‚
β”‚           β–Ό                       β–Ό                       β–Ό            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                    ~/projects/myapp/                             β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                   β–²                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                           Files sync in ~200ms
                        via SSH + Mutagen Protocol
                                    β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                   β–Ό                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                    /config/workspace/myapp/                      β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚           β–²                       β–²                       β–²            β”‚
β”‚           β”‚                       β”‚                       β”‚            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  Claude Code    β”‚     β”‚    OpenCode     β”‚     β”‚     Codex       β”‚   β”‚
β”‚  β”‚  Long-running   β”‚     β”‚  Long-running   β”‚     β”‚  Task-based     β”‚   β”‚
β”‚  β”‚  AI sessions    β”‚     β”‚  AI sessions    β”‚     β”‚  AI sessions    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                        β”‚
β”‚                          ENVHAVEN CONTAINER                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why this matters:

  • AI agents need contained compute: They require massive context windows, long-running processes, specific toolchains, and might do dangerous stuff some time.
  • You need your editor: You rely on your custom keybindings, themes, and muscle memory.
  • Flexibility: Both workflows work independently or together.

Docker Compose

For persistent deployments, use docker-compose.yml with .env:

cp .env.example .env    # Copy and edit with your passwords/API keys
docker compose up -d

Or use inline environment variables for quick testing:

services:
  envhaven:
    image: ghcr.io/envhaven/envhaven:latest
    container_name: envhaven
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - PASSWORD=password        # Web UI password
      - SUDO_PASSWORD=password   # sudo/SSH password
    volumes:
      - ./config:/config         # Persist home directory
    ports:
      - 8443:8443               # Web UI
      - 2222:22                 # SSH Access
    restart: unless-stopped

See Configuration Reference for all options including AI API keys and SSH setup.

SSH Access

SSH enables the Haven CLI and direct terminal access.

Setup SSH Host Haven CLI
Managed ssh-{subdomain}.envhaven.app haven connect . myproject-alice
Self-hosted your-server:2222 haven connect . abc@your-server:2222

Self-hosted setup: Import your GitHub keys automatically:

environment:
  - PUBLIC_KEY_URL=https://github.com/yourusername.keys
ports:
  - "2222:22"

See Configuration Reference for all SSH options.

Documentation

About

Batteries-included environments for agentic workflows.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages