Slim

Pretty domains for
local development

Map localhost:3000 to https://myapp.local with path routing, HTTPS, WebSocket passthrough, and zero config.

$ slim start web --port 3000
https://web.local localhost:3000
$ slim start myapp --port 3000 --route /api=8080
https://myapp.local
localhost:3000
  https://myapp.local/api
localhost:8080
$ slim up  # .slim.yaml
https://myapp.local
localhost:3000
  https://myapp.local/api
localhost:8080
https://dashboard.local
localhost:5173
macOS & Linux · Single Binary · Zero Config
$ curl -sL https://slim.sh/install.sh | sh

Install using script above or build from source.

Automatic HTTPS Trusted certificates, green lock, no warnings.
WebSocket & HMR Next.js, Vite, and others work out of the box.
Multiple Domains Each gets its own certificate and proxy.
Access Logging Full, minimal, or off. Tail and filter by domain.
Health Monitoring See which upstreams are reachable at a glance.
Path Routing Route different URL paths to different upstream ports.
Project Config Share your dev setup with teammates via .slim.yaml.
Zero Config First run handles CA, trust, and port forwarding.

Commands

Everything is one slim command away.

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
# Show all domains with health status
$ slim list

# Output as JSON
$ slim list --json
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
# 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
# Stop all project services
$ slim down

# Or specify a config path
$ slim down --config /path/to/.slim.yaml
slim stop Stop proxying
# Stop a specific domain
$ slim stop myapp

# Stop all domains and shutdown daemon
$ slim stop
slim doctor Diagnose setup issues
# Check your local setup
$ slim doctor
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.

$ slim doctor
  ✓  CA certificate        valid, expires 2035-02-28
  ✓  CA trust              trusted by OS
  ✓  Port forwarding       active (80→10080, 443→10443)
  ✓  Hosts: myapp.local    present in /etc/hosts
  !  Daemon                not running
  ✓  Cert: myapp.local     valid, expires 2027-06-03

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.

1
Generates a root CA and trusts it in macOS Keychain or Linux CA store.
2
Creates per-domain certificates on demand, served via SNI for each .local domain.
3
Manages /etc/hosts entries automatically, pointing domains to 127.0.0.1.
4
Forwards ports 80/443 via pfctl or iptables so the proxy runs unprivileged.
5
Reverse proxies requests with HTTP/2, WebSocket upgrades, and CORS headers.