xget 0.1.1

xget: fast multi-connection download manager for the terminal: segmented Range downloads, queue, torrents, and curl-like requests.
# xget

[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE)

> Grab it fast, resume it later.

> Not affiliated with any other `xget` applications, nor is this `xget` a fork of any kind. An original project.

`xget` is a download manager for the terminal built in Rust. It pulls files over HTTP with segmented Range downloads, queues batches, handles torrents in process, streams HLS/DASH playlists to single files, builds .torrent files, talks WebDAV, refreshes expiring links, and works as a curl replacement for quick requests. A background daemon can own the queue so downloads survive closed terminals.

`xget guide` lists short topic pages with examples.

## Features

- Smart mode select: throttle probe picks single stream or segmented xN automatically
- Mirrors per segment: fastest source wins, bad sizes drop silently, auto mirrors for known hosts
- Proxy support: `--proxy` on add/queue/resume/hls for HTTP and trackers
- Queue with configurable concurrency, clashing names become name.1, name.2
- Pause and resume with sidecars, blake3 verified delta resume on re-add
- Daemon mode: `xget daemon start` keeps downloads running, CLI talks to it when active
- Torrents in process: magnet and .torrent, no separate daemon needed, file select and seed timer
- Torrent creation: `xget mktorrent` builds .torrent from file or dir
- HLS/DASH: `xget hls` pulls playlists to single .ts/.mp4, encrypted inputs rejected cleanly
- WebDAV: `webdav://` and `webdavs://` download and mirror like plain HTTP
- `req` subcommand with curl parity for methods, headers, bodies, cookies, proxy
- Link refresh: revisits the source page on 403/410/expired and continues with Range
- Captcha handoff: solve in the browser, xget takes over cookies and keeps going
- Browser hook: extension pushes links into the queue through `serve`
- Extras: `verify`, `split`/`join`, recursive `mirror`, `serve` with Range, tcp tuning hint
- Guides built in: `xget guide <quickstart|modes|mirrors|queue|resume|config|torrent|curl|refresh|hook|captcha|hls|daemon>`

## Requirements

- Rust 1.85+ to build
- Linux, macOS or Windows with a terminal
- Optional: Firefox or Chrome profile for captcha cookie handoff

## Installation

```bash
# From crates.io
cargo install xget

# Local
git clone https://github.com/JustRoccat/xget
cd xget
cargo install --path .

# Build only
cargo build --release
./target/release/xget --help
```

Release profile uses LTO and stripped symbols, the binary is about 9 MB.

## Usage

```bash
xget add https://example.com/file.iso -o /tmp/
xget add https://example.com/file.iso -c 16
xget add https://example.com/file.iso -x socks5://127.0.0.1:1080
xget list
xget pause 3
xget resume 3
xget status 3
xget queue URL1 URL2 -o ~/Downloads --concurrent 2
xget req https://example.com/f.bin -o f.bin -L -v
xget verify file.iso --sha256
```

Torrents, expiring links and captcha:

```bash
xget add "magnet:?xt=urn:btih:..." -o /tmp/ --seed 60
xget mktorrent ./mydir --trackers udp://tracker.opentrackr.org:1337/announce
xget add <FILE-URL> --referer <PAGE-URL> --cookies 'session=abc'
xget add <FILE-URL> --referer <PAGE-URL> --captcha auto
```

Playlists and daemon:

```bash
xget hls https://example.com/play.m3u8 -o video.ts
xget hls https://example.com/manifest.mpd -o video.mp4
xget daemon start
xget daemon status
xget daemon stop
```

WebDAV:

```bash
xget add webdav://host/files/a.bin -o /tmp/
xget mirror -r webdav://host/files/ -o /tmp/wd
```

Full flags per command: `xget <COMMAND> --help`.

## Works on

Anywhere Rust builds: Linux tested, macOS and Windows should work. Static musl build for portable use is done in CI.

## License

GPL-3.0-only. See [LICENSE](./LICENSE).