id = "aria2c" name = "aria2" homepage = "https://aria2.github.io" description = "aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line." executables = ["aria2c"] [dotfiles] # aria2c(1), the --conf-path option # (https://aria2.github.io/manual/en/html/aria2c.html): "Change the # configuration file path to PATH. Default: $HOME/.aria2/aria2.conf if present, # otherwise $XDG_CONFIG_HOME/aria2/aria2.conf". The same page's FILES section # repeats it: the legacy path wins when it exists, and the XDG one is used # otherwise — aria2 reads the variable, so that second location is # [configHome]. Both are listed because which one a machine has depends on when # the user first ran aria2. On Windows aria2 keeps to the $HOME/.aria2 form, so # the [configHome] entry resolves to a file that is simply not there. # # The file is a NAME=VALUE list, one option per line, so the rules below are # line oriented. The DHT routing tables ($XDG_CACHE_HOME/aria2/dht.dat and # dht6.dat, or ~/.aria2/dht.dat) are state, not config; naming the two conf # files rather than the directory leaves them out without needing an exclude. paths = [ "~/.aria2/aria2.conf", "[configHome]/aria2/aria2.conf", ] exclude = [] # aria2.conf is not a whole-file secret: it is mostly connection limits, the # download directory and RPC settings, all worth carrying. Only the credential # options are lifted out, below. secret = [] # The RPC and protocol passwords, in every shape aria2 has accepted them: the # current --rpc-secret token, and --rpc-passwd, half of the older # --rpc-user / --rpc-passwd pair the manual marks deprecated in favour of it # but that aria2 still reads — plus the FTP and HTTP passwords. The matching # `-user` options are left as ordinary config, the same way a user name stays # with the config elsewhere in this catalog while only the secret half is # lifted. Both spellings of the file, or the token is only lifted out on a # machine that uses the XDG location and syncs in the clear from one that does # not. [[dotfiles.secret_paths]] file = ["~/.aria2/aria2.conf", "[configHome]/aria2/aria2.conf"] match = { prefix = ["rpc-secret", "rpc-passwd", "ftp-passwd", "http-passwd"] } # `dir` is the absolute download directory, `input-file` the local URI list # aria2 reads at startup, and `ca-certificate` a certificate bundle at a path # that exists on this machine. All three name a location on one disk; carrying # them to another machine points aria2 at directories and files that are not # there. No other aria2 option name begins with any of these strings, so the # prefixes catch nothing else. All three are the user's own: the download # directory they picked, the queue file they wrote, and the certificate they # were handed — `ca-certificate` appears at all only because the platform's own # bundle was not the one to use. Kept so this machine can be set up the same # way again: backup. Source as above. [[dotfiles.machine_lines]] file = ["~/.aria2/aria2.conf", "[configHome]/aria2/aria2.conf"] match = { prefix = ["dir", "input-file", "ca-certificate"] } scope = "backup" [commands] format = 1 label = "Download files" description = "Download one or more URLs, torrents or metalinks with aria2c. RPC, BitTorrent tuning, cookies and credentials are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "help" kind = "help" revision = "aria2 version 1.37.0" evidence = """ -d, --dir=DIR The directory to store the downloaded file. -o, --out=FILE The file name of the downloaded file. It is -s, --split=N Download a file using N connections. -x, --max-connection-per-server=NUM The maximum number of connections to one -c, --continue[=true|false] Continue downloading a partially downloaded -i, --input-file=FILE Downloads URIs found in FILE. -j, --max-concurrent-downloads=N Set maximum number of parallel downloads for -Z, --force-sequential[=true|false] Fetch URIs in the command-line sequentially -k, --min-split-size=SIZE aria2 does not split less than 2*SIZE byte range. -S, --show-files[=true|false] Print file listing of .torrent, .meta4 and -T, --torrent-file=TORRENT_FILE The path to the .torrent file. -M, --metalink-file=METALINK_FILE The file path to the .meta4 and .metalink -l, --log=LOG The file name of the log file. --max-connection-per-server=4 --min-split-size=1M. --file-allocation=METHOD Specify file allocation method. 'none' doesn't pre-allocate file space. 'prealloc' """ [[commands.field]] id = "uris" label = "URLs" description = "HTTP(S), FTP, magnet links, or .torrent/.metalink files." type = "string" position = 0 multiple = true sources = ["help"] [[commands.field]] id = "dir" label = "Download directory" type = "path" path = { kind = "directory", role = "output" } option = ["--dir", "-d"] sources = ["help"] [[commands.field]] id = "out" label = "Output file name" type = "string" option = ["--out", "-o"] sources = ["help"] [[commands.field]] id = "continue" label = "Resume partial download" type = "boolean" option = ["--continue", "-c"] sources = ["help"] [[commands.field]] id = "split" label = "Connections per file" type = "integer" option = ["--split", "-s"] sources = ["help"] [[commands.field]] id = "max_conn" label = "Max connections per server" type = "integer" option = ["--max-connection-per-server", "-x"] sources = ["help"] [[commands.field]] id = "min_split" label = "Min split size" description = "For example 1M." type = "string" option = ["--min-split-size", "-k"] sources = ["help"] [[commands.field]] id = "input_file" label = "Read URLs from file" type = "path" path = { kind = "file", role = "input" } option = ["--input-file", "-i"] sources = ["help"] [[commands.field]] id = "concurrent" label = "Parallel downloads" type = "integer" option = ["--max-concurrent-downloads", "-j"] sources = ["help"] [[commands.field]] id = "file_allocation" label = "File allocation" type = "enum" option = ["--file-allocation"] choices = [{ value = "none", label = "None" }, { value = "prealloc", label = "Pre-allocate" }] sources = ["help"] [[commands.field]] id = "show_files" label = "List torrent contents only" type = "boolean" option = ["--show-files", "-S"] sources = ["help"] [[commands.task]] id = "download" label = "Download a URL" fields = ["uris", "dir", "out", "continue"] required = ["uris"] [[commands.task]] id = "fast" label = "Fast multi-connection download" set = { split = [16], max_conn = [16] } fields = ["uris", "dir", "split", "max_conn", "continue"] required = ["uris"] [[commands.group]] id = "basic" label = "Basic" fields = ["uris", "dir", "out", "continue", "split", "max_conn"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["min_split", "input_file", "concurrent", "file_allocation", "show_files"]