feat(yarr): restructure into workspace with separate API and CLI crates
Some checks failed
build / checks-matrix (push) Has been cancelled
build / checks-build (push) Has been cancelled
build / codecov (push) Has been cancelled
docs / docs (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-10-08 17:02:34 +05:30
parent e9ecd2a295
commit 03fd2de38f
17 changed files with 803 additions and 148 deletions

View File

@@ -1,9 +1,16 @@
# Yarr
A Terminal User Interface (TUI) for managing Sonarr.
A Terminal User Interface (TUI) for managing Sonarr, built as a Rust workspace with separate API client library.
> ✨ **Note**: This project was fully vibe coded with AI assistance, showcasing modern development workflows and comprehensive feature implementation.
## Project Structure
This workspace contains two crates:
- **`yarr-api`** - A standalone Rust library for interacting with the Sonarr API
- **`yarr-cli`** - The main TUI application that uses the API library
## Features
- View system status and health
@@ -17,8 +24,19 @@ A Terminal User Interface (TUI) for managing Sonarr.
## Installation
### Install the TUI Application
```bash
cargo install --path .
cargo install --path yarr-cli
```
### Use the API Library
Add to your `Cargo.toml`:
```toml
[dependencies]
yarr-api = { path = "yarr-api" }
```
## Configuration
@@ -210,6 +228,50 @@ This eliminates the need to manually edit config files for basic setup.
3. Find the "Security" section
4. Copy the "API Key" value
## API Library Usage
The `yarr-api` crate can be used independently in your own projects:
```rust
use yarr_api::{SonarrClient, Result};
#[tokio::main]
async fn main() -> Result<()> {
let client = SonarrClient::new(
"http://localhost:8989".to_string(),
"your-api-key".to_string()
);
let series = client.get_series().await?;
println!("Found {} series", series.len());
Ok(())
}
```
See the [yarr-api README](yarr-api/README.md) for detailed API documentation and examples.
## Development
### Building the Workspace
```bash
# Build all crates
cargo build
# Build just the CLI
cargo build -p yarr
# Build just the API library
cargo build -p yarr-api
# Run tests
cargo test
# Run the API library example
cargo run --example basic_usage
```
## License
MIT