aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 40124a51fcf999be3f1bc7acb2028658cc0bc58f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<h1 align="center">aria</h1>

<p align="center">
	<strong>Friendly aria2c wrapper for your personal downloads.</strong><br>
	<i>Quick, simple, enjoyable.</i>
</p>

<p align="center">
	<a href="https://git.tommasongr.com/tommaso/aria/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="License"></a>
	<img src="https://img.shields.io/badge/platform-macOS-green.svg" alt="Platform">
	<a href="https://tommasonegri.com"><img src="https://img.shields.io/badge/maintainer-Tommaso%20Negri-blue" alt="Maintainer"></a>
</p>

`aria` wraps the JSONRPC server of the great [aria2](https://aria2.github.io/), exposing just enough functionality to be dangerous.

---

## Installation

Build and install the binary and man page to `$(PREFIX)/bin` and `$(PREFIX)/share/man/man1` (defaults to `~/.local`):

```sh
make install
```

To install elsewhere, override `PREFIX`:

```sh
make install PREFIX=/usr/local
```

To remove:

```sh
make uninstall
```

> [!NOTE]
> Make sure `$(PREFIX)/bin` is in your `PATH` to run `aria` from anywhere.

---

## Features

### One command for everything

Add, pause, resume, and remove downloads with a unified API — no more memorising cryptic flags:

```sh
aria add https://example.com/file.iso
aria add uri https://example.com/file.iso
aria add torrent https://example.com/linux.torrent
aria pause 8a4c3f21e09b7d55
aria resume 8a4c3f21e09b7d55
aria remove 8a4c3f21e09b7d55
aria purge
```

Commands without arguments act on all downloads, so you can pause or resume everything at once:

```sh
aria pause
aria resume
```

### Interactive list

Run `aria list` to check the status of all your downloads in a beautifully formatted table,
live-refreshing every second:

```sh
aria list
```

Pick a download with the arrow keys and `enter`, and its **GID** is printed to `stdout`,
ready to be composed with any other tool:

```sh
aria pause "$(aria list)"
```

### Options

Every command supports a couple of well-chosen options, and nothing more:

| Option | Description | Default |
| --- | --- | --- |
| `-d`, `--directory <dir>` | Define the directory to save files. | `~/Downloads/` |
| `--seed` | Enable seeding after torrent download. | |

### Simple configuration

Point *aria* to your `aria2c` server by directly editing the source:

```swift
enum Config {
	static let host: String = "127.0.0.1"
	static let port: Int = 6800
	static let secret: String = "my_secret"
	static var endpoint: URL {
		URL(string: "http://\(host):\(port)/jsonrpc")!
	}
	static let directory: String = "~/Downloads/"
}
```