@shahidkamal/tabr
v0.1.2
Published
Run multiple commands concurrently with a rich TUI (tabs, scrollable output, mouse & keyboard support)
Maintainers
Readme
tabr
A drop-in replacement for concurrently with a rich Terminal User Interface (TUI) built on OpenTUI.
Each concurrently-running command gets its own tab with scrollable output, keyboard shortcuts, and mouse support.
Installation
Requires Bun (OpenTUI is currently Bun-exclusive).
bun add -g tabrUsage
# Run multiple commands concurrently
tabr "npm run server" "npm run client"
# Named tabs
tabr -n "server,client" "npm run server" "npm run client"
# Custom tab colors
tabr -c "red,green" "cmd1" "cmd2"
# Raw mode (no TUI, like vanilla concurrently)
tabr --raw "echo hello" "echo world"
# Kill other processes if one fails
tabr --kill-others-on-fail "npm test" "npm run build"Keyboard Shortcuts
| Shortcut | Action |
|----------|--------|
| Ctrl + 1 | Switch to tab 1 |
| Ctrl + 2 | Switch to tab 2 |
| ... | ... |
| Ctrl + 9 | Switch to tab 9 |
| Tab / Shift + Tab | Cycle through tabs (via TabSelect) |
| Left / Right | Move between tabs (when TabSelect focused) |
| Up / Down | Scroll output (when ScrollBox focused) |
| r | Restart the active tab's command (clears output, respawns) |
| Ctrl + C | Kill all processes and exit |
Mouse Support
- Click tabs to switch between commands
- Scroll wheel to scroll command output
CLI Options
| Flag | Description |
|------|-------------|
| -n, --names <names> | Comma-separated tab names |
| -c, --prefix-colors <colors> | Comma-separated colors for tab prefixes |
| --kill-others | Kill remaining processes when any exits |
| --kill-others-on-fail | Kill remaining processes when any exits with non-zero code |
| -r, --raw | Raw output mode (no TUI) |
| --prefix <prefix> | Prefix format for raw mode (default: [{name}]) |
| --group | Group output by command |
Architecture
src/flags.ts— CLI argument parsing (concurrently-compatible)src/runner.ts— Concurrent command execution viachild_processsrc/tui.ts— OpenTUI interface withTabSelect+ScrollBoxper commandsrc/index.ts— Entry point wiring CLI → runner → TUI/raw mode
