nherd macOS
Zero-Config Dev Proxy for Vite & Astro

Serve Node.js apps at
https://[folder].test

One simple command bridges your Node.js dev server with Laravel Herd. nherd run dev detects the dynamic port, mounts the proxy with local SSL, and cleans up seamlessly on exit.

$ npm install -g nherd

macOS only • Node.js >= 24 • Laravel Herd required

Terminal — ~/Herd/imageforge — zsh
$ nherd run dev
> imageforge@0.0.0 dev
> vite
VITE v8.3.4 ready in 129 ms
➜ Local:   http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
➜ Local(nherd): https://imageforge.test SSL Active
Proxy registered with Laravel Herd (press Ctrl+C to stop and unproxy)

Key Features

Bring Node.js dev servers right into your Herd workflow

Say goodbye to memorizing changing port numbers or manually running `herd proxy`.

Dynamic Port Sniffing

When default port 5173 is already taken, Vite or Astro steps to 5174. nherd sniffs whichever port actually binds and proxies it dynamically.

Instant Local HTTPS

Leverage Laravel Herd's trusted local root Certificate Authority and secure SSL directly for your Node.js apps at https://[folder].test.

Zero-Trace Cleanup

Hit Ctrl+C and nherd executes herd unproxy before terminating all child processes without leaving orphans.

Unbroken HMR & TTY

Hot Module Replacement (HMR) and WebSockets work out-of-the-box. Terminal interactive shortcuts (like h + Enter) remain completely functional.

Subdomains & IPv6 Ready

Fully handles dotted folder names (e.g., admin.shop.test) and inspects both IPv4 (127.0.0.1) and IPv6 (::1) loopback targets.

Zero Runtime Dependencies

Crafted exclusively with Node.js 24 native APIs and standard OS tooling for near-instant boot times and bulletproof stability.

Workflow

How does nherd operate behind the scenes?

STEP 01

Preflight & Launch

Validates your current directory name, confirms package.json has a dev script, verifies herd is on PATH, and starts the dev server.

$ nherd run dev
STEP 02

Sniff & Proxy

Discovers the actual listening port directly from the OS process table, then automatically calls herd proxy [folder] [target] to map the domain.

➜ Local(nherd): https://my-app.test
STEP 03

Graceful Shutdown

Upon receiving Ctrl+C, nherd executes herd unproxy and safely cleans up all child processes before exiting.

✓ herd unproxy & exit 130

Configuration

One-time setup: add allowedHosts

Modern dev servers block requests from unknown domains for security. Add your project's .test host to your configuration once.

export default {
  server: {
    allowedHosts: ["my-app.test"], // Replace with your folder name
  },
};
Tip: If your project folder is named my-app, the address is my-app.test. Folders with dots (like admin.shop) map directly to admin.shop.test.

Quick Start

Up and running in 3 easy steps

1. Global Install

Install nherd globally with npm

Makes the nherd command accessible from any terminal.

npm install -g nherd
2. Start Dev Server

Run nherd run dev

Simply swap npm run dev for nherd run dev in your project.

nherd run dev
3. Develop with HTTPS

Open https://[folder].test

Full HMR updates in real time. Press Ctrl+C when you're done.

✓ Auto-Managed

Supercharge your Laravel Herd & Node.js workflow

nherd is open-source and freely available under the MIT license. Issues, ideas, and contributions are warmly welcome.