Yarn dev first
Keep the command every teammate already tries first. Localghost fits behind yarn dev and guides the first run when setup is missing.
Buh. Friendly local dev domains.
A tiny Node.js CLI for the local dev flow you already use. Install the dev dependency, run yarn dev, and Localghost gets you to a clean browser-facing .localhost URL.
yarn add -D @hamedb89/localghost yarn dev localghost local: http://app.localhost/ target: http://127.0.0.1:5173/
Keep the command every teammate already tries first. Localghost fits behind yarn dev and guides the first run when setup is missing.
Project names come from package.json, port 5173 is the fallback, HTTP is default, dynamic ports are on, and www. aliases are included.
Set explicit server.allowedHosts entries without opening the broad allowedHosts: true shortcut.
Keep local HTTP by default. Turn on Caddy HTTPS with https: true or --https, then trust the local CA only when you choose.
Most repos do not need localghost.config.mjs. Add it only for nonstandard ports, HTTPS, fixed ports, or custom alias behavior.
Generated setup lives under ops/local/, and reset lets you retest the first-run flow without deleting your .localghost contract.
ghostTunnel is the opt-in production-facing Localghost entrypoint for stable wildcard previews like plan-summer-base-hamed.ghost.socialworkouts.app.
Build names from route, project, and owner, then point *.ghost.<your-domain> at the deployed app.
Enable it explicitly with ghostTunnel: true or a ghostTunnel.preview object in localghost.config.mjs.
Requests are checked for host shape, HTTPS, auth, DNS-safe labels, and relay target policy before serving a tunnel surface.
GitHub Actions runs typecheck, build, site build, and npm package dry-run on Node 20 and 22.
Runtime dependencies are limited to commander and execa. Vite stays an optional peer for projects that use the plugin.
No postinstall scripts, hidden Homebrew commands, or full hosts-file rewrites. Localghost changes only its managed block.