A simple fleet management tool for maintaining and updating sendspin-cli installations across multiple Linux hosts via SSH.
- Parallel Execution: All operations run simultaneously across all hosts for maximum speed
- Live TUI Display: Beautiful terminal UI with per-host status lines that update in real-time
- Animated Progress: Spinners show which hosts are actively working
- Status Monitoring: Check service status, version, and configured name across all hosts
- System Updates: Update system packages via
apton all hosts - Sendspin Updates: Update sendspin-cli package via
uvon all hosts - Batch Operations: Update both system and sendspin packages in one command
- Colorful Output: Color-coded status indicators (green ✔, red ✘, yellow ⚠)
- Flexible Configuration: Support for different SSH users per host
- Bash 4.0 or higher
- SSH access to all target hosts with public key authentication configured
- Target hosts must be Debian-based Linux systems with
aptpackage manager uvpackage manager installed on target hosts for sendspin updates- sendspin-cli installed under a service user (default:
sendspin)
- Clone or download this repository:
git clone <repository-url> sendspin-fleet
cd sendspin-fleet- Make the script executable:
chmod +x sendspin-fleet- Create your hosts configuration file:
cp hosts.conf.example hosts.confEdit hosts.conf to define your fleet of hosts. Format: hostname:ssh_user (one per line).
Example hosts.conf:
# Production audio players
player1.local:root
player2.local:root
192.168.1.100:admin
# Development hosts
dev-player.local:myuser
audio-endpoint-01:sendspin
Important Notes:
- Lines starting with
#are treated as comments - Empty lines are ignored
- If no user is specified (no colon), defaults to
root - SSH must be configured for public key authentication (passwordless login)
HOSTS_FILE: Path to hosts configuration file (default:hosts.conf)SENDSPIN_USER: Service user name for sendspin (default:sendspin)
Example with custom configuration:
HOSTS_FILE=production-hosts.conf SENDSPIN_USER=audioplayer ./sendspin-fleet status./sendspin-fleet <command>Check the status of all hosts in your fleet in parallel with a live TUI:
- SSH connectivity
- Service status (running/stopped/failed)
- Sendspin version
- Configured device name from settings
./sendspin-fleet statusThe TUI displays one line per host that updates in real-time:
While running:
ℹ Running on 3 host(s) in parallel...
⠋ player1.local: Checking service status...
⠙ player2.local: Retrieving version info...
⠹ player3.local: Connecting via SSH...
When complete:
ℹ Running on 3 host(s) in parallel...
✔ player1.local: ✔ Kitchen Speaker | v0.2.1 | active
✔ player2.local: ✔ Living Room | v0.2.1 | active
✔ player3.local: ✔ Bedroom | v0.2.1 | active
✔ All operations completed successfully
Update system packages on all hosts using apt in parallel with live TUI:
./sendspin-fleet update-systemExecutes on each host: sudo apt update && sudo apt upgrade -y
Watch the TUI as each host progresses through:
- Connecting via SSH
- Running apt update
- Running apt upgrade (may take a while)
- Completion
Each host's line updates with its current step, with a spinner showing active operations.
Update the sendspin-cli package on all hosts using uv in parallel with live TUI:
./sendspin-fleet update-sendspinExecutes on each host: sudo -u sendspin /home/sendspin/.local/bin/uv tool upgrade sendspin
Watch real-time progress for each host:
- Connecting via SSH
- Upgrading sendspin via uv
- Restarting sendspin service
- Completion with new version number
All hosts update simultaneously with animated spinners showing which are actively working.
Update both system packages and sendspin-cli on all hosts in parallel with live TUI:
./sendspin-fleet update-allThis runs two phases:
- System updates on all hosts in parallel (with TUI)
- Sendspin updates on all hosts in parallel (with TUI)
Maximum efficiency with clear visual feedback throughout!
Display usage information:
./sendspin-fleet helpFor passwordless SSH authentication, you need to set up public key authentication on all target hosts.
ssh-keygen -t ed25519 -C "sendspin-fleet"ssh-copy-id user@hostnameReplace user@hostname with the actual SSH user and hostname from your hosts.conf.
ssh user@hostname echo "Connection successful"If this works without prompting for a password, you're all set!
./sendspin-fleet status./sendspin-fleet update-all./sendspin-fleet update-system./sendspin-fleet update-sendspin# Use a different hosts file
HOSTS_FILE=production-hosts.conf ./sendspin-fleet status
# Use a different service user name
SENDSPIN_USER=audioplayer ./sendspin-fleet update-sendspin
# Combine both
HOSTS_FILE=prod.conf SENDSPIN_USER=audioplayer ./sendspin-fleet update-allMake sure you've created a hosts.conf file in the same directory as the script. You can copy from the example:
cp hosts.conf.example hosts.conf- Verify the hostname is correct and reachable:
ping hostname - Check SSH public key authentication is set up:
ssh user@hostname - Ensure the SSH user in
hosts.confmatches the user you've set up keys for
Download the bash-tui-toolkit:
curl -sL https://raw.githubusercontent.com/timo-reymann/bash-tui-toolkit/main/tui-toolkit.sh -o tui-toolkit.shThe service name may not match the SENDSPIN_USER. Check the actual service name:
ssh user@hostname systemctl list-units --type=service | grep sendspinThen adjust the SENDSPIN_USER environment variable accordingly.
The script follows a simple architecture:
- Configuration Loading: Reads hosts from
hosts.conf - SSH Execution: Uses SSH with public key auth to run commands remotely
- Command Dispatch: Routes to appropriate handler based on subcommand
- Error Handling: Gracefully handles connection failures and reports errors
- TUI Output: Uses bash-tui-toolkit for colored, formatted output
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is provided as-is for managing sendspin-cli deployments.
- Uses bash-tui-toolkit for terminal UI
- Designed for sendspin audio player system