mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 09:06:14 +00:00
Introduces a standalone `soundtouch-backup` CLI with three subcommands: - `all`: authenticates with the Bose cloud, backs up account data, then reads device IPs from devices.xml and backs up each reachable speaker - `cloud`: fetches account profile, devices, sources, presets, and full endpoint from streaming.bose.com - `local`: backs up each speaker via HTTP API (12 endpoints) and optionally via SSH (individual files + /opt/Bose/etc/ and /mnt/nv/BoseApp-Persistence/1/ directories) Also centralises pkg/service/ssh → pkg/ssh so both the service and the backup tool share the same SSH client; adds ReadFile and ReadDir methods, and handles the firmware quirk where cat exits 1 on empty files. Output is a single dated .tar.gz or .zip archive. Example flow: ```shell gesellix@Mac Bose-SoundTouch % go run ./cmd/soundtouch-backup all --output _/cloud-backup --email user@example.com Password: Authenticating as user@example.com... ✓ Authenticated (account ID: 1234567) ✓ email address (107 bytes) ✓ devices (1492 bytes) ✓ sources (1111 bytes) ✓ presets (2585 bytes) ✓ full account (55037 bytes) Found 2 device(s) in cloud account, attempting local backup... ✓ ST20: 12 files via HTTP ⚠ ST20: SSH skipped /etc/remote_services (Process exited with status 1) ⚠ ST20: SSH empty file /mnt/nv/remote_services ✓ ST20: 64 files via SSH ✓ ST10: 12 files via HTTP ⚠ ST10: SSH empty file /etc/remote_services ⚠ ST10: SSH skipped /mnt/nv/remote_services (Process exited with status 1) ✓ ST10: 48 files via SSH Archive written: _/cloud-backup/soundtouch-backup-2026-05-02.tar.gz (141 files) ``` --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
939 B
AMPL
31 lines
939 B
AMPL
module github.com/gesellix/bose-soundtouch
|
|
|
|
go 1.26.2
|
|
|
|
require (
|
|
github.com/go-chi/chi/v5 v5.2.5
|
|
github.com/google/gopacket v1.1.19
|
|
github.com/gorilla/websocket v1.5.3
|
|
github.com/hashicorp/mdns v1.0.6
|
|
github.com/miekg/dns v1.1.72
|
|
github.com/russross/blackfriday/v2 v2.1.0
|
|
github.com/sergi/go-diff v1.4.0
|
|
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c
|
|
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef
|
|
github.com/urfave/cli/v2 v2.27.7
|
|
golang.org/x/crypto v0.50.0
|
|
golang.org/x/term v0.42.0
|
|
)
|
|
|
|
require (
|
|
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
|
|
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
|
|
golang.org/x/image v0.39.0 // indirect
|
|
golang.org/x/mod v0.35.0 // indirect
|
|
golang.org/x/net v0.53.0 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/sys v0.43.0 // indirect
|
|
golang.org/x/text v0.36.0 // indirect
|
|
golang.org/x/tools v0.44.0 // indirect
|
|
)
|