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, package counts during upgrades
- Status Monitoring: Check service status, version, and configured name across all hosts
- System Updates: Update system packages via
apton all hosts with per-package progress - 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)
The script is a single self-contained file — just copy it to any directory in your $PATH:
# Download and install
curl -sL https://raw.githubusercontent.com/trisweb/sendspin-fleet/main/sendspin-fleet \
-o ~/.local/bin/sendspin-fleet
chmod +x ~/.local/bin/sendspin-fleetOr clone and symlink:
git clone https://github.com/trisweb/sendspin-fleet
ln -s "$(pwd)/sendspin-fleet/sendspin-fleet" ~/.local/bin/sendspin-fleetThe script looks for hosts in ~/.config/sendspin-fleet-hosts.conf by default. Create this file to get started:
mkdir -p ~/.config
cp hosts.conf.example ~/.config/sendspin-fleet-hosts.conf
# Edit with your actual hosts
$EDITOR ~/.config/sendspin-fleet-hosts.confFormat: hostname:ssh_user (one per line):
# Production audio players
player1.local:root
player2.local:root
192.168.1.100:admin
# Development hosts
dev-player.local:myuser
audio-endpoint-01:sendspin
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)
Override defaults as needed:
| Variable | Default | Description |
|---|---|---|
HOSTS_FILE |
~/.config/sendspin-fleet-hosts.conf |
Path to hosts configuration file |
SENDSPIN_USER |
sendspin |
Service user name on remote hosts |
# Use a different hosts file
HOSTS_FILE=~/my-other-fleet.conf sendspin-fleet status
# Use a different service user
SENDSPIN_USER=audioplayer sendspin-fleet update-sendspinsendspin-fleet <command>Check the live status of all hosts in parallel:
- SSH connectivity
- Service status (running/stopped/failed)
- Sendspin version
- Configured device name from settings
sendspin-fleet statusWhile 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:
✔ player1.local: ✔ Kitchen Speaker | 0.2.1 | active
✔ player2.local: ✔ Living Room | 0.2.1 | active
✔ player3.local: ✔ Bedroom | 0.2.1 | active
✔ All operations completed successfully
Update system packages on all hosts in parallel with live per-package progress:
sendspin-fleet update-systemProgress display during upgrade:
⠋ player1.local: Upgrading packages: 7/15
⠙ player2.local: Upgrading packages: 3/8
✔ player3.local: Upgraded 12 packages
Update sendspin-cli via uv on all hosts in parallel:
sendspin-fleet update-sendspinShows per-host progress through upgrade and service restart.
Full update: system packages followed by sendspin, both in parallel:
sendspin-fleet update-allsendspin-fleet helpFor passwordless SSH authentication on each target host:
# Generate a key if needed
ssh-keygen -t ed25519 -C "sendspin-fleet"
# Copy to each host
ssh-copy-id user@hostname
# Verify
ssh user@hostname echo "OK"Create the config file:
mkdir -p ~/.config
cp hosts.conf.example ~/.config/sendspin-fleet-hosts.confOr set HOSTS_FILE to an existing file.
- Check reachability:
ping hostname - Test SSH directly:
ssh user@hostname - Ensure the user in your config matches the one with SSH key access
Verify the service name on the remote host:
ssh user@hostname systemctl list-units --type=service | grep sendspin- Configuration Loading: Reads hosts from
~/.config/sendspin-fleet-hosts.conf - Parallel Fork: Spawns one background process per host
- Status Tracking: Workers write status updates to temp files
- TUI Display Loop: Main process redraws host lines at 10Hz using ANSI cursor control
- Progress Streaming: For apt upgrades, output is streamed and parsed for package counts
- Process Management: Waits for all jobs, reports overall success/failure
With N hosts each taking T seconds:
- Sequential: N × T seconds
- Parallel (this tool): ~T seconds
Designed for sendspin audio player system.