Buh. Friendly local dev domains.

Localghost

A tiny CLI for the local dev flow you already use. Install with npm, pnpm, Yarn, or Bun, run localghost, and get a clean browser-facing .localhost URL.

Localghost mascot with a magic wand
# install with npm, pnpm, Yarn, or Bun
localghost

local:  http://app.localhost/
target: http://127.0.0.1:5173/

One small contract for local dev

Your dev flow first

Keep the package manager and command your team already uses. Localghost detects the project flow and guides the first run when setup is missing.

Clean defaults

Project names come from package.json, port 5173 is the fallback, HTTP is default, dynamic ports are on, and www. aliases are included.

Vite-safe defaults

Set explicit server.allowedHosts entries without opening the broad allowedHosts: true shortcut.

HTTPS when you ask

Keep local HTTP by default. Turn on Caddy HTTPS with https: true or --https, then trust the local CA only when you choose.

Override only when needed

Most repos do not need localghost.config.mjs. Add it only for nonstandard ports, HTTPS, fixed ports, or custom alias behavior.

Plain local state

Generated setup lives under ops/local/, and reset lets you retest the first-run flow without deleting your .localghost contract.

ghostTunnel Experimental
ghostTunnel

Share a localhost route without moving the app.

ghostTunnel is an opt-in preview of stable wildcard sharing routes like plan-summer-base-hamed.ghost.moonlit-otter.example.

Experimental: configuration, transports, CLI behavior, and public APIs may change between releases. Do not rely on Ghost Tunnel for production-critical access.

Friendly preview names

Build names from route, project, and owner, then point *.ghost.<your-domain> at the deployed app.

Off by default

Enable it explicitly with ghostTunnel: true or a ghostTunnel.preview object in localghost.config.mjs.

Guardrails included

Requests are checked for host shape, HTTPS, auth, DNS-safe labels, and relay target policy before serving a tunnel surface.

Built to be boring where it matters

One-command releases

Run localghost release patch to dispatch the guarded pipeline. GitHub Actions verifies, versions, tags, publishes with provenance, and creates release notes.

Small dependency surface

Runtime dependencies are limited to commander and execa. Vite stays an optional peer for projects that use the plugin.

No surprise installs

No postinstall scripts, hidden Homebrew commands, or full hosts-file rewrites. Localghost changes only its managed block.