Quick Reference
surge
Launch TUI or queue downloads
add
Add downloads to queue
ls
List all downloads
pause
Pause active downloads
resume
Resume paused downloads
rm
Remove downloads
refresh
Update download URL
server
Manage headless server
connect
Connect to remote server
token
Display API token
Global Flags
These flags are available for all commands:Server host to connect/control. Can also be set via
SURGE_HOST environment variable.Example: 127.0.0.1:1700Bearer token for API authentication. Can also be set via
SURGE_TOKEN environment variable.Enable verbose logging output.Short form:
-vEnvironment Variables
| Variable | Description |
|---|---|
SURGE_HOST | Default server host when --host is not provided |
SURGE_TOKEN | Default authentication token when --token is not provided |
Command Categories
Core Commands
- surge - Main command for launching the TUI interface
- add - Queue new downloads from command line
- ls - List and inspect downloads
Control Commands
- pause - Pause active or queued downloads
- resume - Resume paused downloads
- rm - Remove downloads from queue
- refresh - Update URL for paused/errored downloads
Server Management
- server - Run Surge in headless mode
- connect - Connect TUI to remote daemon
- token - Retrieve API authentication token
Usage Patterns
Local Mode
Run Surge locally with TUI:Headless Mode
Start a background server:Remote Mode
Connect to a remote Surge instance:Most commands automatically detect if a Surge instance is running and connect to it. Use
--host to explicitly target a specific server.