docs: improve CLI help, shell completion, and README

- Add command groups (Getting Started, Search, Downloads, Daemon, System)
- Add shell completion command (bash, zsh, fish, powershell)
- Add flag completions for --type, --quality, --sort, --lang, --genre,
  --country, --method, --player
- Improve Long descriptions and Examples for all commands
- Split doctor disk check into platform-specific files (Unix/Windows)
- Validate infoHash length before truncating (prevent panic)
- Fix references to non-existent 'unarr daemon start' command
- Move stats command to System & Diagnostics group
- Rewrite README with complete documentation, correct config format
  (toml not yaml), all commands, shell completion section
This commit is contained in:
Deivid Soto 2026-03-28 21:36:27 +01:00
parent 197e33956a
commit 719429b06e
22 changed files with 973 additions and 119 deletions

View file

@ -23,7 +23,17 @@ func newSetupCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "setup",
Short: "First-time configuration wizard",
Long: "Interactive setup that configures API key, download directory, and preferred download method.",
Long: `Interactive setup that configures API key, download directory, and
preferred download method.
Opens your browser to create/copy your API key, then walks you through
choosing a download directory, method (torrent, debrid, usenet), and
device name. Validates the API key against the server before saving.
Run this once after installing unarr. To change settings later,
use 'unarr config' or edit ~/.config/unarr/config.toml directly.`,
Example: ` unarr setup
unarr setup --api-url https://custom.server.com`,
RunE: func(cmd *cobra.Command, args []string) error {
return runSetup(apiURL)
},
@ -238,7 +248,7 @@ func runSetup(apiURLOverride string) error {
}
cyan.Printf(" Available: %s\n", strings.Join(features, ", "))
fmt.Println()
fmt.Println(" Next: run", bold.Sprint("unarr daemon start"), "to begin downloading")
fmt.Println(" Next: run", bold.Sprint("unarr start"), "to begin downloading")
fmt.Println()
return nil