Skip to content

CLI Commands

Use built-in help for command syntax:

Terminal window
unleash-stream-cli --help
Terminal window
unleash-stream-cli COMMAND --help

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.

Terminal window
unleash-stream-cli add SOURCE [OPTIONS]

Arguments:

ArgumentDescription
SOURCESource URL or file path (required)

Options:

OptionShortDescription
--destination-url URL-DFull Unleash live destination stream URL (alternative to -d and -t)
--device DEVICE_ID-dUnleash live device ID (e.g., W123a4b5678c9de0)
--token TOKEN-tStream authorization token (e.g., fluffy-black-dog-11)
--name NAME-nDisplay name for this stream (defaults to device ID)
--timeout SECSSource connection timeout (default: 30)
--max-retries NMaximum retry attempts (omit for unlimited)
--continuous-CRestart on any exit (including clean exits) until manually stopped

Source Examples:

Terminal window
# RTSP camera
unleash-stream-cli add 'rtsp://user:pass@192.168.1.100:554/stream' -D 'rtmp://stream.unleashlive.com/rtmp/W123?token=abc'
# RTMP source
unleash-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 file
unleash-stream-cli add '/home/user/video/recording.mp4' -D 'rtmp://stream.unleashlive.com/rtmp/W321?token=jkl'
# With a display name and continuous mode
unleash-stream-cli add 'rtsp://cam/stream' -D 'rtmp://stream.unleashlive.com/rtmp/W654?token=mno' -n 'Main Entrance' -C
# Using device ID and token separately
unleash-stream-cli add 'rtsp://cam/stream' -d W123a4b5678c9de0 -t fluffy-black-dog-11

Add periodic snapshot capture.

Terminal window
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:

OptionShortDescription
--device DEVICE_ID-dUnleash live device ID (required)
--api-key API_KEY-aUnleash live API key (required)
--interval SECS-iCapture interval in seconds (default: 60)
--name NAME-nDisplay name (defaults to device ID)
--timeout SECSConnection timeout (default: 30)

Examples:

Terminal window
# macOS local camera, every 60 seconds
unleash-stream-cli add-snapshot '0' -d W123abc -a YOUR_API_KEY -i 60
# Linux local camera
unleash-stream-cli add-snapshot '/dev/video0' -d W123abc -a YOUR_API_KEY -i 120
# RTSP camera
unleash-stream-cli add-snapshot 'rtsp://user:pass@192.168.1.100/stream' -d W123abc -a YOUR_API_KEY -i 30

List managed streams and snapshots.

Terminal window
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.

Terminal window
unleash-stream-cli start DEVICE_ID
Terminal window
unleash-stream-cli start --all

Stops a running stream by sending SIGKILL to the FFmpeg process. The stream stays in the list and can be restarted with start.

Terminal window
unleash-stream-cli stop DEVICE_ID
Terminal window
unleash-stream-cli stop --all
Terminal window
unleash-stream-cli stop DEVICE_ID --snapshot # Stop a snapshot capture

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.

Terminal window
unleash-stream-cli remove DEVICE_ID
Terminal window
unleash-stream-cli remove --all
Terminal window
unleash-stream-cli remove DEVICE_ID --snapshot

Views stream logs.

Show logs for all streams

Terminal window
unleash-stream-cli logs

Filter by device ID or name

Terminal window
unleash-stream-cli logs DEVICE_OR_NAME

Follow log output in real-time

Terminal window
unleash-stream-cli logs -f

Lists available video and audio capture devices (AVFoundation on macOS, v4l2 on Linux).

Terminal window
unleash-stream-cli local-devices

Manage or inspect the CLI service.

Start the background service

Terminal window
unleash-stream-cli service start

Show CLI and service version

Terminal window
unleash-stream-cli service version

The service is managed by the host OS service manager (launchd, systemd, or procd) and typically does not require manual start.