Command-line interface for Sunshine, the rescoot scooter management platform.
# From source
go install github.com/rescoot/sunshine-cli@latest
# Or build locally
git clone git@github.com:rescoot/sunshine-cli.git
cd sunshine-cli
make buildPre-built binaries for Linux, macOS, and Windows are available on the releases page.
The CLI uses OAuth2 with PKCE to authenticate against your Sunshine instance:
sunshine auth login # Opens browser for OAuth flow
sunshine auth status # Show current auth state
sunshine auth logout # Clear stored credentialsTokens are stored in ~/.config/sunshine/tokens.json.
sunshine config # Show current config
sunshine config set server https://... # Set server URL
sunshine config set default_scooter 3 # Set default scooter
sunshine config path # Print config file locationConfig file: ~/.config/sunshine/config.yaml. Override per-command with --server and --scooter flags.
The scooter is resolved in order:
--scooterflagdefault_scooterfrom config- Auto-detect (if you have exactly one scooter)
# Scooter status (full telemetry: batteries, engine, GPS, connectivity, system, power)
sunshine status
# List scooters
sunshine scooters list [--limit 20] [--offset 0]
sunshine scooters show
# Control commands
sunshine lock
sunshine unlock
sunshine honk
sunshine blinkers <left|right|both|off>
sunshine seatbox
sunshine ping
sunshine state # Request telemetry refresh
sunshine locate
sunshine hibernate
# Alarm system
sunshine alarm # Show alarm state
sunshine alarm arm # Arm alarm
sunshine alarm disarm # Disarm alarm
sunshine alarm trigger [--duration 5s] # Sound alarm
sunshine alarm stop # Silence active alarm
# Navigation
sunshine navigate <lat> <lng> [title] # Set destination
sunshine navigate show # Show current destination
sunshine navigate clear # Clear destination
# Trips
sunshine trips list [--limit 20] [--offset 0]
sunshine trips show <trip-id>All commands accept --json for machine-readable output.
sunshine api /scooters # GET
sunshine api /scooters/3 # GET with path
sunshine api /scooters/3/trips?limit=5 # GET with query params
sunshine api /scooters/3/lock -X POST # POST
sunshine api /scooters/3/blinkers -d '{"state":"left"}' # POST with JSON body
sunshine api /scooters/3/alarm -X POST -d '{"duration":"10s"}'Paths are relative to /api/v1/. Method defaults to GET, or POST when -d is given.
make man # Generate man pages to man/
make install-man # Install to system man path
man sunshine # View main man page