繰り返される port 衝突Recurring port conflicts
web も admin も 3000 を欲しがる。誰かを 3001 に逃がし、その変更を git に commit するか毎回迷う。Both web and admin demand 3000. You bump one to 3001 and wonder, every time, whether to commit it.
Compose as-is. Conflicts gone. Compose のままで、衝突を消す。
複数のモノレポを並列起動すると、web も admin も同じ 3000 番を取り合います。.env を書き換え、ポート番号をチームで共有し直す手間が毎朝発生します。
DevRouter はこの port 衝突を、Traefik と Host ベース URL でアプリ無改造のまま解決します。
Spin up multiple monorepos in parallel and web and admin end up fighting for port 3000. You edit .env, reshuffle ports, and resync the URL with your team — every morning.
DevRouter solves the conflict via Traefik and host-based URLs, without changing a line in your app.
$ devrouter daemon up ✓ Global Traefik started $ devrouter up ./myrepo ✓ Stack myrepo: 3 services $ devrouter ls myrepo-web https://myrepo-web.localtest.me healthy myrepo-api https://myrepo-api.localtest.me healthy myrepo-admin https://myrepo-admin.localtest.me healthy
web が 3000、admin も 3000、api は昨日 8080 に変えたはず。.env を毎回書き換え、Slack に貼った URL がチームで一致しない。並列起動するモノレポが 2-3 個になった時点で、ポート管理が日常作業になってしまいます。
web on 3000, admin also 3000, api moved to 8080 yesterday — or was it? You edit .env repeatedly, and the URL you pasted in Slack disagrees with your teammate's. Once you run two or three monorepos in parallel, port management becomes a daily chore.
web も admin も 3000 を欲しがる。誰かを 3001 に逃がし、その変更を git に commit するか毎回迷う。Both web and admin demand 3000. You bump one to 3001 and wonder, every time, whether to commit it.
PORT、HOST、API_URL — 並列起動のたびに書き換え、commit に混ぜず、戻し忘れる。PORT, HOST, API_URL — rewritten for every parallel run, kept out of commits, forgotten when reverted.
localhost:5174 は URL ではなく座標。Slack に貼っても、隣の人の環境では別の何かが立っている。localhost:5174 is a coordinate, not a URL. Pasted in Slack, it points somewhere else on a teammate's machine.
DevRouter が一貫して守る、三つの方針。 Three principles DevRouter consistently follows.
port、host、proxy の設定はすべて外側のレイヤーで完結。アプリ側のコードは production と同じ状態を保ちます。Ports, hosts, and proxy settings live one layer outside the app. Your app code stays identical to production.
localhost:5174 はチームで一致しません。https://<stack>-<svc>.localtest.me なら、ブックマークでき、共有でき、明日も同じ場所にあります。localhost:5174 never matches across a team. https://<stack>-<svc>.localtest.me is bookmarkable, shareable, and stable across days.
devrouter doctor で設定の不整合を検出し、原因を特定。再起動は最後の手段です。devrouter doctor identifies misconfiguration and pinpoints the cause. Restart is a last resort.
グローバル Traefik が一つ立ち、各 stack はそこにぶら下がる。アプリ側は何も知りません。 A single global Traefik proxy. Each stack joins it. Your apps don't need to know.
devrouter daemon up
グローバル Traefik が 80/443 を受けて、stack 共通の devrouter_net を用意します。Global Traefik takes 80/443 and provisions the shared devrouter_net network.
devrouter up ./myrepo
既存の docker-compose を読み、Traefik ラベルを足して起動。アプリは無改造のまま。Reads your existing docker-compose, attaches Traefik labels, and starts. Apps are untouched.
https://<stack>-<svc>.localtest.me
Host ベースで自動振り分け。チームでブックマークできる、固定の URL。Routed by host header. A stable URL the whole team can bookmark.
必要なものだけ。決して多くない。 Only what you need. Nothing more.
アプリの設定は変更しません。port、host、proxy はすべて外側で。No edits inside your app. Ports, hosts, and proxies live one layer up.
https://<stack>-<svc>.localtest.me でチームに貼れる固定 URL。https://<stack>-<svc>.localtest.me — a URL you can share with the team.
Traefik が Docker ラベルから経路を組み立てます。設定は最小限。Traefik composes routes from Docker labels. Minimal config required.
ローカルでも本物の HTTPS。Service Worker や Secure cookie もそのまま。Real HTTPS on localhost. Service Workers and Secure cookies just work.
ログ・依存・リソース・ヘルスを一画面で。devrouter ui で起動。Logs, deps, resources, health — one screen. Run devrouter ui.
同梱プロンプトを Claude や ChatGPT に渡せば、devrouter.yaml を初期生成できます。Hand the bundled prompt to Claude or ChatGPT and get a first-pass devrouter.yaml.
ヘルス、ログ、再起動 — 必要な情報が一画面に揃います。 Health, logs, restart — everything you need on a single screen.
領域が重なるツールはあります。立ち位置は違います。 Adjacent tools exist. The stance differs.
| 特徴Capability | DevRouter | Tilt | Caddy | Roxy |
|---|---|---|---|---|
| 言語非依存Language-agnostic | ✓ | ✓ | ✓ | ✓ |
| Compose 互換Compose compatible | ✓ | 部分partial | — | — |
| モノレポ stack 抽象Monorepo stack abstraction | ✓ | ✓ | — | — |
| Web UI 同梱Web UI included | ✓ | ✓ | — | — |
| OSS | ✓ | ✓ | ✓ | ✓ |
| macOS / Linux 両対応macOS & Linux | ✓ | ✓ | ✓ | macOSmacOS only |
— Roxy はルーター、DevRouter は管制塔。 — Roxy is a router. DevRouter is a control tower.
macOS / Linux で動作確認。Docker が必要です。 Verified on macOS and Linux. Docker required.
# macOS (Apple Silicon) / Linux (amd64) — see Releases for other arches $ curl -L https://github.com/simota/devrouter/releases/latest/download/devrouter_darwin_arm64.tar.gz | tar xz $ sudo mv devrouter /usr/local/bin/
グローバル Traefik を起動Boot the global Traefik
$ devrouter daemon up
monorepo を立ち上げるBring up your monorepo
$ devrouter up ./myrepo
URL を確認するList the URLs
$ devrouter ls
同梱の prompt を Claude / ChatGPT に渡すだけ。プロジェクトを読み、設定 2 ファイルを生成します。 Hand the bundled prompt to Claude or ChatGPT. It reads your project and emits two config files.
DevRouter は prompts/generate-config.md に設定生成プロンプトを同梱しています。AI が devrouter.yaml と docker-compose.devrouter.yml の初期版を出力します。DevRouter ships prompts/generate-config.md. The AI produces a first draft of devrouter.yaml and docker-compose.devrouter.yml.
You are an expert at generating DevRouter configuration files. Analyze the codebase in the specified directory and generateプロンプト全文を見るRead the full promptdevrouter.yamlanddocker-compose.devrouter.yml… You are an expert at generating DevRouter configuration files. Analyze the codebase in the specified directory and generatedevrouter.yamlanddocker-compose.devrouter.yml…
OSS / MIT。Docker があれば動きます。 OSS / MIT. Works wherever Docker does.