# CLI Reference Complete reference for all goget command-line flags, organized by category. ```bash goget --url [OPTIONS] ``` ## Target | Flag | Argument | Description | |---|---|---| | `--url` | `` | URL to download (repeatable for multiple URLs) | ## Output | Flag | Argument | Description | |---|---|---| | `--output` | `` | Output filename or directory (default: auto-derived from URL) | | `--restart` | — | Delete existing file and restart download from scratch | | `--overwrite` | — | Overwrite existing file without atomic rename | | `--content-disposition` | — | Use filename from server's `Content-Disposition` header | | `--create-dirs` | — | Create missing parent directories of `--output` (default: true). Use `--create-dirs=false` to disable (curl `--create-dirs` / wget behavior). Ignored for stdout output | | `--keep-timestamps` | — | Set file modification time to server's `Last-Modified` value | ## Progress | Flag | Argument | Description | |---|---|---| | `--verbose` | — | Verbose output with Unicode progress bar (default enabled) | | `--no-progress` | — | Hide progress bar, keep other output | | `--progress` | `dot` | Dot progress bar style | | `--quiet` | — | Suppress all output except errors | | `--json` | — | Output progress as JSON lines for scripting (format: `{"type":"progress","current":X,"total":X,"speed":X}`) | | `--debug` | — | Enable debug output with detailed connection info | ## Network | Flag | Argument | Description | |---|---|---| | `--timeout` | `` | Connection timeout (`0` = smart auto-calculation based on file size) | | `--connect-timeout` | `` | TCP connection establishment timeout | | `--max-time` | `` | Maximum total transfer time (abort if exceeded) | | `--max-retries` | `` | Maximum retry attempts on failure | | `--max-filesize` | `` | Abort if file exceeds size limit (e.g. `100MB`, `1GB`) | | `--proxy` | `` | Proxy server URL — `http://` for HTTP CONNECT, `socks5://` (local DNS) or `socks5h://` (remote DNS) for SOCKS5, with optional `user:pass@` authentication | | `--no-ipv4` | — | Disable IPv4 fallback (IPv6 only) | | `--no-redirect` | — | Disable following HTTP redirects (3xx) | | `--dns-servers` | `` | Custom DNS servers, comma-separated (e.g. `1.1.1.1,8.8.8.8`) | | `--bind-interface` | `` | Bind outgoing connections to a specific network interface (Linux only) | | `--allow-private` | — | Allow connections to private/internal IPs (disabled by default for SSRF protection) | | `--pinned-cert` | `` | Certificate pinning — abort if server cert SHA-256 doesn't match | ## HTTP / Network Flags | Flag | Argument | Description | |---|---|---| | `--header` | `"K: V"` | Custom HTTP header (repeatable) | | `--insecure` | — | Skip TLS certificate verification | | `--cert` | `` | Client certificate in PEM format (mTLS) | | `--key` | `` | Client private key in PEM format (mTLS) | | `--data` | `"key=value"` | Send POST data (implies POST) | | `--form` | `"field=value"` | Multipart form field (repeatable; `--form "file=@./path"` for file upload) | | `--spider` | — | Check URL existence via HEAD request — no body downloaded | | `--write-out` | `` | Print metadata after transfer (format: `%{http_code}`, `%{size_download}`, `%{time_total}`, `%{speed_download}`) | | `--trace-time` | — | Add HTTP timing breakdown to output (DNS, TCP, TLS, TTFB, Total) | | `--fail` | — | Exit non-zero on HTTP 4xx/5xx response | | `--compressed` | — | Accept-Encoding header for compressed transfer | | `--range` | `-` | Download a byte range (e.g. `--range 0-999`) | | `--post-file` | `` | POST file contents as request body | | `--referer` | `` | Set Referer header | ## Recursive / Spider Flags | Flag | Argument | Description | |---|---|---| | `--accept` | `"*.pdf"` | Accept patterns — filename glob or MIME type (comma-separated) | | `--no-parent` | — | Do not ascend to parent directories during recursive download | | `--adjust-extension` | — | Append `.html` extension to text/html files without one | | `--wait` | `` | Delay between requests in recursive mode | | `--random-wait` | — | Randomize wait time (0.5x–1.5x of `--wait` value) | | `--page-requisites` | — | Download CSS, JS, and images required to render HTML pages | | `--span-hosts` | — | Follow links to external domains in recursive mode | | `--convert-links` | — | Rewrite links in downloaded HTML for local offline viewing | | `--warc-file` | `` | Write WARC (Web ARChive) output for archival | | `--dry-run` | — | List all URLs that would be downloaded in recursive/mirror mode without saving files to disk | | `--progress` | `dot` | Dot progress bar style | | `--no-clobber` | — | Skip download if file already exists | ## Recursive / Mirror | Flag | Argument | Description | |---|---|---| | `--recursive` | — | Enable recursive downloading — follow links from HTML pages | | `--mirror` | — | Mirror entire website (infinite depth, convert links) — shorthand for `--recursive --convert-links --page-requisites` | | `--max-depth` | `` | Maximum recursion depth | | `--follow-external` | — | Follow links to domains other than the starting domain | | `--exclude-pattern` | `

` | Exclude URL patterns (glob, comma-separated) | | `--no-convert-links` | — | Don't convert links in HTML during mirror (faster, but not offline-ready) | | `--no-mirror-assets` | — | Don't download CSS, JS, and images during mirror | | `--no-robots` | — | Don't respect `robots.txt` during mirroring | | `--rate-limit` | `` | Maximum download speed (e.g. `1MB/s`, `500KB/s`, `0` = unlimited) | | `--domains` | `` | Restrict recursion to listed domains (comma-separated) | | `--reject` | `` | Reject URL patterns (glob) | | `--cut-dirs` | `` | Ignore N directory components when creating local filenames | | `--proto-dirs` | — | Create protocol-prefixed directories (http/, ftp/ etc.) | | `--adjust-extension` | — | Append `.html` to text/html files missing an extension | | `--timestamping` | — | Only download files newer than the local copy | | `--backup-converted` | — | Back up original `.orig` files before link conversion | | `--recursive-parallel` | `` | Number of concurrent file downloads in recursive mode across all protocols (HTTP, WebDAV, FTP, SFTP). `0` = sequential (default) | | `--continue` | — | Continue getting partially-downloaded file | ## Download Management | Flag | Argument | Description | |---|---|---| | `--queue` | — | Add URL to the download queue (see `--queue-file`) | | `--queue-list` | — | List all items in the queue | | `--queue-process` | — | Process (download) all pending items in the queue | | `--queue-clear` | — | Remove completed items from the queue | | `--queue-file` | `` | Custom queue file path (default: `~/.config/goget/queue.json`) | | `--queue-priority` | `` | Priority for queued item (1–10, higher = processed first) | | `--batch-file` | `` | Read URLs from a file, one URL per line | | `--input-file` | `` | Read URLs from a file (alias for `--batch-file`) | | `--schedule` | `