tsarr 2.9.1 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +120 -233
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/manual-import.d.ts +30 -0
- package/dist/cli/commands/manual-import.d.ts.map +1 -0
- package/dist/cli/commands/radarr.d.ts.map +1 -1
- package/dist/cli/commands/sonarr.d.ts.map +1 -1
- package/dist/cli/index.js +5230 -4783
- package/dist/cli/index.js.map +133 -0
- package/dist/clients/base.d.ts +8 -3
- package/dist/clients/base.d.ts.map +1 -1
- package/dist/clients/bazarr.d.ts +125 -124
- package/dist/clients/bazarr.d.ts.map +1 -1
- package/dist/clients/bazarr.js +183 -100
- package/dist/clients/bazarr.js.map +22 -0
- package/dist/clients/lidarr.d.ts +148 -147
- package/dist/clients/lidarr.d.ts.map +1 -1
- package/dist/clients/lidarr.js +190 -102
- package/dist/clients/lidarr.js.map +23 -0
- package/dist/clients/prowlarr.d.ts +30 -29
- package/dist/clients/prowlarr.d.ts.map +1 -1
- package/dist/clients/prowlarr.js +190 -102
- package/dist/clients/prowlarr.js.map +23 -0
- package/dist/clients/qbittorrent.d.ts +3 -1
- package/dist/clients/qbittorrent.d.ts.map +1 -1
- package/dist/clients/qbittorrent.js +213 -107
- package/dist/clients/qbittorrent.js.map +21 -0
- package/dist/clients/radarr.d.ts +195 -150
- package/dist/clients/radarr.d.ts.map +1 -1
- package/dist/clients/radarr.js +230 -102
- package/dist/clients/radarr.js.map +23 -0
- package/dist/clients/readarr.d.ts +150 -149
- package/dist/clients/readarr.d.ts.map +1 -1
- package/dist/clients/readarr.js +190 -102
- package/dist/clients/readarr.js.map +23 -0
- package/dist/clients/seerr-types.d.ts +1 -1
- package/dist/clients/seerr-types.d.ts.map +1 -1
- package/dist/clients/seerr.d.ts +17 -16
- package/dist/clients/seerr.d.ts.map +1 -1
- package/dist/clients/seerr.js +183 -100
- package/dist/clients/seerr.js.map +22 -0
- package/dist/clients/sonarr.d.ts +203 -168
- package/dist/clients/sonarr.d.ts.map +1 -1
- package/dist/clients/sonarr.js +206 -112
- package/dist/clients/sonarr.js.map +23 -0
- package/dist/core/client.d.ts +2 -0
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/fetch.d.ts +23 -0
- package/dist/core/fetch.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +7 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/generated/bazarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/bazarr/client/types.gen.d.ts +5 -2
- package/dist/generated/bazarr/client/types.gen.d.ts.map +1 -1
- package/dist/generated/bazarr/client/utils.gen.d.ts +5 -1
- package/dist/generated/bazarr/client/utils.gen.d.ts.map +1 -1
- package/dist/generated/lidarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/lidarr/client/types.gen.d.ts +5 -2
- package/dist/generated/lidarr/client/types.gen.d.ts.map +1 -1
- package/dist/generated/lidarr/client/utils.gen.d.ts +5 -1
- package/dist/generated/lidarr/client/utils.gen.d.ts.map +1 -1
- package/dist/generated/prowlarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/prowlarr/client/types.gen.d.ts +5 -2
- package/dist/generated/prowlarr/client/types.gen.d.ts.map +1 -1
- package/dist/generated/prowlarr/client/utils.gen.d.ts +5 -1
- package/dist/generated/prowlarr/client/utils.gen.d.ts.map +1 -1
- package/dist/generated/qbittorrent/client/client.gen.d.ts.map +1 -1
- package/dist/generated/qbittorrent/client/types.gen.d.ts +5 -2
- package/dist/generated/qbittorrent/client/types.gen.d.ts.map +1 -1
- package/dist/generated/qbittorrent/client/utils.gen.d.ts +5 -1
- package/dist/generated/qbittorrent/client/utils.gen.d.ts.map +1 -1
- package/dist/generated/radarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/radarr/client/types.gen.d.ts +5 -2
- package/dist/generated/radarr/client/types.gen.d.ts.map +1 -1
- package/dist/generated/radarr/client/utils.gen.d.ts +5 -1
- package/dist/generated/radarr/client/utils.gen.d.ts.map +1 -1
- package/dist/generated/readarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/readarr/client/types.gen.d.ts +5 -2
- package/dist/generated/readarr/client/types.gen.d.ts.map +1 -1
- package/dist/generated/readarr/client/utils.gen.d.ts +5 -1
- package/dist/generated/readarr/client/utils.gen.d.ts.map +1 -1
- package/dist/generated/seerr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/seerr/client/types.gen.d.ts +5 -2
- package/dist/generated/seerr/client/types.gen.d.ts.map +1 -1
- package/dist/generated/seerr/client/utils.gen.d.ts +5 -1
- package/dist/generated/seerr/client/utils.gen.d.ts.map +1 -1
- package/dist/generated/seerr/index.d.ts +2 -2
- package/dist/generated/seerr/index.d.ts.map +1 -1
- package/dist/generated/seerr/sdk.gen.d.ts +13 -1
- package/dist/generated/seerr/sdk.gen.d.ts.map +1 -1
- package/dist/generated/seerr/types.gen.d.ts +78 -7
- package/dist/generated/seerr/types.gen.d.ts.map +1 -1
- package/dist/generated/sonarr/client/client.gen.d.ts.map +1 -1
- package/dist/generated/sonarr/client/types.gen.d.ts +5 -2
- package/dist/generated/sonarr/client/types.gen.d.ts.map +1 -1
- package/dist/generated/sonarr/client/utils.gen.d.ts +5 -1
- package/dist/generated/sonarr/client/utils.gen.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +12 -0
- package/dist/tsarr-2.11.0.tgz +0 -0
- package/package.json +18 -9
- package/dist/tsarr-2.9.1.tgz +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Robbe Verhelst
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,302 +1,189 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="./docs/logo.png" alt="Tsarr" width="96" height="96" />
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# Tsarr
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
[](https://nodejs.org/)
|
|
7
|
-
[](https://www.npmjs.com/package/tsarr)
|
|
8
|
-
[](https://www.npmjs.com/package/tsarr)
|
|
9
|
-
[](https://opensource.org/licenses/MIT)
|
|
10
|
-
[](https://github.com/robbeverhelst/Tsarr/actions)
|
|
6
|
+
**All your *arr apps. One CLI. One SDK.**
|
|
11
7
|
|
|
12
|
-
|
|
8
|
+
[](https://www.npmjs.com/package/tsarr)
|
|
9
|
+
[](https://www.npmjs.com/package/tsarr)
|
|
10
|
+
[](https://github.com/robbeverhelst/Tsarr/actions)
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
<br />
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
<img src="./docs/vhs/hero.gif" alt="tsarr doctor — eight services, one terminal" />
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
- **Always up-to-date** — generated from official Swagger/OpenAPI specs, not manually maintained
|
|
20
|
-
- **CLI + SDK** — use it as a standalone Radarr/Sonarr CLI tool or import it as a library in your code
|
|
21
|
-
- **Zero dependencies for binaries** — standalone binaries for every platform, or run via Node.js/Bun
|
|
22
|
-
- **Built for automation** — JSON output, scripting-friendly, perfect for cron jobs and CI/CD pipelines
|
|
16
|
+
</div>
|
|
23
17
|
|
|
24
|
-
|
|
18
|
+
Tsarr is a CLI and TypeScript SDK for Radarr, Sonarr, Lidarr, Readarr, Prowlarr, Bazarr, qBittorrent, and Jellyseerr / Overseerr — eight services, one tool. Clients are generated directly from each project's official OpenAPI spec, so they're type-safe and stay in sync with upstream automatically. Drive it from your terminal, your scripts, your CI, or import it as a library.
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
- ⚡ **Universal** - Works with Node.js, Bun, and as standalone binaries
|
|
28
|
-
- 📦 **Modular** - Separate clients for each Servarr app
|
|
29
|
-
- 💻 **CLI included** - Manage all Servarr apps from the terminal
|
|
30
|
-
- 🚀 **Multi-platform** - Available via npm, Homebrew, Docker, Scoop, Chocolatey, AUR, Nix, and pre-built binaries
|
|
31
|
-
|
|
32
|
-
## Supported Servarr Apps
|
|
33
|
-
|
|
34
|
-
- **Radarr** - Movie collection manager
|
|
35
|
-
- **Sonarr** - TV series collection manager
|
|
36
|
-
- **Lidarr** - Music collection manager
|
|
37
|
-
- **Readarr** - Book collection manager
|
|
38
|
-
- **Prowlarr** - Indexer manager
|
|
39
|
-
- **Bazarr** - Subtitle manager
|
|
40
|
-
- **qBittorrent** - Download client
|
|
41
|
-
- **Seerr** - Media request manager (Jellyseerr/Overseerr compatible)
|
|
42
|
-
|
|
43
|
-
## Installation
|
|
44
|
-
|
|
45
|
-
### npm / Node.js
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# As a dependency (SDK)
|
|
49
|
-
npm install tsarr
|
|
50
|
-
|
|
51
|
-
# As a global CLI
|
|
52
|
-
npm install -g tsarr
|
|
53
|
-
|
|
54
|
-
# Or run directly without installing
|
|
55
|
-
npx tsarr doctor
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Bun
|
|
20
|
+
## Install
|
|
59
21
|
|
|
60
22
|
```bash
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
bunx tsarr doctor
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Homebrew (macOS / Linux)
|
|
23
|
+
# CLI (global) or SDK (project dependency)
|
|
24
|
+
npm install -g tsarr # or: npm install tsarr
|
|
67
25
|
|
|
68
|
-
|
|
26
|
+
# Homebrew (macOS / Linux)
|
|
69
27
|
brew install robbeverhelst/tsarr/tsarr
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### OpenClaw / ClawHub
|
|
73
28
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
openclaw clawhub install tsarr
|
|
78
|
-
# or with the registry CLI
|
|
79
|
-
clawhub install tsarr
|
|
29
|
+
# Standalone binary (no runtime needed)
|
|
30
|
+
curl -fsSL https://github.com/robbeverhelst/tsarr/releases/latest/download/tsarr-$(uname -s | tr A-Z a-z)-$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/') -o /usr/local/bin/tsarr && chmod +x /usr/local/bin/tsarr
|
|
80
31
|
```
|
|
81
32
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Download standalone binaries from [GitHub Releases](https://github.com/robbeverhelst/tsarr/releases) — no runtime needed:
|
|
85
|
-
|
|
86
|
-
| Platform | Download |
|
|
87
|
-
|---|---|
|
|
88
|
-
| macOS (Apple Silicon) | `tsarr-darwin-arm64` |
|
|
89
|
-
| macOS (Intel) | `tsarr-darwin-x64` |
|
|
90
|
-
| Linux (x64) | `tsarr-linux-x64` |
|
|
91
|
-
| Linux (arm64) | `tsarr-linux-arm64` |
|
|
92
|
-
| Windows (x64) | `tsarr-windows-x64.exe` |
|
|
33
|
+
<details>
|
|
34
|
+
<summary>Other install methods (Bun, Docker, Scoop, Chocolatey, AUR, Nix, manual binaries)</summary>
|
|
93
35
|
|
|
94
36
|
```bash
|
|
95
|
-
#
|
|
96
|
-
|
|
97
|
-
chmod +x tsarr
|
|
98
|
-
sudo mv tsarr /usr/local/bin/
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Docker
|
|
37
|
+
# Bun
|
|
38
|
+
bun add -g tsarr # or: bun add tsarr
|
|
102
39
|
|
|
103
|
-
|
|
40
|
+
# Docker
|
|
104
41
|
docker run --rm ghcr.io/robbeverhelst/tsarr doctor
|
|
105
|
-
docker run --rm -v ~/.config/tsarr:/root/.config/tsarr ghcr.io/robbeverhelst/tsarr radarr movie list
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Scoop (Windows)
|
|
109
42
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
```powershell
|
|
43
|
+
# Scoop (Windows)
|
|
113
44
|
scoop bucket add tsarr https://github.com/robbeverhelst/scoop-tsarr
|
|
114
45
|
scoop install tsarr
|
|
115
|
-
```
|
|
116
46
|
|
|
117
|
-
|
|
47
|
+
# Chocolatey (Windows)
|
|
48
|
+
choco install tsarr
|
|
118
49
|
|
|
119
|
-
|
|
50
|
+
# AUR (Arch)
|
|
51
|
+
yay -S tsarr-bin
|
|
120
52
|
|
|
121
|
-
|
|
122
|
-
|
|
53
|
+
# Nix
|
|
54
|
+
nix profile install github:robbeverhelst/tsarr?dir=packaging/nix
|
|
123
55
|
```
|
|
124
56
|
|
|
125
|
-
|
|
57
|
+
Pre-built binaries for every platform are published on each [GitHub release](https://github.com/robbeverhelst/tsarr/releases). See [docs/distribution.md](./docs/distribution.md) for the full distribution flow.
|
|
126
58
|
|
|
127
|
-
|
|
128
|
-
yay -S tsarr-bin
|
|
129
|
-
```
|
|
59
|
+
</details>
|
|
130
60
|
|
|
131
|
-
|
|
61
|
+
## 🤖 Run Tsarr from chat
|
|
132
62
|
|
|
133
|
-
|
|
63
|
+
Tsarr ships as an [OpenClaw](https://openclaw.ai/) skill — point a local AI assistant at your stack and manage it from WhatsApp, Telegram, Discord, or Slack.
|
|
134
64
|
|
|
135
65
|
```bash
|
|
136
|
-
|
|
137
|
-
# or run it without installing
|
|
138
|
-
nix run github:robbeverhelst/tsarr?dir=packaging/nix -- doctor
|
|
66
|
+
openclaw clawhub install tsarr
|
|
139
67
|
```
|
|
140
68
|
|
|
141
|
-
|
|
69
|
+
> [!TIP]
|
|
70
|
+
> Once installed, talk to your media stack in plain English:
|
|
71
|
+
>
|
|
72
|
+
> *"Add Dune Part Two to my 4K Radarr and let me know when it's ready."*
|
|
73
|
+
>
|
|
74
|
+
> *"What's queued in Sonarr right now? Anything stuck?"*
|
|
75
|
+
>
|
|
76
|
+
> *"Search Prowlarr for the new Radiohead release and send the best result to qBittorrent."*
|
|
142
77
|
|
|
143
|
-
|
|
78
|
+
The skill itself lives in [`skills/tsarr/`](./skills/tsarr) in this repo, so improvements ship alongside the CLI.
|
|
144
79
|
|
|
145
|
-
|
|
80
|
+
## CLI
|
|
146
81
|
|
|
147
82
|
```bash
|
|
148
|
-
#
|
|
83
|
+
# One-time setup — interactive wizard
|
|
149
84
|
tsarr config init
|
|
150
85
|
|
|
151
|
-
#
|
|
152
|
-
tsarr
|
|
153
|
-
tsarr config set services.radarr.apiKey your-api-key
|
|
154
|
-
|
|
155
|
-
# Or use environment variables
|
|
156
|
-
export TSARR_RADARR_URL=http://localhost:7878
|
|
157
|
-
export TSARR_RADARR_API_KEY=your-api-key
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Config is stored in `~/.config/tsarr/config.json` (global) or `.tsarr.json` (local project). Environment variables take priority over config files. You can configure multiple instances of the same service (e.g. a 4K and 1080p Radarr) — see the [CLI Guide](./docs/cli.md) for details.
|
|
161
|
-
|
|
162
|
-
### Usage
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
tsarr <service> <resource> <action> [options]
|
|
86
|
+
# Verify everything's reachable
|
|
87
|
+
tsarr doctor
|
|
166
88
|
|
|
167
|
-
#
|
|
168
|
-
tsarr radarr movie list
|
|
89
|
+
# Use it
|
|
169
90
|
tsarr radarr movie search --term "Interstellar"
|
|
170
|
-
tsarr sonarr series list
|
|
171
|
-
tsarr prowlarr indexer list
|
|
172
|
-
tsarr lidarr artist search --term "Radiohead"
|
|
173
|
-
|
|
174
|
-
# Multi-instance: target a specific named instance
|
|
175
|
-
tsarr radarr movie list --instance 4K
|
|
176
|
-
|
|
177
|
-
# Output formats
|
|
178
|
-
tsarr radarr movie list --table # Table (default in terminal)
|
|
179
|
-
tsarr radarr movie list --json # JSON (default when piped)
|
|
180
|
-
tsarr radarr movie list --quiet # IDs only
|
|
181
|
-
|
|
182
|
-
# Diagnostics
|
|
183
|
-
tsarr doctor # Test all configured connections
|
|
184
|
-
|
|
185
|
-
# Shell completions
|
|
186
|
-
tsarr completions bash >> ~/.bashrc
|
|
187
|
-
tsarr completions zsh >> ~/.zshrc
|
|
188
|
-
tsarr completions fish > ~/.config/fish/completions/tsarr.fish
|
|
189
91
|
```
|
|
190
92
|
|
|
191
|
-
|
|
93
|
+
<div align="center">
|
|
94
|
+
<img src="./docs/vhs/workflow.gif" alt="A realistic Tsarr workflow" />
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
The CLI follows a predictable `tsarr <service> <resource> <action>` shape across all services, with `--json` / `--table` / `--quiet` output modes, shell completions, and a `doctor` command that pings every configured service.
|
|
192
98
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
| `radarr` | movie, moviefile, profile, tag, queue, rootfolder, system, history, calendar, notification, downloadclient, blocklist, wanted, importlist, customformat |
|
|
196
|
-
| `sonarr` | series, episode, episodefile, profile, tag, queue, rootfolder, system, history, calendar, notification, downloadclient, blocklist, wanted, importlist |
|
|
197
|
-
| `lidarr` | artist, album, trackfile, profile, tag, queue, rootfolder, system, history, calendar, notification, downloadclient, blocklist, wanted, importlist |
|
|
198
|
-
| `readarr` | author, book, bookfile, profile, tag, queue, rootfolder, system, history, calendar, notification, downloadclient, blocklist, wanted, importlist |
|
|
199
|
-
| `prowlarr` | indexer, search, app, tag, indexerstats, notification, downloadclient, system |
|
|
200
|
-
| `bazarr` | series, movie, episode, provider, language, system |
|
|
201
|
-
| `qbittorrent` | torrents, status |
|
|
202
|
-
| `seerr` | requests, search, users, status |
|
|
99
|
+
> [!NOTE]
|
|
100
|
+
> Got more than one Radarr (or Sonarr, or anything else)? Give each one a name in your config and pick which to use with `--instance 4K`. See the [CLI guide](./docs/cli.md#multi-instance) for setup.
|
|
203
101
|
|
|
204
|
-
See the [CLI
|
|
102
|
+
See the full **[CLI guide](./docs/cli.md)** for every command, scripting examples, output formats, and shell completions.
|
|
205
103
|
|
|
206
104
|
## SDK
|
|
207
105
|
|
|
208
|
-
|
|
106
|
+
Use Tsarr from any TypeScript / JavaScript project. Same coverage as the CLI, with full types generated from each upstream OpenAPI spec.
|
|
209
107
|
|
|
210
|
-
```
|
|
211
|
-
import { RadarrClient
|
|
108
|
+
```ts
|
|
109
|
+
import { RadarrClient } from 'tsarr/radarr';
|
|
212
110
|
|
|
213
111
|
const radarr = new RadarrClient({
|
|
214
112
|
baseUrl: 'http://localhost:7878',
|
|
215
|
-
apiKey:
|
|
113
|
+
apiKey: process.env.RADARR_API_KEY!,
|
|
216
114
|
});
|
|
217
115
|
|
|
218
|
-
// Type-safe API calls
|
|
219
116
|
const movies = await radarr.getMovies();
|
|
220
|
-
const status = await radarr.getSystemStatus();
|
|
221
117
|
```
|
|
222
118
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
```typescript
|
|
226
|
-
// Import only what you need
|
|
227
|
-
import { RadarrClient } from 'tsarr/radarr';
|
|
119
|
+
```ts
|
|
120
|
+
// Import only what you need — modular per-service entrypoints
|
|
228
121
|
import { SonarrClient } from 'tsarr/sonarr';
|
|
229
|
-
import type {
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## Development
|
|
233
|
-
|
|
234
|
-
Install dependencies:
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
bun install
|
|
122
|
+
import type { SeriesResource } from 'tsarr/sonarr/types';
|
|
238
123
|
```
|
|
239
124
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Build the project:
|
|
247
|
-
|
|
248
|
-
```bash
|
|
249
|
-
bun run build
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
Lint and format:
|
|
253
|
-
|
|
254
|
-
```bash
|
|
255
|
-
bun run lint
|
|
256
|
-
bun run format
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
## 📖 Documentation
|
|
260
|
-
|
|
261
|
-
- [CLI Guide](./docs/cli.md) - Complete CLI documentation with all commands and scripting examples
|
|
262
|
-
- [SDK Usage Guide](./docs/usage.md) - SDK usage documentation with examples
|
|
263
|
-
- [API Documentation](https://robbeverhelst.github.io/Tsarr/) - Auto-generated TypeScript API docs
|
|
264
|
-
- [Examples](./docs/examples.md) - Real-world automation examples
|
|
265
|
-
- [Examples Directory](./examples/) - Runnable example scripts
|
|
266
|
-
|
|
267
|
-
## Use Cases
|
|
268
|
-
|
|
269
|
-
Perfect for building:
|
|
270
|
-
- **Automation scripts** - Bulk movie imports, library maintenance, and media organization
|
|
271
|
-
- **Management tools** - Custom dashboards, backup utilities, and monitoring scripts
|
|
272
|
-
- **Integration scripts** - Connect Servarr apps with other services and workflows
|
|
273
|
-
- **CLI usage** - Manage your media servers directly from the terminal
|
|
274
|
-
|
|
275
|
-
## Alternatives
|
|
276
|
-
|
|
277
|
-
Looking for a Radarr CLI or Sonarr API client? Here's how Tsarr compares:
|
|
125
|
+
```ts
|
|
126
|
+
// Compose multiple services — one mental model, full types end-to-end
|
|
127
|
+
import { RadarrClient } from 'tsarr/radarr';
|
|
128
|
+
import { SonarrClient } from 'tsarr/sonarr';
|
|
278
129
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
130
|
+
const radarr = new RadarrClient({ baseUrl: 'http://radarr:7878', apiKey: '...' });
|
|
131
|
+
const sonarr = new SonarrClient({ baseUrl: 'http://sonarr:8989', apiKey: '...' });
|
|
132
|
+
|
|
133
|
+
const [movies, series] = await Promise.all([radarr.getMovies(), sonarr.getSeries()]);
|
|
134
|
+
console.log(`Library: ${movies.data?.length ?? 0} movies, ${series.data?.length ?? 0} series.`);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
See the **[SDK guide](./docs/usage.md)** and [auto-generated API docs](https://robbeverhelst.github.io/Tsarr/) for the full surface.
|
|
138
|
+
|
|
139
|
+
## Supported services
|
|
140
|
+
|
|
141
|
+
<table>
|
|
142
|
+
<tr>
|
|
143
|
+
<td width="40"><img src="./docs/logos/radarr.png" alt="Radarr" width="32" /></td>
|
|
144
|
+
<td><strong>Radarr</strong> — movie collection manager</td>
|
|
145
|
+
<td width="40"><img src="./docs/logos/sonarr.png" alt="Sonarr" width="32" /></td>
|
|
146
|
+
<td><strong>Sonarr</strong> — TV series collection manager</td>
|
|
147
|
+
</tr>
|
|
148
|
+
<tr>
|
|
149
|
+
<td><img src="./docs/logos/lidarr.png" alt="Lidarr" width="32" /></td>
|
|
150
|
+
<td><strong>Lidarr</strong> — music collection manager</td>
|
|
151
|
+
<td><img src="./docs/logos/readarr.png" alt="Readarr" width="32" /></td>
|
|
152
|
+
<td><strong>Readarr</strong> — book & audiobook manager</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td><img src="./docs/logos/prowlarr.png" alt="Prowlarr" width="32" /></td>
|
|
156
|
+
<td><strong>Prowlarr</strong> — indexer manager</td>
|
|
157
|
+
<td><img src="./docs/logos/bazarr.png" alt="Bazarr" width="32" /></td>
|
|
158
|
+
<td><strong>Bazarr</strong> — subtitle manager</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr>
|
|
161
|
+
<td><img src="./docs/logos/qbittorrent.svg" alt="qBittorrent" width="32" /></td>
|
|
162
|
+
<td><strong>qBittorrent</strong> — download client</td>
|
|
163
|
+
<td><img src="./docs/logos/jellyseerr.svg" alt="Jellyseerr / Overseerr" width="32" /></td>
|
|
164
|
+
<td><strong>Jellyseerr / Overseerr</strong> — media requests<br /><sub>(<code>seerr</code> subcommand, compatible with both)</sub></td>
|
|
165
|
+
</tr>
|
|
166
|
+
</table>
|
|
167
|
+
|
|
168
|
+
## Docs
|
|
169
|
+
|
|
170
|
+
- **[CLI guide](./docs/cli.md)** — every command, every flag
|
|
171
|
+
- **[SDK guide](./docs/usage.md)** — typed clients, modular imports
|
|
172
|
+
- **[Examples](./docs/examples.md)** — real-world automation scripts
|
|
173
|
+
- **[API reference](https://robbeverhelst.github.io/Tsarr/)** — generated TypeScript docs
|
|
174
|
+
|
|
175
|
+
## Support this project
|
|
176
|
+
|
|
177
|
+
If Tsarr saves you time, [sponsorship on GitHub](https://github.com/sponsors/robbeverhelst) is appreciated.
|
|
287
178
|
|
|
288
179
|
## Contributing
|
|
289
180
|
|
|
290
|
-
|
|
291
|
-
- [Bun](https://bun.sh) as the JavaScript runtime
|
|
292
|
-
- [Biome](https://biomejs.dev) for linting and formatting
|
|
293
|
-
- [@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) for code generation
|
|
294
|
-
- [Renovate](https://renovatebot.com) for dependency updates
|
|
181
|
+
PRs welcome — see [CONTRIBUTING.md](./CONTRIBUTING.md). Bug reports and feature requests go in [GitHub Issues](https://github.com/robbeverhelst/Tsarr/issues).
|
|
295
182
|
|
|
296
|
-
##
|
|
183
|
+
## Credits
|
|
297
184
|
|
|
298
|
-
|
|
185
|
+
Built on the work of the [Servarr](https://wiki.servarr.com/), [qBittorrent](https://www.qbittorrent.org/), [Jellyseerr](https://docs.jellyseerr.dev/), and [Overseerr](https://overseerr.dev/) projects. Tsarr is just the glue.
|
|
299
186
|
|
|
300
|
-
|
|
187
|
+
## License
|
|
301
188
|
|
|
302
|
-
|
|
189
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;EA4GjB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare function isSampleCandidate(item: {
|
|
2
|
+
name?: string | null;
|
|
3
|
+
relativePath?: string | null;
|
|
4
|
+
path?: string | null;
|
|
5
|
+
size?: number;
|
|
6
|
+
}): boolean;
|
|
7
|
+
export declare function filterSamples<T extends {
|
|
8
|
+
name?: string | null;
|
|
9
|
+
relativePath?: string | null;
|
|
10
|
+
path?: string | null;
|
|
11
|
+
size?: number;
|
|
12
|
+
}>(items: T[], includeSamples: boolean): T[];
|
|
13
|
+
export type ImportPartition<T> = {
|
|
14
|
+
ready: T[];
|
|
15
|
+
ambiguous: T[];
|
|
16
|
+
};
|
|
17
|
+
export declare function partitionCandidates<T extends {
|
|
18
|
+
rejections?: Array<unknown> | null;
|
|
19
|
+
movie?: {
|
|
20
|
+
id?: number;
|
|
21
|
+
} | null;
|
|
22
|
+
series?: {
|
|
23
|
+
id?: number;
|
|
24
|
+
} | null;
|
|
25
|
+
episodes?: Array<{
|
|
26
|
+
id?: number;
|
|
27
|
+
}> | null;
|
|
28
|
+
}>(items: T[]): ImportPartition<T>;
|
|
29
|
+
export declare function formatRejections(rejections: Array<unknown> | null | undefined): string;
|
|
30
|
+
//# sourceMappingURL=manual-import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual-import.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/manual-import.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAQV;AAED,wBAAgB,aAAa,CAC3B,CAAC,SAAS;IACR,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,EACD,KAAK,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,OAAO,GAAG,CAAC,EAAE,CAG1C;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC/B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,SAAS,EAAE,CAAC,EAAE,CAAC;CAChB,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,CAAC,SAAS;IACR,UAAU,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;CAC1C,EACD,KAAK,EAAE,CAAC,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,CAoBhC;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAWtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radarr.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/radarr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radarr.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/radarr.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAgB7C,eAAO,MAAM,SAAS,EAAE,WAAW,EAwuBlC,CAAC;AAEF,eAAO,MAAM,MAAM,qDAKlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonarr.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sonarr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sonarr.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sonarr.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAgB7C,eAAO,MAAM,SAAS,EAAE,WAAW,EA4yBlC,CAAC;AAEF,eAAO,MAAM,MAAM,qDAKlB,CAAC"}
|