Skip to content

Repository files navigation

dpr (Dev Process Runner)

Stop juggling terminal tabs. dpr is a terminal UI that lets you manage all your development services in one place — start, stop, monitor logs, and handle dependencies with ease.

npm versionLicense: MIT

This project was created using Claude Code and AI tools. Most of the code was generated by AI. Bugs, errors, and unexpected behavior are likely. Contributions, bug reports, and PRs are welcome! If you are sensitive to AI-generated code, please use with caution.

dpr demo

Features

  • Multi-service management — Run and monitor multiple services in a single terminal
  • Smart dependencies — Services wait for their dependencies to be ready before starting
  • Real-time logs — View logs with search, scroll, and fullscreen mode
  • Vim-style navigation — Keyboard-first design; native terminal text selection for copy/paste
  • Flexible configuration — YAML config with auto-start, colors, and custom commands
  • Log persistence — Optionally save logs to files for debugging

Installation

Homebrew (macOS/Linux)

brew install tx2z/tap/dev-process-runner

npm (requires Node.js 20+)

npm install -g @tx2z/dev-process-runner

Direct Download

Download the latest binary for your platform from GitHub Releases:

PlatformDownload
macOS (Apple Silicon)dpr-macos-arm64
macOS (Intel)dpr-macos-x64
Linux (x64)dpr-linux-x64
Linux (ARM64)dpr-linux-arm64
Windows (x64)dpr-win-x64.exe

After downloading, make it executable and move to your PATH:

chmod +x dpr-macos-arm64
sudo mv dpr-macos-arm64 /usr/local/bin/dpr

Note: Windows support is experimental. Process management and terminal rendering may have issues on Windows.

Usage

# Run with default config (./dpr.yaml)
dpr
# Run with custom config
dpr --config path/to/config.yaml
# Validate config without running
dpr --validate
# Show help
dpr --help

Configuration

Create a dpr.yaml file in your project root:

name: "My Project"columns: auto # or 1, 2, 3logs: true # enable log persistencelogsDir: ~/.dpr/logsservices:
- id: apiname: "API Server"dir: ./apistart: npm run devstop: npm run stop # optional graceful stop commandautostart: truecolor: greenreadyPattern: "listening on port"dependsOn: []
- id: webname: "Web Frontend"dir: ./webstart: npm run devautostart: truecolor: bluedependsOn:
- api

Global Options

OptionTypeDefaultDescription
namestringnullProject name displayed in header
columnsnumber | "auto""auto"Number of columns for service panels
logsbooleanfalseEnable log persistence for all services
logsDirstring"~/.dpr/logs"Directory for log files

Service Options

OptionTypeDefaultDescription
idstring(required)Unique service identifier
namestringidDisplay name for the service
dirstring"."Working directory
startstring(required)Start command
stopstringnullGraceful stop command
autostartbooleanfalseStart automatically on launch
colorstring(auto)Panel border color
logsbooleanglobal.logsEnable log persistence
envobject{}Environment variables
dependsOnstring[][]Service dependencies
readyPatternstringnullRegex pattern to detect ready state
readyDelaynumber500Delay after first output before ready
runOncebooleanfalseFor commands that start background services and exit (e.g., supabase start, docker-compose up -d)

Colors

Available colors: green, blue, yellow, magenta, cyan, red

Keyboard Shortcuts

Normal Mode

KeyAction
q / Ctrl+CQuit application
/Enter command mode
?Show help
fEnter search mode
1-9Focus service panel by number
Tab / Shift+TabCycle through panels
tToggle between grid and sidebar view

Projects with more than 6 services always use the sidebar view; the columns option is ignored in that case.

Sidebar View

With more than 6 services (or after pressing t), dpr shows a sidebar listing every service and a main area with up to 4 log "windows" stacked full-width.

KeyAction
j / k / arrowsMove the sidebar selection
EnterShow the selected service as the only window
wAdd/remove the selected service as a window (max 4)
Tab / Shift+TabSwitch the focused window
[ / ]Scroll the focused window up/down a page
g / GScroll the focused window to top/bottom
cClose the focused window
vStream mode — print this service's logs into native scrollback
s / x / K / r / hService actions on the selected service

Copying log lines: there are two ways to copy, depending on what you want:

  • Drag inside a window (sidebar view): dpr captures the mouse and highlights the log lines you drag over within that window; releasing copies them to the clipboard (OSC 52). This is line-level and stays inside the window you started in — no bleeding into the sidebar.
  • v stream mode: prints the selected service's logs into the terminal's real scrollback (via ink's <Static>), exactly like a normal command's output — so you can select character-precise and copy anywhere with your terminal's own selection (Cmd+C). Press q / Esc to return.

The y / Y shortcuts still copy the visible / full log buffer via OSC 52 with no mouse at all.

Focused Panel (View Mode)

When a panel is focused (highlighted border):

KeyAction
EnterEnter action mode
EscapeUnfocus panel
j / Down ArrowScroll logs down
k / Up ArrowScroll logs up
gScroll to top
GScroll to bottom

Action Mode

When in action mode (green double border):

KeyAction
sStart service
xStop service (graceful)
KKill service (force)
EscapeExit action mode

Note: Action mode requires explicit activation with Enter to prevent accidental service stops.

Command Mode

KeyAction
EnterExecute command
EscapeCancel command
BackspaceDelete character

Search Mode

KeyAction
Tab / Down ArrowNext match
Shift+Tab / Up ArrowPrevious match
EnterConfirm search
EscapeCancel search

Commands

CommandAliasesDescription
/start <service>/sStart a service
/stop <service>/xStop a service gracefully
/kill <service>/kForce kill a service
/restart <service>/rRestart a service
/start-all/saStart all services
/stop-all/xaStop all services
/clear <service>/cClear service logs
/focus <service>/fFocus service panel
/quit/qStop all and exit
/help/h, /?Show help

Services can be referenced by number (1-6), ID, or name.

Service States

StateDescription
STOPPEDService is not running
WAITINGWaiting for dependencies to become ready
STARTINGService process has started
READYService is ready (matched readyPattern or delay elapsed)
STOPPINGService is being stopped
CRASHEDService exited unexpectedly

Dependencies

Services can depend on other services using dependsOn. A service will wait until all its dependencies are in the READY state before starting.

Circular dependencies are detected and will cause validation to fail.

Log Persistence

When logs: true is set (globally or per-service), logs are written to files in the configured logsDir. Each service gets its own log file named <service-id>.log.

Log format:

[2024-01-15T10:30:00.000Z] Server started on port 3000
[2024-01-15T10:30:01.000Z] [ERR] Warning: deprecated API used

Development

# Clone and install
git clone https://github.com/tx2z/dpr.git
cd dpr
npm install
# Run in development mode
npm run dev
# Type checking
npm run typecheck
# Linting
npm run lint
# Run tests
npm test# Build
npm run build
# Run built version
node dist/index.js

License

MIT

About

Dev Process Runner - A terminal-based UI application for managing multiple development services simultaneously.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages