get-aria2 v1.0.8
get-aria2
This package contains a tool that will download the latest version of aria2 from GitHub.
NPM
If the package is added as a dependency in another node module (npm install get-aria2) it will write the aria2c binary to node_modules/.bin. If installed globally (npm install -g get-aria2) the binary will be added to your PATH so you can use aria2c on the command line.
To use with a proxy set the "HTTP_PROXY" environment variable. Example: HTTP_PROXY=http://blah-blah:2323.
All platforms but linux are downloaded from "aria2/aria2". Linux is downloaded from "q3aql/aria2-static-builds".
Command-Line
This package also contains a tool for downloading aria2 on different platforms.
The syntax is: get-aria2 [destination] [arguments]
| Argument | Alias | Description |
|---|---|---|
| --platform | -p | Platform to download for. "win32" (windows), "darwin" (mac), "linux" and "android" are supported. |
| --arch | -a | Architecture to download for. "x64", "x32" or "arm" Are supported. See below. |
| --chmod | -c | Does chmod 777 on the binary making it executab |
| --ext | -e | Adds ".exe" to the path for the binary if on windows. |
| --quiet | -q | Is silent except for errors. |
Example: get-aria2 win-32-aria2 -p win32 -a x32 -e
Will download aria2c to ./win-32-aria2.exe.
If no destination is provided will write to stdout.
Platform/Architecture
- "darwin" (mac) - only supports "x64".
- "win32" (windows) - supports "x32" and "x64".
- "linux" - supports "x32", "x64" and "arm". Using "arm" with "linux" will download a binary built for the RaspberryPi.
- "android" - only supports "arm".
Using any combination not listed above will result in an error.
By default it will use your current platform and architecture.
Programmatic Usage
This package contains a getAria2(platform, arch) function which will return a Stream containing the binary.
You can also programmatically get the path to aria2c by calling aria2cPath().
Documentation is available under docs/. A copy of the documentation is available online here.
Tests
Tests are written in mocha. Run npm test.
