# ARR Go Client A Go client for ARR applications (Radarr, Sonarr, etc.). ## Development with Nix This project uses Nix for dependency management and development environment setup. ### Prerequisites - [Nix](https://nixos.org/download.html) installed on your system - [direnv](https://direnv.net/) (optional, for automatic environment activation) ### Quick Start 1. **Enter the development shell:** ```bash nix develop ``` 2. **Run the application:** ```bash go run . ``` ### Development Commands Once in the Nix shell, you can use standard Go commands: ```bash # Run the application go run . # Run tests go test ./... # Clean up dependencies go mod tidy # Download dependencies go mod download # Build the binary go build -o arr-go-client . ``` ### Available Tools The Nix development environment includes: - **Go 1.23** - Latest stable Go version available in Nix ### Project Structure ``` arr-go-client/ ├── flake.nix # Nix flake configuration ├── .envrc # Direnv configuration (auto-loads Nix environment) ├── go.mod # Go module file ├── main.go # Main application ├── client.go # Client implementation ├── interfaces.go # Interface definitions ├── types.go # Type definitions └── radarr.go # Radarr-specific code ``` ### Troubleshooting #### Flake Lock Issues If you need to update the flake lock: ```bash nix flake update ``` #### Experimental Features Disabled If you get errors about experimental features being disabled, you can enable them globally: 1. **Edit your global Nix config:** ```bash mkdir -p ~/.config/nix echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf ``` 2. **Or run with explicit experimental features:** ```bash nix --extra-experimental-features 'nix-command flakes' develop ``` ### Contributing 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Test with `nix develop` and `go test ./...` 5. Submit a pull request ### License [Add your license here]