split-exec
v0.0.2
Published
Run multiple commands in parallel with a split-screen TUI dashboard.
Maintainers
Readme
split-exec
A lightweight Node.js TUI (Text User Interface) to run multiple commands side-by-side in a split terminal view.
Features:
- 🖥️ Split Screen: Automatically divides terminal width for 2, 3, 4+ commands.
- 📜 Smart Scrolling: Auto-scrolls to bottom, but pauses if you scroll up to read history.
- 🔄 Restart: Press
rto instantly kill and restart any specific command. - 🖱️ Interactive: Supports Mouse wheel, clicking, and keyboard navigation.
Installation
npm install split-exec
# or globally
npm install -g split-exec
Usage
1. CLI Usage
Run commands directly from your terminal. Great for on-the-fly monitoring.
# Run 3 commands side by side
npx split-exec "ping google.com" "ping 1.1.1.1" "ls -R /"
2. Programmatic Usage
Create a dashboard file (e.g., dev-dashboard.js) for your project.
const { splitExec } = require('split-exec');
splitExec([
// Simple string
'npm run server',
// Object for more control
{
title: 'Jest Tests',
cmd: 'npm',
args: ['test', '--', '--watch']
}
]);
Controls
| Key | Action | | --- | --- | | Tab / Right | Focus next column | | Shift+Tab / Left | Focus previous column | | Up / Down | Scroll history | | r | Restart the focused command | | q / Esc | Quit |
License
MIT
