- secubox_frontend.py: Full-featured Textual TUI application - Multi-device dashboard with real-time status monitoring - Device discovery (network scan, mDNS, mesh API) - SSH-based remote command execution and backup orchestration - Tabbed interface: Dashboard, Alerts, Mesh, Settings - Graceful degradation: Textual → Rich → Simple CLI - Support files: - install.sh: One-line installer with dependency handling - requirements.txt: Python dependencies (textual, paramiko, httpx, rich) - secubox-frontend: Launcher script with path detection - Updated README.md: Documents both CLI console and TUI frontend Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| files | ||
| root/usr/lib/secubox-console | ||
| README.md | ||
SecuBox Console & Frontend
Remote Management Point for SecuBox Devices
Two applications for centralized management of multiple SecuBox devices:
- secubox-console - CLI-focused management tool
- secubox-frontend - Modern TUI dashboard with Textual
KISS modular self-enhancing architecture.
Features
- Device Discovery - Automatic network scanning for SecuBox nodes
- Multi-Device Management - Manage multiple SecuBox devices from one console
- Remote Commands - Execute commands on any device via SSH
- Mesh Integration - P2P mesh sync and catalog management
- Snapshot Orchestration - Trigger and manage backups across devices
- Live Dashboard - Real-time TUI with device status
- Plugin System - Extend functionality with custom plugins
- Self-Updating - Auto-update from mesh network
Installation
On SecuBox (OpenWrt)
opkg install secubox-console
On Any PC (Python)
# Clone or copy secubox_console.py
pip install paramiko rich httpx
# Run
python3 secubox_console.py
Usage
Interactive Dashboard
secubox-console
Commands
# Device Management
secubox-console discover # Scan network for devices
secubox-console add mybox 192.168.1.1
secubox-console remove mybox
secubox-console list
# Status & Monitoring
secubox-console status # All devices
secubox-console status mybox # Specific device
# Remote Execution
secubox-console connect mybox # SSH shell
secubox-console exec mybox "uptime"
secubox-console mybox "df -h" # Shortcut
# Backup & Recovery
secubox-console snapshot mybox
secubox-console sync # Sync all mesh nodes
# System
secubox-console plugins # List plugins
secubox-console update # Self-update from mesh
secubox-console help
Dashboard Keys
| Key | Action |
|---|---|
q |
Quit |
r |
Refresh status |
s |
Sync all devices |
d |
Run discovery |
Configuration
Config files stored in ~/.secubox-console/:
~/.secubox-console/
├── devices.json # Saved devices
├── plugins/ # Custom plugins
├── cache/ # Cached data
└── console.log # Log file
devices.json
{
"devices": {
"main-router": {
"name": "main-router",
"host": "192.168.255.1",
"port": 22,
"user": "root",
"node_id": "1b61036323",
"mesh_enabled": true
}
}
}
Plugin Development
Create plugins in ~/.secubox-console/plugins/:
# my_plugin.py
PLUGIN_INFO = {
"name": "my-plugin",
"version": "1.0.0",
"description": "My custom plugin",
"author": "Your Name",
"commands": ["mycommand"]
}
def register_commands(console):
"""Register plugin commands with console"""
console.register_command("mycommand", cmd_mycommand, "My command description")
def cmd_mycommand(args):
"""Handler for mycommand"""
print("Hello from my plugin!")
# Access console.devices, console.ssh_exec(), etc.
Architecture
┌─────────────────────────────────────────────────────┐
│ SecuBox Console │
├─────────────────────────────────────────────────────┤
│ Core Commands │ Plugin System │ SSH Manager │
├───────────────────┼──────────────────┼──────────────┤
│ Device Store │ Mesh Client │ TUI (rich) │
└─────────────────────────────────────────────────────┘
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ SecuBox │ ... │ SecuBox │
│ Node 1 │ │ Node N │
└──────────┘ └──────────┘
Requirements
- Python 3.8+
paramiko- SSH connectionsrich- TUI dashboard (optional)httpx- HTTP/mesh API calls (optional)
License
MIT License - CyberMind 2026