Instantly access your dev server from any device on your network.
Just prepend qrdev to your dev command. It runs your server, detects the port, and shows a QR code you can scan from any device on the same network.
No config. No framework lock-in. Works with everything.
- Access localhost from your phone — Scan a QR code and instantly open your dev server on any mobile device.
- Test your website on mobile during development — No more manually typing IP addresses on your phone.
- Share your local dev server over Wi-Fi — Anyone on the same network can scan and connect.
- QR code for localhost — The simplest way to bridge your computer and phone during development.
- Works with any dev server — Vite, Next.js, React, Nuxt, Svelte, Express, Python, Ruby — anything that runs on a port.
- Zero dependencies — Nothing to install besides Node.js. No bloat, no supply chain risk.
- No config, no plugins — Just prepend
qrdevto your existing command. That's it.
- 📱 "How do I access my dev server from my phone?" —
qrdev npm run dev - 🔗 "How to open localhost on mobile?" —
qrdev vite - 📡 "How to share my local server on my network?" —
qrdev next dev - 🧪 "How to test responsive design on a real device?" —
qrdev yarn dev
npm i -g qrdevnpm i -D qrdevThen update your package.json scripts to use qrdev seamlessly:
{
"scripts": {
"dev": "qrdev <your-dev-command>"
}
}For example:
"dev": "qrdev vite"
"dev": "qrdev next dev"
"dev": "qrdev node server.js"
"dev": "qrdev python -m http.server 8000"Now npm run dev / bun run dev will automatically show a QR code — no extra steps needed.
qrdev <command>Works with any dev server or package manager:
qrdev npm run dev
qrdev bun run dev
qrdev yarn dev
qrdev pnpm dev
qrdev vite
qrdev next dev
qrdev node server.js
qrdev python -m http.server 8000Running: npm run dev
<your dev server output>
Scan to open on any device
http://<your-local-ip>:<port>
Make sure both devices are on the same Wi-Fi/network
[ QR code appears here ]
| Step | What happens |
|---|---|
| 1 | Spawns your command as a child process |
| 2 | Watches stdout/stderr for a port (localhost:3000, :5173, etc.) |
| 3 | Detects your local network IP |
| 4 | Generates a QR code pointing to http://<your-ip>:<port> |
- Node.js >= 14
- Both devices must be on the same Wi-Fi / local network
Issues and PRs welcome at github.com/aysahoo/devqr
MIT — Ayush Ranjan Sahoo