Skip to content

aysahoo/qrdev

Repository files navigation

qrdev

Instantly access your dev server from any device on your network.

npm version downloads license zero dependencies


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.


Why qrdev?

  • 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 qrdev to your existing command. That's it.

Common Use Cases

  • 📱 "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

Install

Global (use anywhere)

npm i -g qrdev

Local (per project)

npm i -D qrdev

Then 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.


Usage

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 8000

What you'll see

Running: 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 ]

How it works

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>

Requirements

  • Node.js >= 14
  • Both devices must be on the same Wi-Fi / local network

Contributing

Issues and PRs welcome at github.com/aysahoo/devqr

License

MIT — Ayush Ranjan Sahoo

About

QR code for your dev server — scan and test on any device

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors