tsarr
v1.9.0
Published
Type-safe TypeScript SDK for Servarr APIs (Radarr, Sonarr, etc.)
Maintainers
Readme
Tsarr
TypeScript-arr (pronounced "Tsar" /tsɑr/ - a Slavic king/emperor)
Type-safe TypeScript SDK for Servarr APIs (Radarr, Sonarr, etc.)
Tsarr provides type-safe TypeScript clients for all Servarr APIs, generated from their Swagger/OpenAPI specifications. Perfect for building automation tools, scripts, and applications to manage your media servers.
Features
- 🛡️ Type-safe - Generated from official Swagger/OpenAPI specs
- ⚡ Bun-optimized - Leverages native fetch API
- 📦 Modular - Separate clients for each Servarr app
Supported Servarr Apps
- Radarr - Movie collection manager
- Sonarr - TV series collection manager
- Lidarr - Music collection manager
- Readarr - Book collection manager
- Prowlarr - Indexer manager
Installation
bun add tsarrQuick Start
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();Development
Install dependencies:
bun installRun development server:
bun run devBuild the project:
bun run buildLint and format:
bun run lint
bun run format📖 Documentation
- API Documentation - Auto-generated TypeScript API docs
- Usage Guide - Complete usage documentation with examples
- Examples - Real-world automation examples
- Examples Directory - Runnable example scripts
Use Cases
Perfect for building:
- Automation scripts - Bulk movie imports, library maintenance, and media organization
- Management tools - Custom dashboards, backup utilities, and monitoring scripts
- Integration scripts - Connect Servarr apps with other services and workflows
- CLI tools - Command-line utilities for media server administration
Contributing
This project uses:
- Bun as the JavaScript runtime
- Biome for linting and formatting
- @hey-api/openapi-ts for code generation
- Renovate for dependency updates
License
MIT - see LICENSE file for details.
