npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@devrouter/cli

v0.0.1

Published

Local dev routing CLI with shared Traefik on macOS

Readme

devrouter

Local-first routing for macOS development with one shared Traefik router.

What it solves

Run multiple repos concurrently without manual port juggling:

  • HTTP apps by hostname: web.localhost, api.localhost
  • PostgreSQL DBs by hostname on shared :5432 via TLS/SNI: db.localhost

Traefik owns:

  • :80 (HTTP)
  • :443 (HTTPS)
  • :5432 (Postgres TCP routing)

Unified repo config

Each repo now uses one file:

  • .devrouter.yml

This is the only supported per-repo config for app routing/runtime definitions.

Core commands

  • dev init [--repo <path>] [--entries-json <json>] [--json]
  • dev up
  • dev down
  • dev status [--repo <path>] [--json]
  • dev doctor|verify [--repo <path>] [--json]
  • dev ls [--json]
  • dev open <name>
  • dev tls install
  • dev repo init [--repo <path>]
  • dev app add ...
  • dev app ls [--repo <path>] [--json]
  • dev app run <name> [--repo <path>] [--yes]
  • dev app rm <name> [--repo <path>]

AI-native onboarding prompt

Generate a ready-to-copy onboarding prompt for an AI agent:

dev init --repo /absolute/path/to/repo

Optional: embed target app entries as JSON:

dev init --repo /absolute/path/to/repo --entries-json '[{"name":"web","host":"web.localhost","protocol":"http","runtime":"host"}]'

JSON mode for machine consumption:

dev init --repo /absolute/path/to/repo --json

Health diagnostics

Run deep checks for global router state and repo configuration:

dev doctor --repo /absolute/path/to/repo

Machine-friendly output:

dev doctor --repo /absolute/path/to/repo --json

dev status now includes readiness hints and next-step commands.

.devrouter.yml example

version: 1
project:
  name: my-repo
apps:
  - name: web
    host: web.localhost
    protocol: http
    runtime: host
    hostRun:
      command: pnpm dev
      cwd: .
      strategy:
        type: auto
        denyPorts: [80, 443, 5432]
        allowPortRange: "1024-65535"
    dependencies:
      - app: db

  - name: db
    host: db.localhost
    protocol: tcp
    tcpProtocol: postgres
    runtime: docker
    docker:
      service: db
      internalPort: 5432
      composeFiles:
        - docker-compose.yml

Notes:

  • TCP mode currently supports PostgreSQL first (tcpProtocol: postgres).
  • Multi-DB hostname routing on shared :5432 requires TLS/SNI.
  • Plaintext Postgres is not supported for multiplexed hostname routing.

Runtime behavior

dev app run <name>:

  • reads .devrouter.yml
  • prompts to start declared dependencies (or use --yes)
  • starts only declared docker dependency services
  • fails fast if host-runtime dependencies are configured (start those manually)
  • starts host app command for host runtime apps
  • generates docker overlay in ~/.config/devrouter/cache/... for docker runtime apps

First onboarding quick path

In a repo that has a host app and a Docker Postgres service:

dev repo init
dev app add --name web --host web.localhost --protocol http --runtime host --command "pnpm dev" --cwd .
dev app add --name db --host db.localhost --protocol tcp --runtime docker --tcp-protocol postgres --service db --port 5432 --compose-file docker-compose.yml
dev app add --name web --host web.localhost --protocol http --runtime host --command "pnpm dev" --cwd . --depends-on db
dev tls install
dev app run web --yes
dev ls

Expected endpoints:

  • https://web.localhost
  • postgres://db.localhost:5432 (tls required)

Demo workspace (in this repo)

A complete sample repository is included at:

It contains:

  • one app running on host (web-host)
  • the same app running in Docker (web-docker)
  • Postgres in Docker (db)
  • ready-to-use .devrouter.yml

Run the end-to-end smoke demo:

pnpm demo:smoke

See details:

Known limitations (v1)

  • Host-runtime dependencies are not auto-started; only Docker dependencies are auto-started.
  • TCP routing currently supports PostgreSQL only (tcpProtocol: postgres).
  • Shared :5432 hostname multiplexing requires TLS/SNI (sslmode=require or stronger).

Router state

Global managed artifacts remain under:

  • ~/.config/devrouter/compose.yml
  • ~/.config/devrouter/traefik/traefik.yml
  • ~/.config/devrouter/traefik/dynamic/base.yml
  • ~/.config/devrouter/traefik/dynamic/host-routes.yml
  • ~/.config/devrouter/host-routes-state.json
  • ~/.config/devrouter/cache/...
  • ~/.config/devrouter/certs/*

Docs