Skip to content

Inspect and manage downloads

surge ls can inspect the local download database when Surge is not running, though a running server is needed for live progress. Commands that change the queue (pause, resume, refresh, limit, and rm) require a running server. Use surge ls first to find a download ID; an unambiguous ID prefix is accepted where an ID is required.

List all downloads:

Terminal window
surge ls

Show details for one download:

Terminal window
surge ls ab12

Use JSON when a script needs structured output, or watch the queue in a terminal:

Terminal window
surge ls --json
surge ls --watch

l is an alias for ls.

Pause one download:

Terminal window
surge pause ab12

Pause all downloads:

Terminal window
surge pause --all

Resume a paused download:

Terminal window
surge resume ab12

Resume every paused download:

Terminal window
surge resume --all

Refresh replaces the source URL of a paused or failed download. This is useful when a signed URL has expired or the original link no longer works.

Terminal window
surge refresh ab12 https://example.com/new-signed-url
surge resume ab12

The download must be paused or in an error state before it can be refreshed.

Set a cap for one download:

Terminal window
surge limit ab12 2MB/s

Set a global cap for the active queue:

Terminal window
surge limit --global 10MB/s

Set the default cap for new downloads:

Terminal window
surge limit --default 2MB/s

Use 0 to make an individual download unlimited. Use -1 to make it inherit the default per-download limit.

Remove one record from Surge’s queue without deleting the downloaded file:

Terminal window
surge rm ab12

Clean up completed or failed records:

Terminal window
surge rm --clean
surge rm --clean-failed

[!WARNING] surge rm ab12 --purge also deletes the corresponding file or files from disk. kill is an alias for rm; it has the same behavior.

Prefix any command with the target server and token:

Terminal window
surge --host https://192.168.1.10:1700 --token "$SURGE_TOKEN" pause ab12

See remote connections for TLS and token handling.