A feature-rich SSH server management CLI tool
Project description
๐ OmniHost
High-Performance SSH Management CLI for DevOps Engineers
Manage hundreds of servers with lightning-fast parallel execution, beautiful CLI output, and DevOps-focused shortcuts.
Features โข Installation โข Quick Start โข Documentation โข Contributing
โก Highlights
# Quick start
omnihost --version # Check version
omnihost examples # See usage examples
# Server Groups - organize your infrastructure
omnihost group add web web01 web02 web03
omnihost exec-group web "systemctl restart nginx"
omnihost exec-group web "uptime" --dry-run # Preview first!
# Command Aliases - reduce repetitive typing
omnihost alias add restart-nginx "sudo systemctl restart nginx"
omnihost exec-group web restart-nginx
# File Transfer - push/pull files easily
omnihost push web01 ./app.tar /opt/app/
omnihost pull db01 /var/log/mysql.log ./logs/
omnihost push web01 ./dist /var/www/ --recursive
# Execute on all servers in parallel - 10x faster, with retry & dry-run
omnihost exec-all "systemctl status nginx" --parallel 10 --retries 2 --dry-run
omnihost exec-all "uptime" --json | jq '.succeeded' # CI/CD integration
# Quick DevOps shortcuts - no need to type full exec commands
omnihost uptime # Uses default server
omnihost disk web01
omnihost memory db01
# Beautiful, formatted output with Rich library
omnihost list # Stunning table view of all servers
# Enhanced logging for troubleshooting
omnihost --verbose exec web01 "ls -la"
omnihost --debug exec-all "uptime"
# Audit logging - all commands tracked automatically
cat ~/.omnihost/audit.log # JSON audit trail
๐ฏ Why OmniHost?
| Problem | Traditional Approach | OmniHost |
|---|---|---|
| Check 20 servers | 20 ร 3s = 60 seconds | 12 seconds (parallel) |
| Type repetitive commands | ssh user@host 'uptime' |
omnihost uptime |
| Manage server configs | Edit ~/.ssh/config manually |
Interactive omnihost add |
| View command output | Plain text | Beautiful formatted panels |
| Execute on multiple servers | Write bash loops | omnihost exec-all |
โจ Features
๐ฅ๏ธ Server Management
- Add/Edit/Remove servers with interactive prompts
- List all configured servers with beautiful table view
- Info command with connection testing
- Integrates with SSH config (
~/.ssh/config)
โก Performance Features
- Parallel execution on multiple servers (5-20x faster)
- Bulk operations (
exec-all,exec-multi) - Quick commands for common DevOps tasks
- Default server configuration (no need to specify every time)
- Connection pooling and caching
๐จ Beautiful CLI
- Rich formatted output with colors and panels
- Progress bars for bulk operations
- Interactive prompts with validation
- Clean, organized command structure
๐ Security
- SSH key authentication support
- No password storage
- Respects SSH config security settings
- Connection timeout management
๐ฆ Installation
From Source
# Clone the repository
git clone https://github.com/sagar.memane/omnihost.git
cd omnihost
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install
pip install -e .
Requirements
- Python 3.8 or higher
- SSH access to remote servers
- SSH keys configured (recommended)
๐ Quick Start
1. Add Your First Server
omnihost add
# Follow interactive prompts
Or use command-line options:
omnihost add -a web01 -h 192.168.1.100 -u ubuntu --key ~/.ssh/id_rsa
2. List Servers
omnihost list # Basic view
omnihost list -v # Verbose with SSH keys
3. Set Default Server (Optional)
omnihost config set-default web01
# Now you can use: omnihost uptime (without specifying server)
4. Execute Commands
# Single server
omnihost exec web01 "df -h"
# All servers (parallel)
omnihost exec-all "uptime"
# Specific servers
omnihost exec-multi "web01,web02,db01" "systemctl status nginx"
5. Quick DevOps Commands
omnihost uptime web01 # Quick uptime
omnihost disk web01 # Disk usage
omnihost memory web01 # Memory usage
omnihost processes web01 # Top processes
omnihost status web01 nginx # Service status
omnihost logs web01 nginx # View logs
6. Interactive Shell
omnihost connect web01
# Full PTY support - run vim, htop, top, etc.
๐ Documentation
- Quick Reference - Command cheat sheet
- Performance Guide - DevOps patterns and optimization
- Architecture - Code structure and design
- Contributing - Development guide
- Security - Security policy
- Changelog - Version history
๐ฏ Common Use Cases
Daily Operations
# Morning health check
omnihost exec-all "uptime && free -h" --parallel 10
# Check disk space across infrastructure
omnihost exec-all "df -h /" --no-output | grep "9[0-9]%"
Deployments
# Deploy to web servers
omnihost exec-multi "web01,web02,web03" \
"cd /app && git pull && systemctl restart app" --parallel 3
# Verify deployment
omnihost exec-multi "web01,web02,web03" "curl -s localhost/health"
Troubleshooting
# Quick diagnostics
omnihost memory prod01
omnihost processes prod01
omnihost logs prod01 nginx -n 100
# Check all servers for issues
omnihost exec-all "systemctl is-failed --quiet || echo 'Services OK'"
๐๏ธ Project Structure
omnihost/
โโโ __init__.py # Package metadata
โโโ cli.py # CLI entry point
โโโ config.py # Configuration management
โโโ ssh_config.py # SSH config operations
โโโ ssh_client.py # Connection management
โโโ performance.py # Caching & optimization
โโโ commands/ # Command modules
โโโ server_management.py # list, add, edit, remove, info
โโโ exec_command.py # Remote execution
โโโ connect_command.py # Interactive shell
โโโ bulk_operations.py # exec-all, exec-multi
โโโ quick_commands.py # Quick DevOps shortcuts
โโโ config_command.py # Configuration management
๐ค Contributing
- ๐ Beautiful table formatting for server lists
- โน๏ธ Server information - View details and test connections
- ๐ง SSH config integration - Works with
~/.ssh/config - ๐จ Rich formatting - Color-coded output and panels
- ๐พ Persistent storage - All config saved to SSH config file
- ๐ SSH key support - Use identity files for authentication
๐ Commands Reference
| Command | Description | Example |
|---|---|---|
list |
Show all configured servers | omnihost list -v |
add |
Add a new server | omnihost add -a web01 -h 1.2.3.4 -u ubuntu |
info |
Show server details | omnihost info myserver |
edit |
Edit server configuration | omnihost edit myserver |
remove |
Remove a server | omnihost remove myserver |
exec |
Execute command on server | omnihost exec myserver "ls -la" |
connect |
Open interactive shell | omnihost connect myserver |
๐ Project Structure
ServerManager/
โโโ omnihost/ # Main package
โ โโโ __init__.py # Package metadata
โ โโโ cli.py # CLI entry point
โ โโโ ssh_config.py # SSH config operations
โ โโโ ssh_client.py # Connection management
โ โโโ utils.py # Shared utilities
โ โโโ commands/ # Command modules
โ โโโ __init__.py
โ โโโ server_management.py # list, add, edit, remove, info
โ โโโ exec_command.py # Remote command execution
โ โโโ connect_command.py # Interactive shell
โโโ pyproject.toml # Package configuration
โโโ requirements.txt # Dependencies
โโโ main.py # Legacy wrapper
โโโ README.md # This file
โโโ ARCHITECTURE.md # Developer guide
โโโ QUICK_REFERENCE.md # Quick reference
๐ง Development
Install in Development Mode
pip install -e .
Changes to the code are immediately reflected without reinstalling.
Run Tests
# Syntax check
python -m py_compile omnihost/*.py omnihost/commands/*.py
# Test commands
omnihost --help
omnihost list
Add New Commands
- Create
omnihost/commands/my_command.py - Import in
omnihost/cli.py - Register with
register_my_command(app)
See ARCHITECTURE.md for details.
๐ ๏ธ Requirements
- Python 3.8 or higher
- Unix-like system (Linux, macOS, WSL on Windows)
- SSH config file at
~/.ssh/config
๐ SSH Config
OmniHost works with standard SSH config format:
Host myserver
HostName 192.168.1.100
User ubuntu
Port 22
IdentityFile ~/.ssh/id_rsa
Host production
HostName prod.example.com
User admin
IdentityFile ~/.ssh/prod_key
OmniHost can create and manage this file for you!
๐จ Example Sessions
Adding a Server
$ omnihost add
โญโโโโโโโโโโโโโโโโโโฎ
โ Add New Server โ
โฐโโโโโโโโโโโโโโโโโโฏ
Server alias: web01
Hostname or IP address: 192.168.1.100
SSH username: ubuntu
SSH port [22]:
Use SSH key file? [Y/n]: y
Path to private key [~/.ssh/id_rsa]:
Configuration Summary:
Alias: web01
Hostname: 192.168.1.100
User: ubuntu
Port: 22
Identity File: ~/.ssh/id_rsa
Add this server? [Y/n]: y
โ Successfully added server 'web01'
Listing Servers
$ omnihost list
Configured Servers
โญโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโฎ
โ Alias โ Hostname โ User โ Port โ
โโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโค
โ web01 โ 192.168.1.100โ ubuntu โ 22 โ
โ db01 โ 10.0.0.5 โ postgres โ 22 โ
โฐโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโฏ
Total servers: 2
Executing Commands
$ omnihost exec web01 "df -h | head -5"
โญโโโโโโโโโโโโโโโโโโโโโโ ๐ Connecting โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Host: web01 โ
โ Server: ubuntu@192.168.1.100:22 โ
โ Command: df -h | head -5 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโ โ Output โโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Filesystem Size Used Avail Use% Mounted on โ
โ /dev/sda1 50G 20G 28G 42% / โ
โ tmpfs 16G 0 16G 0% /dev/shm โ
โ /dev/sdb1 100G 45G 51G 47% /data โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐ค Contributing
We love contributions! Here's how you can help:
- Star this repo โญ
- Report bugs via GitHub Issues
- Suggest features or improvements
- Submit Pull Requests - see CONTRIBUTING.md
Development Setup
git clone https://github.com/sagar.memane/omnihost.git
cd omnihost
python3 -m venv venv
source venv/bin/activate
pip install -e .
See CONTRIBUTING.md for detailed guidelines.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built with Typer - Modern CLI framework
- Styled with Rich - Beautiful terminal formatting
- SSH via Paramiko - Pure Python SSH implementation
๐ฎ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: See SECURITY.md for reporting vulnerabilities
๐บ๏ธ Roadmap
- Server management (add, edit, remove, list)
- Remote command execution
- Interactive shell sessions
- Bulk parallel operations
- Quick DevOps shortcuts
- Server grouping and tagging
- Command history and replay
- Custom command templates
- SSH tunnel management
- File transfer operations (SCP/SFTP)
- Integration with cloud providers (AWS, Azure, GCP)
- Web UI for server management
- Ansible integration
๐ Performance Benchmarks
| Operation | Sequential | Parallel (--parallel 5) | Speedup |
|---|---|---|---|
| 10 servers uptime | 30s | 6s | 5x |
| 20 servers status | 60s | 12s | 5x |
| 50 servers check | 150s | 30s | 5x |
Tests conducted on servers with ~300ms average latency
๐ Troubleshooting
Command not found after installation
source venv/bin/activate # Activate virtual environment
pip install -e . # Reinstall if needed
which omnihost # Should show path in venv
Connection issues
# Test SSH manually first
ssh -F ~/.ssh/config myserver
# Check server configuration
omnihost info myserver
Permission errors with SSH keys
chmod 600 ~/.ssh/id_rsa
chmod 700 ~/.ssh
Slow bulk operations
# Increase parallelism (default is 5)
omnihost exec-all "uptime" --parallel 10
# Reduce timeout for faster failure detection
omnihost exec-all "ping -c 1 google.com" --timeout 5
Made with โค๏ธ for DevOps Engineers
If you find OmniHost useful, please โญ star this repository!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omnihost688-1.0.0.tar.gz.
File metadata
- Download URL: omnihost688-1.0.0.tar.gz
- Upload date:
- Size: 64.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8408c284e664bbcc0facc8f209bcafbfeadd87f59d9ed2253db633a6602fdf14
|
|
| MD5 |
e4b7ccd5b59355262e5bff3155e3b524
|
|
| BLAKE2b-256 |
d848eaf5245427145e393b7323ce5b494fd40e5512d49a38521ad35fc9d9eb93
|
Provenance
The following attestation bundles were made for omnihost688-1.0.0.tar.gz:
Publisher:
publish-to-pypi.yml on sagarmemane135/omnihost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnihost688-1.0.0.tar.gz -
Subject digest:
8408c284e664bbcc0facc8f209bcafbfeadd87f59d9ed2253db633a6602fdf14 - Sigstore transparency entry: 757510717
- Sigstore integration time:
-
Permalink:
sagarmemane135/omnihost@8025bb6514da5d4b98edf5fa14b8d5d4ea303840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sagarmemane135
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@8025bb6514da5d4b98edf5fa14b8d5d4ea303840 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file omnihost688-1.0.0-py3-none-any.whl.
File metadata
- Download URL: omnihost688-1.0.0-py3-none-any.whl
- Upload date:
- Size: 37.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9328b81622fa80647fde610c154173391144abe04da92e11f3fe09e5a54721c5
|
|
| MD5 |
573411cede94b8b2838eeaa5fb513c05
|
|
| BLAKE2b-256 |
0305c6cc4309beee2a8eaf9def2f0857dd4a5961664cc629fb536009e20f2059
|
Provenance
The following attestation bundles were made for omnihost688-1.0.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on sagarmemane135/omnihost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnihost688-1.0.0-py3-none-any.whl -
Subject digest:
9328b81622fa80647fde610c154173391144abe04da92e11f3fe09e5a54721c5 - Sigstore transparency entry: 757510718
- Sigstore integration time:
-
Permalink:
sagarmemane135/omnihost@8025bb6514da5d4b98edf5fa14b8d5d4ea303840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sagarmemane135
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@8025bb6514da5d4b98edf5fa14b8d5d4ea303840 -
Trigger Event:
workflow_dispatch
-
Statement type: