Tiny local dev URL launcher for .localhost projects.
http://myproject.localhost
Run gohere inside a package project, workspace root, or static folder. It starts or serves the project on a hidden local port, routes a clean .localhost hostname to it, and prints the URL.
No script edits. No port memorization. No repo config.
Global install is recommended:
npm i -g gohereOr install the Go CLI directly:
go install github.com/roie/gohere/cmd/gohere@latestgohere supports package projects, workspace roots, and static files.
Run the default command:
gohereIn a package project, this runs the nearest package.json dev script. In a workspace root, this discovers workspace packages from pnpm-workspace.yaml or package.json workspaces, starts each package with a dev script, and gives each package its own route:
gohere web -> http://web.myrepo.localhost
gohere worker -> http://worker.myrepo.localhost
Run a named package script:
gohere dev:webRun multiple server scripts:
gohere dev:web dev:apiWhen one gohere run starts multiple services, each service can discover the others through env vars. For example, a web dev server can proxy API requests to a worker without hardcoding a port:
target: process.env.GOHERE_WORKER_URLUse GOHERE_<NAME>_URL for app config. GOHERE_<NAME>_PORT, GOHERE_<NAME>_TARGET, and GOHERE_SERVICES_JSON are also available when multiple managed services start together. PORT and TARGET are advanced values and are only set when gohere controls that service port.
Run any current package script exactly as written by naming it explicitly:
gohere dev
gohere build
gohere previewRun an explicit filesystem target:
gohere ./dist
gohere ./apps/webAuto-refresh static pages while editing:
gohere --liveRun a raw command:
gohere -- npm run devUse a custom .localhost name for this run:
gohere --as apiRoute to a known target port:
gohere --target 5173 -- npm run devUse a custom port flag for tools that do not use --port:
gohere --port-flag --local-port devOpen the project URL in your browser:
gohere --openFor static folders, gohere serves index.html. You can also open a specific file, for example gohere about.html, which routes to http://myproject.localhost/about.html.
CSS, images, and scripts are served normally.
myproject -> http://myproject.localhost
@scope/web -> http://web.localhost
./apps/web -> http://web.repo.localhost
./dist -> http://dist.localhost
about.html -> http://myproject.localhost/about.html
gohere list
gohere list --verbose
gohere list --json
gohere stop
gohere stop web
gohere stop --all
gohere prune
gohere doctor
gohere service stop
gohere uninstallgohere list --verbose shows host, target, status, PID, and working directory.
gohere list --json returns the same route information in a stable machine-readable format.
gohere stop stops routes for the current folder. gohere stop <target> stops a listed route by host, short host label, route name, or project name. gohere stop --all stops safely controllable routes and skips unverified live routes.
Route status can be ready, dead, or unknown. prune removes only routes that are confidently dead.
Stop the background service without removing gohere:
gohere service stopClean up the copied service binary before removing the npm package:
gohere uninstall
npm uninstall -g goheregohere uninstall removes the local service install and asks before deleting routes, logs, and token state.
gohere runs one local service on HTTP port 80.
Each project gets a hidden local port. The service maps the clean .localhost hostname to that port using the request Host header.
First-time setup installs the local service in ~/.gohere/ and starts it in the background. After that, gohere only starts your project and registers its route.
The service only serves local machine traffic. On macOS, gohere uses a port 80 listener that rejects non-loopback connections before requests reach the router.
State is stored in:
~/.gohere/
Linux may ask for one-time permission to bind port 80.
When used from WSL, gohere reuses a running Windows service automatically.
- Linux / WSL
- Windows
- macOS (experimental)
The npm package includes x64 and arm64 binaries for these platforms.
- HTTP only
.localhostonly- no HTTPS
- no LAN sharing
- no custom TLDs
- no project config files
- no browser auto-open by default
Apache-2.0