@gachlab/devup
v0.11.2
Published
Dev stack runner with TUI, lazy proxy, and reverse proxy support
Maintainers
Readme
devup
A terminal UI dev-stack runner for Node.js monorepos. Define your services in a config file; devup handles phased startup, health checks, lazy on-demand proxies, build hooks, persistent logs, reverse-proxy config generation, and a JSON-RPC control plane — all from a single TUI dashboard.
Built with TypeScript 6, Ink (React for terminals), and zero test dependencies (uses node:test natively).
Features
Orchestration
- Phased startup — boot services in dependency order with automatic port readiness detection.
- Lazy mode — only start services when they receive traffic; idle services shut down after a configurable timeout (respects active connections, no killing mid-WebSocket).
- Profiles — name common service subsets in config; boot with
devup --profile check-in. - External hooks — start
docker compose(DBs, queues) before phase 0, with health gating andstopCmdon shutdown. - Build hooks —
preBuild(must succeed before spawn) andwatchBuild(runs alongside the service), both managed by devup with kill-tree cleanup. - Hot reload —
--watch-configdiffsdevup.config.*on save and applies add/remove/restart without killing the TUI. - Auto-restart with backoff — crashed services restart automatically with exponential backoff (2s → 4s → 8s), max 3 attempts; manual restart resets the counter; crash-loop badge surfaces services that need attention.
- Pre-flight validation —
--watch-patharguments are checked against disk before spawn so a stale config after a rebase fails loudly instead of silently. - Port-conflict detection — refuses to boot when ports collide, including lazy-mode
port + 10000clashes. - npm install management — automatic dependency installation with hash-based stamps to skip redundant installs.
Readiness
- TCP or HTTP health checks — per-service
healthCheckwith configurable path, status codes, timeout, andstartPeriodgrace window. readyPattern— regex matched against stdout/stderr; the first match flips the service toup, short-circuiting the next health poll.errorPattern— only matching stderr lines bump the error counter (filters info-on-stderr noise).
TUI
- Live logs and process stats — CPU, memory, health, errors, restarts in a split-panel terminal UI.
- Scrolling, search, filter — ↑/↓/PgUp/PgDn/Home/End; auto-pause when you scroll up; regex search with
/pattern/flags. - Level filter —
Lcyclesall → error → warn+error. - Verbose stats —
vexpands rows to show resolvedcmd/args/env (secrets redacted). - Fuzzy filter — service-picker modals (
f/r/o) filter as you type. - Contextual tips — one-liner nudges at teachable moments (high log volume, crash loop), once per session.
- RAM watchdog — banner surfaces when system RAM crosses 80% with top consumers (hysteresis: clears below 75%).
- TLS-aware open —
oopenshttps://<sub>.<domain>when--proxyis active and TLS is on.
Operations
- Persistent logs — every line streamed to
~/.devup/logs/<project>/<svc>.logwith rotation on each launch. - Subcommands —
devup logs <svc> [--follow],devup install,devup status,devup helpwork without launching the TUI. - CI-ready —
--dry-runprints the resolved boot plan;--onceboots, waits for readiness, exits0/1without a TUI. - Daemon mode —
devup up -dboots the stack detached (likedocker compose up -d) so you can keep using the same terminal.devup downstops it. Linux + macOS. - Port-conflict takeover — when something else is already on a configured port, devup shows you the holder (PID + process name) and offers to kill it.
--kill-port-conflictsfor non-interactive runs. devup ctl— CLI client for the control plane:ping,status [--follow],logs <svc> [--follow],restart,stop.- Reverse-proxy config — generate Traefik, Nginx, or Caddy config from running services; health-aware.
- Unix-socket control plane — local JSON-RPC at
~/.devup/sock-<project>.sock(chmod 0600);status,restart,stop,logs.tail,logs.follow,status.follow,ping. - Cross-platform — Linux, macOS, and Windows for the TUI; daemon mode is Linux + macOS only.
Quick start
npm install -D @gachlab/devupCreate devup.config.ts:
import { defineConfig } from '@gachlab/devup';
export default defineConfig({
name: 'MyApp',
icon: '🚀',
services: [
{
name: 'api',
cwd: 'packages/api',
cmd: 'node',
args: ['--watch-path', 'src', 'src/index.js'],
type: 'api',
port: 3000,
phase: 0,
readyPattern: 'listening on',
},
{
name: 'web',
cwd: 'packages/web',
cmd: 'npx',
args: ['vite', '--port', '4200'],
type: 'web',
port: 4200,
phase: 1,
readyPattern: 'ready in',
},
],
});Run:
npx devupSee docs/getting-started.md for a full walkthrough.
Documentation
The comprehensive guide lives in docs/:
- Getting started — 5-minute tutorial
- Configuration reference — every field of
devup.config.ts - Health checks — TCP / HTTP /
readyPattern/startPeriod/errorPattern - Lazy mode — on-demand spawning, idle timeouts, troubleshooting
- Build hooks —
preBuildandwatchBuildfor TypeScript services - External services — wire docker-compose into the boot sequence
- Profiles — save service subsets under a name
- Reverse proxy — Traefik / Nginx / Caddy generators
- TUI tour — every keybinding
- CLI reference — flags + subcommands
- Control plane — Unix-socket JSON-RPC
- Hot reload —
--watch-config - Recipes — patterns for Vite, Angular, NestJS, TypeScript, Docker
- Troubleshooting
- Architecture — for contributors
Requirements
- Node.js ≥ 22
- npm
- A terminal with TTY support (for the TUI; subcommands don't need it)
Development
git clone https://github.com/gachlab/devup.git
cd devup
npm install
npm run build
npm test # 331 tests, node:test native
npm run test:coverageSee docs/architecture.md for the codebase tour.
Changelog
CHANGELOG.md — every release, every notable change.
Roadmap
ROADMAP.md — what's next, open questions, scope discussions.
License
MIT © gachlab
