Realm eliminates the complexity of modern full-stack development by providing:
- Virtualenv-like environments for complete project isolation
- Built-in process manager (like Foreman) with intelligent routing
- Multi-runtime support (Bun, Node.js, Python) with automatic version management
- Zero-config proxy server that routes requests to your services
- Project templates to eliminate boilerplate
- One-command deployment with Docker generation
# Install using cargo
cargo install realm
# Clone and build from source
git clone https://github.com/wess/realm
cd realm
cargo install --path .
Download the latest release for your platform:
- macOS (Intel): realm-macos-amd64
- macOS (Apple Silicon): realm-macos-arm64
- Linux (x64): realm-linux-amd64
- Linux (ARM64): realm-linux-arm64
- Windows: realm-windows-amd64.exe
curl -sSfL https://github.com/wess/realm/releases/latest/download/install.sh | bash
This will download and install realm to /usr/local/bin
.
# Create a new full-stack project
realm init myapp --template=react-express --runtime=bun
# Activate the environment
cd myapp
source .venv/bin/activate
# Start everything (processes + proxy)
realm start
# Visit http://localhost:8000 - it just works!
# Create a FastAPI + React project
realm init myapp --template=react-fastapi --runtime=python@3.12
# Activate the environment
cd myapp
source .venv/bin/activate
# Install Python dependencies
pip install -r backend/requirements.txt
# Start everything (processes + proxy)
realm start
# Visit http://localhost:8000 - it just works!
# Create with specific runtime and template
realm init .venv --runtime=node@20 --template=vue-express
# Or just create empty environment
realm init .venv
source .venv/bin/activate
# Your shell now shows: (realm) $
# Start all processes + proxy server
realm start
# Or start components separately
realm proxy # Just the proxy
realm stop # Stop everything
# Generate Docker deployment artifacts
realm bundle
cd dist && ./deploy.sh
Realm uses realm.yml
for project configuration:
proxy_port: 8000
env:
NODE_ENV: development
API_URL: http://localhost:4001
env_file: .env
processes:
frontend:
command: "bun run dev"
port: 4000
routes: ["/", "/assets/*"]
working_directory: "frontend"
backend:
command: "bun run server"
port: 4001
routes: ["/api/*", "/health"]
working_directory: "backend"
Realm includes built-in templates for common stacks:
react-express
- React frontend + Express backend (Bun/Node)react-fastapi
- React frontend + FastAPI backend (Python)svelte-fastify
- SvelteKit + Fastify backend (Bun/Node)vue-express
- Vue 3 + Express backend (Bun/Node)nextjs
- Next.js 14 full-stack app (Bun/Node)
# List available templates
realm templates list
# Create project from template
realm init myapp --template=svelte-fastify
# Create your own template
realm create --template=my-stack
Realm automatically manages runtime versions per project:
# Use latest Bun (default)
realm init .venv
# Use specific Node.js version
realm init .venv --runtime=node@20
# Use specific Bun version
realm init .venv --runtime=bun@1.0.0
# Use Python with per-project isolation
realm init .venv --runtime=python@3.12
Python Support:
- Downloads and manages Python from python-build-standalone
- Creates per-project
site-packages
for complete isolation - Automatically sets
VIRTUAL_ENV
for compatibility with pip, poetry, etc. - Symlinks Python binary from shared installation
- Works seamlessly with existing Python tooling
Runtimes are isolated per realm environment - no global pollution!
The built-in proxy intelligently routes requests:
- Route matching:
/api/*
→ backend:4001,/
→ frontend:4000 - WebSocket support: For Vite HMR, live reload, etc.
- CORS handling: Automatic CORS headers for development
- Health checks: Built-in
/health
endpoint - Fallback routing: Sensible defaults when routes don't match
Realm's process manager handles service lifecycle:
- Foreman-like: Define processes in
realm.yml
- Intelligent startup: Processes start in dependency order
- Log aggregation: Combined output with process prefixes
- Graceful shutdown: Proper process cleanup
- Auto-restart: Restart failed processes (optional)
Generate production-ready artifacts:
realm bundle
Creates dist/
with:
- Dockerfile - Multi-stage build for all processes
- docker-compose.yml - Complete service orchestration
- nginx.conf - Reverse proxy with your routing
- deploy.sh - One-command deployment script
┌─────────────────────────────────────────────┐
│ Realm CLI │
├─────────────────────────────────────────────┤
│ Proxy Server (port 8000) │
│ ├── Route: /api/* → backend:4001 │
│ ├── Route: / → frontend:4000 │
│ └── Route: /health → built-in │
├─────────────────────────────────────────────┤
│ Process Manager │
│ ├── frontend: bun run dev │
│ ├── backend: bun run server │
│ └── docs: bun run docs │
├─────────────────────────────────────────────┤
│ Runtime Manager │
│ ├── Bun 1.0.0 (per project) │
│ └── Node.js 20.5.0 (per project) │
├─────────────────────────────────────────────┤
│ Environment Manager │
│ ├── .env file loading │
│ └── Variable isolation │
└─────────────────────────────────────────────┘
realm init [path]
- Create new realm environmentsource .venv/bin/activate
- Activate environmentdeactivate
- Exit realm environment
realm start
- Start all processes + proxyrealm stop
- Stop all processes + proxyrealm proxy
- Start proxy server only
realm templates list
- List available templatesrealm create --template=name
- Create template from current project
realm bundle
- Generate deployment artifacts
--runtime=bun|node
- Specify runtime (default: bun)--runtime=node@20
- Specify runtime version--template=name
- Use project template
# Terminal 1: Start frontend
cd frontend && npm run dev
# Terminal 2: Start backend
cd backend && npm run server
# Terminal 3: Start proxy
nginx -c nginx.conf
# Terminal 4: Set up environment
export NODE_ENV=development
export API_URL=http://localhost:4001
source .env
# Remember all the ports, manage processes, configure nginx...
realm init .venv --template=react-express
source .venv/bin/activate
realm start
# Done. Everything runs on http://localhost:8000
- One command instead of managing multiple terminals
- Automatic routing instead of nginx configuration
- Environment isolation instead of global pollution
- Template scaffolding instead of boilerplate setup
- Deployment generation instead of Docker wrestling
git clone https://github.com/wess/realm
cd realm
cargo install --path .
- Rust 1.70+
- Git (for template management)
Realm is built in Rust with a modular architecture:
src/cli/
- Command-line interfacesrc/config/
- Configuration parsing (realm.yml
)src/runtime/
- Runtime version managementsrc/process/
- Process lifecycle managementsrc/proxy/
- HTTP proxy server with routingsrc/templates/
- Project scaffoldingsrc/bundle/
- Deployment artifact generationtests/
- Comprehensive test suite
cargo test
# Build in development mode
cargo build
# Run with debug output
RUST_LOG=debug cargo run -- start
MIT License - see LICENSE file.
Feature | Realm | Docker Compose | Foreman | Create-React-App |
---|---|---|---|---|
Process Management | ✅ | ✅ | ✅ | ❌ |
Built-in Proxy | ✅ | ❌ | ❌ | ❌ |
Runtime Isolation | ✅ | ✅ | ❌ | ❌ |
Project Templates | ✅ | ❌ | ❌ | ✅ |
Production Deploy | ✅ | ✅ | ❌ | ✅ |
Zero Config | ✅ | ❌ | ❌ | ✅ |
Multi-Runtime | ✅ | ✅ | ❌ | ❌ |
Environment Isolation | ✅ | ✅ | ❌ | ❌ |
Realm combines the best aspects of these tools into a single, cohesive development environment.