TypeScript-arr (pronounced "Tsar" /tsɑr/ - a Slavic king/emperor)
A Radarr CLI, Sonarr CLI, and type-safe TypeScript SDK for the entire Servarr ecosystem.
Tsarr is a unified command-line tool and TypeScript SDK for managing Radarr, Sonarr, Lidarr, Readarr, Prowlarr, and Bazarr. Auto-generated from official OpenAPI specs, it gives you type-safe API clients and a powerful CLI to manage your entire *arr media stack from code or the terminal.
# As a dependency (SDK)
npm install tsarr
# As a global CLI
npm install -g tsarr
# Or run directly without installing
npx tsarr doctor
bun add tsarr
bun add -g tsarr
bunx tsarr doctor
brew install robbeverhelst/tsarr/tsarr
Install the published OpenClaw skill to manage your Servarr stack through TsArr:
openclaw clawhub install tsarr
# or with the registry CLI
clawhub install tsarr
Download standalone binaries from GitHub Releases — no runtime needed:
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | tsarr-darwin-arm64 |
| macOS (Intel) | tsarr-darwin-x64 |
| Linux (x64) | tsarr-linux-x64 |
| Linux (arm64) | tsarr-linux-arm64 |
| Windows (x64) | tsarr-windows-x64.exe |
# Example: Linux x64
curl -L https://github.com/robbeverhelst/tsarr/releases/latest/download/tsarr-linux-x64 -o tsarr
chmod +x tsarr
sudo mv tsarr /usr/local/bin/
docker run --rm ghcr.io/robbeverhelst/tsarr doctor
docker run --rm -v ~/.config/tsarr:/root/.config/tsarr ghcr.io/robbeverhelst/tsarr radarr movie list
Note: Requires adding the tsarr bucket first.
scoop bucket add tsarr https://github.com/robbeverhelst/scoop-tsarr
scoop install tsarr
Note: Chocolatey packaging is prepared but may still be pending moderation. See docs/distribution.md.
choco install tsarr
yay -S tsarr-bin
Install the repo flake directly:
nix profile install github:robbeverhelst/tsarr?dir=packaging/nix
# or run it without installing
nix run github:robbeverhelst/tsarr?dir=packaging/nix -- doctor
The committed flake under packaging/nix/flake.nix tracks the latest published release. Shared nixpkgs distribution still requires a maintainer submission. See docs/distribution.md for the full distribution flow.
# Interactive setup wizard
tsarr config init
# Or configure manually
tsarr config set services.radarr.baseUrl http://localhost:7878
tsarr config set services.radarr.apiKey your-api-key
# Or use environment variables
export TSARR_RADARR_URL=http://localhost:7878
export TSARR_RADARR_API_KEY=your-api-key
Config is stored in ~/.config/tsarr/config.json (global) or .tsarr.json (local project). Environment variables take priority over config files.
tsarr <service> <resource> <action> [options]
# Examples
tsarr radarr movie list
tsarr radarr movie search --term "Interstellar"
tsarr sonarr series list
tsarr prowlarr indexer list
tsarr lidarr artist search --term "Radiohead"
# Output formats
tsarr radarr movie list --table # Table (default in terminal)
tsarr radarr movie list --json # JSON (default when piped)
tsarr radarr movie list --quiet # IDs only
# Diagnostics
tsarr doctor # Test all configured connections
# Shell completions
tsarr completions bash >> ~/.bashrc
tsarr completions zsh >> ~/.zshrc
tsarr completions fish > ~/.config/fish/completions/tsarr.fish
| Service | Resources |
|---|---|
radarr |
movie, profile, tag, queue, rootfolder, system, history, customformat |
sonarr |
series, episode, profile, tag, rootfolder, system |
lidarr |
artist, album, profile, tag, rootfolder, system |
readarr |
author, book, profile, tag, rootfolder, system |
prowlarr |
indexer, search, app, tag, system |
bazarr |
series, movie, episode, provider, language, system |
See the CLI Guide for full documentation including all commands, scripting examples, and shell completions.
import { RadarrClient, SonarrClient, LidarrClient } from 'tsarr';
const radarr = new RadarrClient({
baseUrl: 'http://localhost:7878',
apiKey: 'your-api-key'
});
// Type-safe API calls
const movies = await radarr.getMovies();
const status = await radarr.getSystemStatus();
// Import only what you need
import { RadarrClient } from 'tsarr/radarr';
import { SonarrClient } from 'tsarr/sonarr';
import type { MovieResource } from 'tsarr/radarr/types';
Install dependencies:
bun install
Run development server:
bun run dev
Build the project:
bun run build
Lint and format:
bun run lint
bun run format
Perfect for building:
Looking for a Radarr CLI or Sonarr API client? Here's how Tsarr compares:
| Feature | Tsarr | Manual API calls |
|---|---|---|
| Type safety | ✅ Full TypeScript types | ❌ None |
| All *arr apps | ✅ 6 apps in one package | ⚠️ DIY per app |
| CLI included | ✅ Built-in | ❌ No |
| Auto-generated | ✅ From official specs | ❌ Manual |
| Runtime | Node.js / Bun / standalone | curl |
| Package managers | npm, Homebrew, Docker, AUR, Nix, Scoop | N/A |
This project uses:
MIT - see LICENSE file for details.
Search terms: radarr cli · sonarr cli · lidarr cli · readarr cli · prowlarr cli · bazarr cli · servarr api client · arr typescript · selfhosted media automation