ls command displays all downloads or detailed information about a specific download by ID.
Usage
Aliases
l
Description
Lists downloads from the running server or local database. The command:- Shows a table view of all downloads with status, progress, and speed
- Can display detailed information for a single download by ID
- Supports JSON output for scripting and automation
- Can watch and refresh the list in real-time
- Falls back to database when no server is running
Arguments
Download ID (full or partial) to show detailed information. If omitted, lists all downloads.Example:You can use partial IDs - Surge will resolve to the full ID:
Flags
Output in JSON format for parsing by scripts and tools.Example:
Watch mode: continuously refresh the list every second. Press Ctrl+C to exit.Example:
Examples
List All Downloads
Show Download Details
Using full ID:JSON Output
List all downloads:Watch Mode
Continuously monitor downloads:Using Alias
Output Fields
Table View
| Column | Description |
|---|---|
| ID | First 8 characters of download UUID |
| FILENAME | Download filename (truncated to 25 chars) |
| STATUS | Current status (active, paused, completed, error, queued) |
| PROGRESS | Download progress percentage |
| SPEED | Current download speed (only shown for active downloads) |
| SIZE | Total file size in human-readable format |
Detail View
| Field | Description |
|---|---|
| ID | Full download UUID |
| URL | Source URL |
| Filename | Full filename |
| Status | Current status |
| Progress | Percentage complete |
| Downloaded | Downloaded bytes / Total bytes |
| Speed | Current speed (active downloads only) |
| Error | Error message (if status is error) |
Status Values
- active - Currently downloading
- queued - Waiting to start
- paused - Manually paused
- completed - Download finished successfully
- error - Download failed with error
Data Sources
Priority
- Running Server - If a Surge server is detected, fetches live data via API
- Database - Falls back to local database if no server is running
Remote Servers
When using--host, only queries the remote server:
If
--host is specified but the connection fails, the command will not fall back to the local database.Scripting Examples
Parse JSON with jq
Get all completed downloads:Monitor Specific Download
Watch a specific download until complete:Related Commands
- surge add - Add new downloads
- surge pause - Pause downloads
- surge resume - Resume downloads
- surge rm - Remove downloads