gosh
A fast, modern download manager CLI with HTTP/HTTPS multi-connection acceleration and full BitTorrent protocol support. Powered by gosh-dl.
Features
- HTTP/HTTPS Downloads: Multi-connection segmented downloads (up to 16 parallel connections), automatic resume, checksum verification
- BitTorrent: Full protocol support with DHT, PEX, magnet links, encryption, and WebSeeds
- Three Usage Modes: Interactive TUI, direct aria2-style CLI, and scriptable commands
- Cross-Platform: Linux, macOS, and Windows support
Installation
From Source
From Crates.io
Pre-built Binaries
Download from GitHub Releases.
Linux builds: Statically linked with musl for maximum portability across all distributions (including Alpine).
Usage Modes
gosh supports three distinct usage patterns:
1. Interactive TUI Mode
Launch without arguments to enter the full-screen terminal UI:
TUI Keyboard Shortcuts:
| Key | Action |
|---|---|
a |
Add new download |
p |
Pause selected |
r |
Resume selected |
c |
Cancel selected |
d |
Cancel and delete files |
1 |
View all downloads |
2 |
View active only |
3 |
View completed only |
j/k or arrows |
Navigate |
? |
Show help |
q or Ctrl+C |
Quit |
2. Direct Download Mode (aria2-style)
Pass URLs directly to download immediately with progress bars:
# Single download
# Multiple parallel downloads
# With options
# Torrent/Magnet
3. Command Mode
Use subcommands for scriptable operations:
Direct Download Options
When using direct download mode (gosh URL), the following options are available:
| Option | Description |
|---|---|
-d, --dir <PATH> |
Output directory |
-o, --out <NAME> |
Output filename (single download only) |
-H, --header <HEADER> |
Custom header (format: "Name: Value") |
--user-agent <UA> |
User agent string |
--referer <URL> |
Referer URL |
--cookie <COOKIE> |
Cookie (format: "name=value") |
--checksum <HASH> |
Expected checksum (format: "md5:xxx" or "sha256:xxx") |
-x, --max-connections <N> |
Max connections per download |
--max-speed <SPEED> |
Max download speed (supports K/M/G suffixes) |
--sequential |
Sequential download mode (for torrents) |
--select-files <INDICES> |
Select specific files (comma-separated indices) |
--seed-ratio <RATIO> |
Seed ratio limit for torrents |
Examples:
# Download with custom headers and user agent
# Download with checksum verification
# Limit download speed to 5 MB/s with 8 connections
# Download specific files from a torrent
# Sequential download for streaming
Commands Reference
gosh add
Add a new download to the queue.
)
)
)
)
)
)
gosh list
List all downloads.
gosh status
Show detailed status of a download.
)
)
gosh pause
Pause one or more downloads.
gosh resume
Resume paused downloads.
gosh cancel
Cancel and optionally delete downloads.
gosh priority
Set download priority.
gosh stats
Show global download/upload statistics.
Output:
Global Statistics
=================
Downloads:
Active: 2
Waiting: 5
Stopped: 10
Total: 17
Speed:
Download: 5.2 MB/s
Upload: 1.1 MB/s
gosh info
Parse and display torrent file information.
gosh config
Manage configuration.
Global Options
These options can be used with any command:
| Option | Description |
|---|---|
-c, --config <PATH> |
Config file path |
-v, --verbose |
Increase verbosity (-v, -vv, -vvv) |
-q, --quiet |
Suppress output except errors |
--output <FORMAT> |
Output format [table, json, json-pretty] |
Configuration
Configuration file location: ~/.config/gosh/config.toml
[]
= "~/Downloads"
= "warn"
[]
= 5
= 16
= 0 # 0 = unlimited
= 0
# BitTorrent settings
= true
= true
= true
= 55
= 1.0
# HTTP settings
= "gosh/0.1"
= 30
= 60
[]
= 250
= "dark" # or "light"
= true
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success (all downloads completed) |
| 1 | Partial failure (some downloads failed) |
| 2 | Total failure (all downloads failed) |
| 130 | Interrupted (Ctrl+C) |
Comparison with aria2
gosh provides aria2-style command-line usage while offering a native Rust implementation:
| Feature | aria2c | gosh |
|---|---|---|
| Direct download | aria2c URL |
gosh URL |
| Output directory | -d /path |
-d /path |
| Max connections | -x 8 |
-x 8 |
| Custom headers | --header "..." |
-H "..." |
| Interactive mode | N/A | gosh (TUI) |
| Background daemon | aria2c --enable-rpc |
Coming soon |
Examples
Download a File
# Simple download
# Download to specific directory
# Download with custom filename
Batch Downloads
# Multiple URLs
# From file
# Pipe from stdin
|
BitTorrent
# Magnet link
# Torrent file
# Select specific files
# Sequential for streaming
Scripting
# JSON output for parsing
|
# Check download status
if | ; then
fi
# Monitor progress
Building from Source
# Development build
# Release build
# Run tests
# Run with verbose logging
RUST_LOG=debug
Requirements
- Rust 1.75+ (for async trait support)
- Linux, macOS, or Windows
License
MIT License - see LICENSE for details.
Related Projects
- gosh-dl - The underlying download engine library
- docs.rs/gosh-dl-cli - API documentation