mux-0kmtui
TUI (Text User Interface) for running commands on multiple VPS simultaneously via 0km vps-mux.
Features
- Multi-server selection: Select multiple servers with the spacebar
- Filter by name or tag: Quickly search through your servers
- Multi-line commands: Write complete bash scripts in the editor
- Script import: Load
.shfiles to execute - Parallel execution: Run commands on all selected servers at once
- Real-time logs: View output from each server in dedicated tabs
- Closable tabs: Close individual tabs when done
Installation
cd mux-0kmtui
pip install -e .
Usage
mux-0kmtui
Workflow
- Filter (optional): Type in the search bar to filter by name or tag
- Select: Check the servers (Space to toggle, or All/None buttons)
- Command: Type a command or load a script (Ctrl+O)
- Execute: Press
Ctrl+Ror click "Run" - Monitor: View logs from each server in the tabs
- Clean up: Close tabs with the X button
Keyboard Shortcuts
| Key | Action |
|---|---|
F1 |
Show help |
Ctrl+Q |
Quit |
Ctrl+R |
Run command |
Ctrl+O |
Load .sh file |
Ctrl+L |
Close all tabs |
Ctrl+A |
Select all visible servers |
Ctrl+D |
Deselect all visible servers |
Escape |
Focus command input |
Space |
Toggle server selection |
Configuration
Configuration is read from (in order of priority):
~/.config/0kmtui/config.yml~/.config/0km/config.yml/etc/0km/config.yml
Format
hosts:
my-server.com:
host: my-server.com
tags: [prod, web]
staging.example.com:
host: staging.example.com
tags: [staging, api]
db-server:
host: 192.168.1.100
user: admin
port: 2222
tags: [prod, database]
Fields
| Field | Description | Default |
|---|---|---|
host |
Hostname or IP | (entry name) |
user |
SSH user | root |
port |
SSH port | 22 |
tags |
List of tags for filtering | [] |
Requirements
- Python 3.10+
0kmcommand installed and in PATH (from myc-manage)- SSH access to configured servers
License
AGPL-3.0 - See LICENSE