type: decision
status: active
timestamp: 2026-06-30
tags: [omniroute, dev-server, ai-gateway, auto-start, windows]

OmniRoute: run from source via dev server, auto-pull on boot

Switch from `npm install -g omniroute` to running the cloned fork's dev server. Auto-start on Windows login pulls upstream and launches pnpm dev in a dedicated Windows Terminal tab.

OmniRoute: dev server from source, auto-pull on boot

Decision

OmniRoute (the AI gateway router) runs from a local clone of the fork, not from npm install -g omniroute. The fork at chirag127/OmniRoute tracks diegosouzapw/OmniRoute as upstream. On every Windows login, a startup script:

  1. Fast-forward merges upstream/main into local main
  2. Runs pnpm install only if package.json or pnpm-lock.yaml changed
  3. Spawns pnpm dev in a dedicated Windows Terminal tab titled “OmniRoute Dev”
  4. Skips if :20128 is already in use

Dashboard at http://localhost:20128 after ~10-30s Next.js compile.

Why this replaces npm install -g omniroute

The global npm install pulls 1000+ packages, takes 18+ minutes per update. OmniRoute ships releases multiple times daily (v3.8.36 through v3.8.42 in the week of 2026-06-25). Either you:

Running from source:

Why a fork (not direct clone of upstream)

Per fork-discipline: all forks live under chirag127/<upstream-name> with upstream wired as a remote. This gives:

Auto-start mechanism

shell:startup shortcut at C:\Users\<USER>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\OmniRoute Dev.lnk invokes:

powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\D\oriz\scripts\start-omniroute-dev.ps1"

The script is idempotent (port check) and safe to run repeatedly.

Manual triggers:

Why Windows shortcut over Task Scheduler

task-scheduler-at-login-2026-06-26 is the family standard for “run on login.” For a single dev server that the user wants to see (Windows Terminal tab visible, output readable), shell:startup is simpler than Task Scheduler:

For services that should run invisible-in-background (Hr, cavemem hooks), Task Scheduler remains the right tool.

Replacement procedure

See runbooks/operations/start-dev-server-from-source for the step-by-step migration from npm install -g omniroute to the dev-server path.

Caveats

Path note for shell:startup

When constructing the wt new-tab ... pwsh -Command "..." arg string, use absolute paths to pnpm.cmd / npm.cmdwt-spawned shells don’t reliably inherit the User PATH. See rules/development/windows-shortcut-absolute-binary-paths.

See also


Edit on GitHub · Back to index