- Автор
- SurgeDM
- Размер
- 44.8 MB
- Звёзды
- 3.6K
- Обновлён
- КоммитNov 17Релизv0.12.4Oct 31
- Возраст
- 1 г
- Коммиты · 90 дней
README проекта с github.com/SurgeDM/Surge. Одним файлом markdown: README.md.
Blazing fast TUI download manager built in Go for power users
Documentation • Installation • Usage • Themes • Fonts • Benchmarks • Extension • Settings • CLI Reference
Surge is designed for power users who prefer a keyboard-driven workflow. It features a beautiful Terminal User Interface (TUI), as well as a background Headless Server and a CLI tool for automation.

Most browsers open a single connection for a download. Surge opens multiple (up to 16 by default), splits the file, and downloads chunks in parallel. But we take it a step further:
For a deep dive into how we make downloads faster (like work stealing and slow worker handling), check out our Optimization Guide.
We are just two CS students building Surge in between classes and exams. We love working on this, but maintaining a project of this scale takes time and resources. That's where you come in!
If Surge saves you time, consider supporting the development! Donations go directly toward:
Totally optional-your stars, issues, and contributions already mean the world to us! :)
Surge is available on multiple platforms. Choose the method that works best for you.
| Platform / Method | Command / Instructions | Notes |
|---|---|---|
| Prebuilt Binary | Download from Releases | Easiest method. Just download and run. |
| FreeBSD | Download from Releases | Extract the freebsd archive for your architecture and run surge. User service management and power actions are unavailable. |
| macOS / Linux (Install Script) | curl -fsSL https://surgedm.github.io/install | sh |
Verifies the release checksum and installs to ~/.local/bin. Run again to update. Script options. |
| Linux AppImage | Download from Releases | Run chmod +x Surge_..._linux_x86_64.AppImage, then ./Surge_..._linux_x86_64.AppImage. Supports delta updates. |
| Arch Linux (AUR) | yay -S surge |
Managed via AUR. |
| macOS / Linux (Homebrew) | brew install SurgeDM/tap/surge |
Recommended for Mac/Linux users. |
| Nix / NixOS | nix profile install --refresh github:SurgeDM/Surge |
Installs the official release and adds surge to your Nix profile. Nix instructions. |
| Windows | winget install surge-downloader.surgeor scoop install surgeor choco install surge |
Recommended for Windows users. |
| Dockerfile | See instructions | Run Surge in server mode with Docker Compose |
| Go Install | go install github.com/SurgeDM/Surge@latest |
Requires Go 1.25+ |
Surge has two main modes: TUI (Interactive) and Server (Headless).
For a full reference, see the customization guide, Settings & Configuration Guide and the CLI reference.
Just run surge to enter the dashboard. This is where you can visualize progress, manage the queue, and see speed graphs. If you encounter any issues, press ? to open the bug reporting wizard. You can also press Shift + A or use your terminal's paste shortcut to automatically parse a copied browser 'cURL' command straight into a new download.
# Start the TUI
surge
# Start the TUI without the local HTTP API server
surge --no-server
# Start TUI with downloads queued
surge https://example.com/file1.zip https://example.com/file2.zip
# Combine URLs and batch file
surge https://example.com/file.zip --batch urls.txt
--no-server keeps the TUI fully local and skips the embedded HTTP API. CLI control commands such as surge add, surge pause, and browser-extension requests will not be able to target that instance.
The All tab (0) shows downloads in every state. The existing Queued (q), Active (w), and Done (e) tabs keep their filters. Tab/Shift+Tab cycle through all four tabs, and search, category filters, and tab pinning work in All too.
Great for servers, Raspberry Pis, or background processes.
# Start the server
surge server
# Start the server with a download
surge server https://url.com/file.zip
# Start with explicit API token
surge server --token <token>
Surge can run as a service owned by the current user. It uses the same settings, download database, category paths, and API token as that user's CLI and TUI.
# Install and immediately start the user service
surge service install
# Manage the service
surge service start
surge service stop
surge service restart
surge service status
# Uninstall the service
surge service uninstall
[!NOTE] [!IMPORTANT] Run these commands as your normal user, without
sudoor an Administrator terminal. Surge refuses to install a user service as root. The service starts with your login session; see the service guide for platform details and legacy system-service migration.
surge and surge server bind the HTTP API to 0.0.0.0 (all interfaces) by default.
This means the server is accessible via localhost (127.0.0.1) as well as your local network IP.
To accept connections from this machine only, run surge config Network.bind_host 127.0.0.1 and restart Surge.
The API is token-protected. Generate/read your token by running:
# Get the current user's token (the service uses the same token)
surge token
Alternatively, you can find it in the TUI under Settings > Extension.
Connect to a running Surge daemon (local or remote).
# Connect to local server (auto-detected)
surge connect
# Connect to a remote daemon
surge connect 192.168.1.10:1700 --token <token>
# Equivalent global-flag form
surge --host 192.168.1.10:1700 --token <token>
By default, surge connect uses:
http:// for loopback and private IP targetshttps:// for public/hostname targetsThese global flags are available on all commands:
--host <host:port>: target server for TUI and CLI operations.--token <token>: bearer token for authentication.Environment variable fallbacks:
SURGE_HOSTSURGE_TOKENDownload the compose file and start the container:
wget https://raw.githubusercontent.com/SurgeDM/Surge/refs/heads/main/docker/compose.yml
docker compose up -d
Get the API token:
docker compose exec surge surge token
Save this token - you'll need it to authenticate API requests and connect remotely.
Check downloads/API availability:
docker compose exec surge surge ls
View logs:
docker compose logs -f surge
Surge ships a bundled Nerd Font for the TUI, but your terminal controls the actual font selection. See the customization guide for install steps and licensing details.
We tested Surge against standard tools. Because of our connection optimization logic, Surge significantly outperforms single-connection tools.
| Tool | Time | Speed | Comparison |
|---|---|---|---|
| Surge | 28.93s | 35.40 MB/s | - |
| aria2c | 40.04s | 25.57 MB/s | 1.38× slower |
| curl | 57.57s | 17.79 MB/s | 1.99× slower |
| wget | 61.81s | 16.57 MB/s | 2.14× slower |
Test details: 1GB file, Windows 11, Ryzen 5 5600X, 360 Mbps Network. Results averaged over 5 runs.
We would love to see you benchmark Surge on your system!
To compare fixed and adaptive concurrency under deterministic throttling, run:
go test ./internal/strategy/concurrent -run '^$' -bench BenchmarkThrottle -benchtime=1x -count=5
The native Go benchmark runs persistent-overload and burst-recovery workloads with both policies and reports elapsed time, request amplification, throttled requests, and peak accepted concurrency.
The Surge extension intercepts browser downloads and sends them straight to your terminal. It communicates with the Surge client on port 1700 by default.
[!IMPORTANT] An Auth Token is required to connect the extension to your Surge server. This can be obtained from the TUI under Settings > Extension, or by running
surge tokenas the user who runs Surge.
extension-chrome.zip from the latest GitHub release.chrome://extensions.extension-chrome folder.extension-firefox.zip from the latest GitHub release.about:debugging#/runtime/this-firefox.manifest.json).Huge thanks to the teams and sponsors helping us build and ship Surge:
We love community contributions! Whether it's a bug fix, a new feature, or just cleaning up typos. PRs are always welcome. For a quick guide, see CONTRIBUTING.md.
For internal TUI visual checks, run ./scripts/visual-test.sh. The fixture uses the production TUI and is compiled only into a temporary test binary. See Visual testing.
You can check out the Discussions for any questions or ideas, or follow us on X (Twitter)!
Distributed under the MIT License. See LICENSE for more information.