New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

devwarp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devwarp

One-command dev server launcher that maps your git branch to .localhost with a built-in reverse proxy (no permanent daemon).

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

devwarp

One-command dev launcher that maps your current git branch to <branch>.localhost without thinking about ports. No permanent daemon required.

Features

  • Auto-picks a free port, injects it into your dev command, and registers <branch>.localhost → port.
  • On-demand reverse proxy bound to :80 (starts when needed, stops when last route is removed).
  • Works with any dev command (Vite/Next/Expo/Wrangler, etc.).
  • Routes stored at ~/.devwarp/routes.json; no repo pollution.

Install / Run

npx devwarp <your dev command>

Examples:

  • npx devwarp pnpm run dev
  • npx devwarp npm run dev -- --host 0.0.0.0
  • Expo (web): npx devwarp pnpm run web -- --web → uses --web-port automatically

Then open http://<branch>.localhost in your browser. DevWarp prints the exact URL; if :80 is unavailable it falls back to :8080 and shows http://<branch>.localhost:8080.

Demo (Hono + Wrangler)

This repo ships with three small demo apps under demo/feature-* (シンプルなToDo UI付き Hono アプリ)。

  • cd demo/feature-a && npm install
  • npm run dev
  • Open the URL printed by DevWarp (e.g., http://main.localhost or :8080 if :80 is blocked).

Use demo/run-all.sh to start all demos in parallel; demo/run-all.sh stop stops them and the proxy.

How it works

  • Resolve git branch (git rev-parse --abbrev-ref HEAD) and slugify → <branch>.localhost.
  • Pick a free local port.
  • Spawn your dev command with PORT/DEVWARP_PORT and --port <picked> injected (if not already present).
  • Register the mapping in ~/.devwarp/routes.json.
  • Ensure a reverse proxy is running on :80; if not, start devwarp --proxy (tries sudo first, then plain node if :80 is allowed).
  • On exit, remove your route; if no routes remain and we started the proxy, stop it.

Options

  • --proxy-port <port>: run the proxy on a custom port (default 80). Helpful if sudo不可な環境で :80 が塞がっている場合。
  • --gc: garbage-collect stale routes (removes entries whose ports are not listening).
  • --stop-proxy: stop the running proxy (uses pidfile at ~/.devwarp/proxy.pid).

Expo note

  • Metro uses --port、Expo Webは --web-port を要求するため、自動判別して適切なポートフラグを挿入します(--web または --web-only が args にある場合は --web-port を追加)。

Permissions

  • Binding to :80 may require sudo on your OS. devwarp tries sudo -n first, then plain node; if neither works, it warns and you can start the proxy manually with elevated privileges: sudo devwarp --proxy.

Cleanup

  • Stop your dev command normally (Ctrl+C). Routes are removed automatically.
  • If routes get stale, delete ~/.devwarp/routes.json or run your dev commands again to refresh.

Version

0.1.0

License

MIT

Keywords

devserver

FAQs

Package last updated on 01 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts