CLI Commands
Use built-in help for command syntax:
unleash-stream-cli --helpunleash-stream-cli COMMAND --helpCommand Reference
Section titled “Command Reference”For runtime semantics (retry behavior, continuous mode, persistence, and log retention), see Behavior Details.
Add a stream, start it immediately, and persist it for restoration on service restart.
unleash-stream-cli add SOURCE [OPTIONS]Arguments:
| Argument | Description |
|---|---|
SOURCE | Source URL or file path (required) |
Options:
| Option | Short | Description |
|---|---|---|
--destination-url URL | -D | Full Unleash live destination stream URL (alternative to -d and -t) |
--device DEVICE_ID | -d | Unleash live device ID (e.g., W123a4b5678c9de0) |
--token TOKEN | -t | Stream authorization token (e.g., fluffy-black-dog-11) |
--name NAME | -n | Display name for this stream (defaults to device ID) |
--timeout SECS | Source connection timeout (default: 30) | |
--max-retries N | Maximum retry attempts (omit for unlimited) | |
--continuous | -C | Restart on any exit (including clean exits) until manually stopped |
Source Examples:
# RTSP cameraunleash-stream-cli add 'rtsp://user:pass@192.168.1.100:554/stream' -D 'rtmp://stream.unleashlive.com/rtmp/W123?token=abc'
# RTMP sourceunleash-stream-cli add 'rtmp://192.168.0.1:1935/main' -D 'rtmp://stream.unleashlive.com/rtmp/W456?token=def'
# HTTP stream (m3u8 playlist)unleash-stream-cli add 'http://cams.remote.com/cdn/chunks.m3u8' -D 'rtmp://stream.unleashlive.com/rtmp/W789?token=ghi'
# Local video fileunleash-stream-cli add '/home/user/video/recording.mp4' -D 'rtmp://stream.unleashlive.com/rtmp/W321?token=jkl'
# With a display name and continuous modeunleash-stream-cli add 'rtsp://cam/stream' -D 'rtmp://stream.unleashlive.com/rtmp/W654?token=mno' -n 'Main Entrance' -C
# Using device ID and token separatelyunleash-stream-cli add 'rtsp://cam/stream' -d W123a4b5678c9de0 -t fluffy-black-dog-11add-snapshot
Section titled “add-snapshot”Add periodic snapshot capture.
unleash-stream-cli add-snapshot SOURCE --device DEVICE_ID --api-key API_KEY [OPTIONS]Captures a still image from the source at regular intervals and uploads it to Unleash live via API.
Options:
| Option | Short | Description |
|---|---|---|
--device DEVICE_ID | -d | Unleash live device ID (required) |
--api-key API_KEY | -a | Unleash live API key (required) |
--interval SECS | -i | Capture interval in seconds (default: 60) |
--name NAME | -n | Display name (defaults to device ID) |
--timeout SECS | Connection timeout (default: 30) |
Examples:
# macOS local camera, every 60 secondsunleash-stream-cli add-snapshot '0' -d W123abc -a YOUR_API_KEY -i 60
# Linux local cameraunleash-stream-cli add-snapshot '/dev/video0' -d W123abc -a YOUR_API_KEY -i 120
# RTSP cameraunleash-stream-cli add-snapshot 'rtsp://user:pass@192.168.1.100/stream' -d W123abc -a YOUR_API_KEY -i 30List managed streams and snapshots.
unleash-stream-cli list [-v]Shows all managed streams and snapshots with their status.
Output includes:
- Stream name, source, destination, and current status
Visual indicators:
🎥live stream source📼local file source📷snapshot capture🔄continuous mode (-C)
Status values:
running(green)stopped(yellow)failed(red)
Verbose output:
Use -v / --verbose for extended metadata in the CLI output (retry count, all log files, etc.).
Starts a previously stopped or failed stream. Resets the retry counter.
unleash-stream-cli start DEVICE_IDunleash-stream-cli start --allStops a running stream by sending SIGKILL to the FFmpeg process. The stream stays in the list and can be restarted with start.
unleash-stream-cli stop DEVICE_IDunleash-stream-cli stop --allunleash-stream-cli stop DEVICE_ID --snapshot # Stop a snapshot captureremove
Section titled “remove”Removes a stream from the managed list. Auto-stops if currently running. Also removes it from persistence so it is not restored after service restart.
unleash-stream-cli remove DEVICE_IDunleash-stream-cli remove --allunleash-stream-cli remove DEVICE_ID --snapshotViews stream logs.
Show logs for all streams
unleash-stream-cli logsFilter by device ID or name
unleash-stream-cli logs DEVICE_OR_NAMEFollow log output in real-time
unleash-stream-cli logs -flocal-devices
Section titled “local-devices”Lists available video and audio capture devices (AVFoundation on macOS, v4l2 on Linux).
unleash-stream-cli local-devicesservice
Section titled “service”Manage or inspect the CLI service.
Start the background service
unleash-stream-cli service startShow CLI and service version
unleash-stream-cli service versionThe service is managed by the host OS service manager (launchd, systemd, or procd) and typically does not require manual start.