Pretty domains for
local development
Map localhost:3000 to https://myapp.local with path routing,
HTTPS, WebSocket passthrough, and zero config.
$ curl -sL https://slim.sh/install.sh | sh Install using script above or build from source.
Commands
Everything is one slim command away.
slim start <name> Map a domain to a port
slim start <name> Map a domain to a port # Map your Next.js app
$ slim start myapp --port 3000
# Add your API server
$ slim start api -p 8080
# Route /api requests to a different port
$ slim start myapp -p 3000 --route /api=8080
# Enable access logging
$ slim start dashboard -p 5173 --log-mode full
# Wait for upstream to be ready
$ slim start myapp -p 3000 --wait --timeout 30s slim list See what's running
slim list See what's running # Show all domains with health status
$ slim list
# Output as JSON
$ slim list --json slim logs View access logs
slim logs View access logs # Tail all access logs
$ slim logs
# Follow logs for a specific domain
$ slim logs -f myapp
# Clear all logs
$ slim logs --flush slim up Start all services from .slim.yaml
slim up Start all services from .slim.yaml # Start all services from .slim.yaml
$ slim up
# Or specify a config path
$ slim up --config /path/to/.slim.yaml slim down Stop project services
slim down Stop project services # Stop all project services
$ slim down
# Or specify a config path
$ slim down --config /path/to/.slim.yaml slim stop Stop proxying
slim stop Stop proxying # Stop a specific domain
$ slim stop myapp
# Stop all domains and shutdown daemon
$ slim stop slim doctor Diagnose setup issues
slim doctor Diagnose setup issues # Check your local setup
$ slim doctor slim uninstall Remove everything
slim uninstall Remove everything # Removes everything: CA, certs, hosts entries,
# port-forward rules, and config
$ slim uninstall Project Config
Share your local dev setup with teammates using a .slim.yaml file.
services:
- domain: myapp
port: 3000
routes:
- path: /api
port: 8080
- domain: dashboard
port: 5173
log_mode: minimal
Run slim up to start every service in one shot, and slim down to tear them all down.
# Start all services defined in .slim.yaml
$ slim up
# Or specify a config path
$ slim up --config /path/to/.slim.yaml
# Stop all project services
$ slim down Path Routing
Route different URL paths to different upstream ports on the same domain.
# Route /api and /ws to different ports
$ slim start myapp --port 3000 --route /api=8080 --route /ws=9000
Requests to https://myapp.local/api/* go to port 8080, while everything else hits 3000. Routes also work in your project config:
services:
- domain: myapp
port: 3000
routes:
- path: /api
port: 8080
- path: /ws
port: 9000 Diagnostics
Run slim doctor to check your local setup at a glance.
Checks your CA certificate, OS trust, port forwarding rules, hosts file entries, daemon status, and per-domain certificates.
How it works
A single Go binary that handles everything under the hood.
.local domain. /etc/hosts entries automatically, pointing domains to 127.0.0.1. pfctl or iptables so the proxy runs unprivileged.