Skip to content

PhoneHost

Your localhost, on your phone, with one command.

On npmOpen source · MIT licence · published on npm
Role
Creator and maintainer
When
Apr 2025
Context
Open source · MIT licence · published on npm
npm

730+ downloads on npm

All time, updated daily.
$ npx phonehost --port 3000

# Phone on another network?
$ npx phonehost --port 3000 --tunnel

PhoneHost is a CLI that previews a local development site on a real phone. It finds your machine’s local IP, prints a QR code, warns when nothing runs on the port, and opens a public tunnel when the phone is on another network.

What I did

  • Detects the local IP and common dev ports (3000, 5173, 8080, 4321, 4200) automatically.
  • Prints a scannable QR code right in the terminal.
  • Falls back to a public tunnel through LocalTunnel or Cloudflare Tunnel on public or restricted Wi-Fi.
  • Works with Next.js, Vite, React, Vue, Svelte, Angular, Astro and any local server.
All projects