Your localhost,
but real.

Named HTTPS domains for local dev.
Public URLs to share your work.
One command.

$ lokei run
Detected: pnpm dev → next dev
Name: myapp (from package.json)
Framework: Next.js
Port: 4001
✓ https://myapp.test
npm i -g lokei && lokei setup

Under the hood

Not a wrapper around
/etc/hosts

A local infrastructure stack: CA, DNS, TLS, port management, process lifecycle, and route registration.

lokei setuponce
├─Generates a root CA with openssl
├─Trusts it in your OS keychain
├─Configures /etc/resolver/test → 127.0.0.1:15353
├─Sets up pfctl port forwarding (80→15080, 443→15443)
└─Pins cert to exact hostname via SNI — no wildcards
lokei runevery time
├─Starts the daemon if not running
├─Detects framework from package.json
├─Reserves a sticky port from the 4000–5999 ledger
├─Spawns dev server with injected PORT
├─Waits for TCP bind (30s timeout)
├─Generates TLS cert for myapp.test, signed by your CA
├─Registers the route in the daemon
└─https://myapp.test is live

Go public

Share your work

Public URL in seconds. Named tunnels with auth. Self-hostable relay.

Quick share

$ lokei share --port 3000
Port: 3000
Relay: wss://relay.lokei.dev
┌───────────────────────────────────────┐
│ https://a8f3c1d2.lokei.dev │
└───────────────────────────────────────┘
Press Ctrl+C to close the tunnel.

Named tunnel

$ lokei run --expose
Name: myapp (from package.json)
Framework: Next.js
Port: 4001
✓ https://myapp.test
✓ https://myapp--ciprian.lokei.dev

Tunnels run through the lokei relay, a WebSocket server that multiplexes HTTP over a single connection using MessagePack. Password-protect tunnels, set a TTL, or restrict access with bearer tokens.

Claim a username and your tunnels get stable URLs like app--you.lokei.dev. Self-host the relay on your own infrastructure — it's a standalone npm package.

Debugging

See every request

A built-in traffic inspector at inspect.test. No browser extensions, no proxy config.

Open the inspector

$ lokei inspect
→ https://inspect.test
Opening in browser...

Live stream

Every request through your .test domains shows up in real time via Server-Sent Events. No refresh needed.

Headers, bodies, timing

Full request and response details. JSON bodies are syntax-highlighted. Timing breakdown for each request.

Replay requests

Modify method, URL, headers, or body and replay any captured request. Side-by-side diff of original vs replayed response.

Export

Export traffic as JSON, CSV, or HAR 1.2. Import HAR into Chrome DevTools or share with your team.

Toolkit

Everything else

lokei inspect

Traffic inspector

Request/response viewer at inspect.test. Headers, bodies, timing. Replay requests, export HAR.

lokei docker up

Docker Compose

Every Compose service gets its own .test domain with HTTPS. No port mapping.

fix-ui.myapp.test

Git worktrees

Feature branch in a worktree gets a prefixed domain. Main stays myapp.test.

lokei up

Multi-service

Define services in lokei.yaml. Each gets its own domain, port, and lifecycle.

lokei service install

OS service

Run the daemon via launchd or systemd. Survives reboots.

lokei doctor

Diagnostics

Checks CA trust, DNS resolver, port forwarding. Tells you exactly what's broken.

AI agents

Agent-friendly

Ships as an AI skill. Claude Code, Cursor, Windsurf — install lokei, set up HTTPS domains, share tunnels autonomously.

npx skills add ulpi-io/skills --skill lokei

Frequently asked questions

lokei is a local development proxy that gives your projects named HTTPS domains on .test. Run `lokei run next dev` and get `https://myapp.test` automatically — with valid TLS, DNS resolution, and port forwarding.

lokei is a full infrastructure stack: local CA, DNS resolver, TLS certificates, port management, and process lifecycle. It doesn't just map hostnames — it generates valid certificates, manages ports, and handles the entire dev server lifecycle.

No. All local features (HTTPS domains, DNS, certificates, traffic inspector, Docker integration) are completely free. You only need a paid plan for public tunnel sharing beyond the free tier limits.

lokei tunnels your local server through a WebSocket relay. Your app gets a public URL at lokei.dev that anyone can access. Traffic is forwarded to your machine in real time.

Yes, on the Enterprise plan. The relay server is a standalone package that you can deploy on your own infrastructure. It uses the same WebSocket protocol as the hosted relay.

lokei detects 30+ frameworks automatically: Next.js, Vite, Astro, Angular, Nuxt, Rails, Django, Laravel, Flask, Hugo, and more. It injects the correct port and host flags for each framework.

Yes. Run `lokei docker up` and every Docker Compose service gets its own .test domain with HTTPS. No port mapping needed.

No. lokei is proprietary software. The CLI and all packages are closed source.

Cloud

lokei cloud

Stable URLs

Claim a username. Your tunnels live at app--username.lokei.dev — same URL every time.

API keys

Create and revoke keys for CI pipelines and scripts. Last-used tracking so you know what's active.

Tunnel dashboard

Active tunnels with connection state, uptime, and heartbeat status at a glance.

Device-code auth

lokei login opens your browser. No password to type.

$ lokei login
Open this URL in your browser:
https://lokei.app/auth/verify?code=ABCD-1234
Waiting for authorization...
✓ Logged in as ciprian
✓ Username: ciprian
✓ Tunnels at *--ciprian.lokei.dev

CLI at a glance

lokei setupOne-time: CA, DNS, trust store, port forwarding
lokei runWrap your dev server with a .test HTTPS domain
lokei up / downStart/stop services from lokei.yaml
lokei sharePublic tunnel URL for localhost
lokei tunnelPersistent tunnels (open, close, list)
lokei docker upHTTPS domains for Docker Compose services
lokei inspectTraffic inspector in your browser
lokei logsView and tail proxy request logs
lokei loginAuthenticate for public tunnels
lokei routes lsList active .test routes
lokei doctorDiagnose DNS, TLS, port forwarding
lokei service installOS service (launchd/systemd)