@ulpi/lokei
v0.1.3
Published
Automatic HTTPS and custom local domains—lokei detects and wraps Docker and 30+ frameworks, with traffic inspection and public tunnels.
Readme
@ulpi/lokei
Your dev stack, on real HTTPS domains — automatically.
lokei detects what you are running, assigns a stable port, injects the correct host and port settings, and serves it on a locally trusted HTTPS domain. It supports more than 30 frameworks and development stacks, including Next.js, Vite, Laravel, Rails, Django, Docker Compose, and Laravel Sail.
$ lokei run
Detected: npm run dev → next dev
Framework: Next.js
https://myapp.test → 127.0.0.1:4000No localhost:3000, port juggling, self-signed certificate warnings, or
framework-specific proxy configuration. When you need to share your work, add
--expose for a public URL.
Install
npm install -g @ulpi/lokeiThe installed command is lokei. Node.js 22.12 or newer is required.
Quick start
Run the one-time machine setup, then start lokei from any project:
# Install the local CA, trust it, and configure local DNS
lokei setup
cd ~/projects/myapp
lokei runWith no command, lokei discovers the project's development command. You can also wrap one explicitly:
lokei run next dev
lokei run vite
lokei run php artisan serve
lokei run bundle exec rails serverlokei reserves a sticky port, detects the framework, overrides or injects its listen settings, waits for the server to become ready, and registers the HTTPS route. The route and port are cleaned up when the process exits.
Automatic stack detection
lokei understands common package scripts, project markers, command wrappers, and framework-specific port conventions:
- JavaScript and TypeScript: Next.js, Vite, Nuxt, Astro, Angular, SvelteKit, Remix, React Router, Parcel, webpack, Rspack, Rsbuild, NestJS, Expo, and more.
- Backend frameworks: Laravel, Rails, Django, Flask, Phoenix, Spring Boot, Hugo, PHP's built-in server, Go, and Cargo projects.
- Package runners: npm, pnpm, Yarn, Bun, npx, pnpx, bunx, and
dlx/execforms are unwrapped so the underlying framework receives the correct flags. - Containers: Docker Compose projects are discovered automatically by
lokei docker; Laravel Sail gets dedicated routing for the app and web tools such as Mailpit and Meilisearch.
Custom local domains
Every project gets a stable local domain. .test is the default, but both the
project name and the machine-wide local TLD are configurable.
# Pin this project to https://checkout.test
lokei pin checkout
# Use .dev instead of .test on this machine
lokei setup --tld dev
lokei run
# → https://checkout.devThe active TLD can also be set with LOKEI_TLD. Multi-service projects can set
their base domain in lokei.yaml.
Docker and Laravel Sail
Run a Compose stack without manually publishing and tracking host ports:
lokei docker up
lokei docker up --build
lokei docker watch
lokei docker downlokei discovers the Compose file, allocates conflict-free loopback ports, generates the routing override, and prints one HTTPS URL per web service. Laravel Sail is detected automatically; database and cache services remain private while the application and supported web tools receive local domains.
Inspect traffic
The daemon includes a local traffic inspector with live request and response capture, filtering, replay, and HAR export.
lokei inspect
lokei logs --follow
lokei logs --status 5xx
lokei logs --export harThe inspector follows the active TLD, so it opens at https://inspect.test,
https://inspect.dev, or whichever local TLD you configured.
Share publicly
Authenticate once, then expose a managed route or any local port:
lokei login
lokei run --expose next dev
# → https://myapp--you.lokei.dev
lokei share --port 3000 --subdomain demo --password secret --ttl 3600Public tunnels are optional. Local HTTPS, DNS, routing, Docker integration, and traffic inspection work locally without the hosted relay.
Key commands
| Command | What it does |
|---------|--------------|
| lokei run [command...] | Detect or wrap a development command and give it a local HTTPS domain |
| lokei up / down | Start or stop all services declared in lokei.yaml |
| lokei docker up / down | Route Docker Compose and Laravel Sail services through local HTTPS |
| lokei pin <name> | Give the current project a stable custom domain name |
| lokei inspect | Open the local traffic inspector |
| lokei logs | Query, follow, or export captured traffic |
| lokei run --expose | Start a dev server and create a public tunnel |
| lokei share --port <port> | Share an already-running local service |
| lokei doctor | Diagnose CA, DNS, certificates, daemon, and routing setup |
| lokei service | Manage the optional background daemon service |
Run lokei --help or lokei <command> --help for every command and option.
How it works
A small local daemon owns DNS, TLS termination, routing, certificates, ports,
health checks, traffic capture, and tunnel connections. The CLI communicates
with it over a local socket or named pipe. A private local CA issues exact-host
certificates on demand, and the DNS resolver maps the active local TLD to the
loopback interface without adding one /etc/hosts entry per project.
Git worktrees receive branch-derived subdomains automatically, allowing several branches of the same project to run at once without colliding.
Platform support
lokei supports macOS, Linux, Windows, and WSL2. Some setup operations require administrator privileges once to install the local CA, DNS rule, and privileged port forwarding.
Links
License
Proprietary — © 2026 Open Growth Group Inc. All rights reserved. See the
LICENSE file included with the package.
