CmdHub is a Windows WPF app for running and monitoring multiple command-line processes from one place.
It is designed for workflows where you need several long-running commands (APIs, workers, scripts, watchers) and want simple start/stop/restart controls with output previews.
- Manage multiple commands in one UI
- Per-command actions: Start, Stop, Restart, Open Console, Edit, Delete
- Per-command actions: Start, Stop, Restart, Open Console, Perf, Edit, Delete
- Live output preview in a dedicated console window
- Optional local HTTP API (enable/disable from toolbar)
- Remote HTML control panel (on separate port)
- React-based control panel UI (componentized, modern layout)
- Frontend build pipeline: React is compiled during
dotnet buildand embedded in the app assembly - Console action to send
Ctrl+Cfor graceful interruption - Auto-restart support for crashed/exited processes
- Run-on-start support
- Minimize to system tray with tray context menu
- Persisted command configuration in
%APPDATA%\CmdHub\config.json
- Windows
- .NET SDK 8.0+
- Node.js + npm (for control panel frontend build)
From repository root (CmdHub/):
- Restore .NET dependencies:
dotnet restore .\CmdHub.sln- (Optional) Install frontend dependencies if this is your first build or
frontend/package-lock.jsonchanged:
cd .\frontend
npm install
cd ..- Build the frontend only (optional sanity check):
cd .\frontend
npm run build
cd ..- Build the full solution (this also builds and embeds the React frontend automatically):
dotnet build .\CmdHub.sln- Run the app:
dotnet run --project .\CmdHub.csprojBuild configuration examples:
# Debug
dotnet build .\CmdHub.sln -c Debug
# Release
dotnet build .\CmdHub.sln -c Release- Click
New Command. - Fill in:
Name: friendly display nameCommand: full command to execute (for exampledotnet run --project MyApi.csproj)Working Directory: optional start directoryAuto Restart: restart after unexpected exitRun On Start: start automatically when CmdHub launchesUse PowerShell: run command viapowershell.exe(useful for shell aliases/functions)
- Use row buttons to control each process.
- Click
Consoleto inspect full output. - Click
Remote: Offin toolbar to enable remote API + control panel. - Click
Settingsto configure API port, control panel port, and control panel password.
When enabled, API base URL is:
http://localhost:5480/api
GET /api/healthGET /api/processesGET /api/processes/{processId}/logsPOST /api/processes(create command)PUT /api/processes/{processId}(edit command)DELETE /api/processes/{processId}(delete command)POST /api/processes/{processId}/actions/startPOST /api/processes/{processId}/actions/stopPOST /api/processes/{processId}/actions/restartPOST /api/processes/{processId}/actions/ctrlcPOST /api/processes/{processId}/actions/clear-logs
logs response contains logs as a string array (one item per log line).
All endpoints (except /api/health) require header:
X-CmdHub-Password: <control-panel-password>
Control panel URL (default):
http://<machine-ip>:5481/
The HTML panel can be opened from another device in the same network and supports:
- Process list with status/usage
- Start / Stop / Restart / Ctrl+C
- Create / Edit / Delete command
- Per-process logs view
logs endpoint query options:
tail(optional, number of chars returned from end of log, default16000, max200000)
CmdHub stores config at:
%APPDATA%\CmdHub\config.json
Config shape:
{
"apiEnabled": false,
"apiPort": 5480,
"controlPanelPort": 5481,
"controlPanelPassword": "generated-random-password",
"commands": [
{
"id": "guid",
"name": "My API",
"command": "dotnet run --project MyApi.csproj",
"workingDirectory": "C:\\path\\to\\project",
"autoRestart": true,
"runOnStart": false,
"usePowerShell": false
}
]
}Stopattempts to terminate the full process tree.Ctrl+Cin console sends an interrupt through standard input (best effort graceful stop).- App exit also triggers cleanup for all managed processes.
- If a process ignores normal termination, CmdHub uses a forced tree-kill fallback on Windows.
- Build fails with file lock (
CmdHub.exe is being used by another process):
Get-Process CmdHub -ErrorAction SilentlyContinue | Stop-Process -Force
dotnet build .\CmdHub.sln- Command does not start:
- Verify executable exists in
PATHor provide full path. - Verify
Working Directoryis valid. - For shell-specific commands/aliases, enable
Use PowerShell. - Open
Consolefor error output.
- Verify executable exists in
MainWindow.xaml/MainWindow.xaml.cs: main grid UI + tray behaviorViewModels/MainViewModel.cs: command list orchestrationViewModels/CommandViewModel.cs: process lifecycle and output bufferingViews/ConsoleWindow.xaml/Views/ConsoleWindow.xaml.cs: log viewer windowServices/ConfigService.cs: load/save JSON configModels/: config models
MIT License. See LICENSE for details.