Skip to content

CLI Reference

There are two interfaces:

  • Compatibility workflow: ani-cli-rs [OPTIONS] [QUERY]... searches by title and may prompt interactively.
  • Scriptable subcommands: search, episodes, links, play, and download use explicit arguments and stable text/JSON output.

Run ani-cli-rs --help or ani-cli-rs <COMMAND> --help for the authoritative help generated by the installed version.

Compatibility options

Option Meaning
-c, --continue Select the next unwatched episode from history
-d, --download Download instead of launching a player
-D, --delete Clear history and exit
-s, --syncplay Launch through Syncplay
-S, --select-nth N Select the one-based search/history result without a menu
-q, --quality VALUE best, worst, or a resolution such as 1080p
-v, --vlc Use VLC instead of mpv
-e, --episode VALUE Episode, whitespace-separated episodes, or range
-r, --range VALUE Alias for --episode
--multi-selection Open the multi-select episode picker directly
--dub Use the dubbed catalog
-a, --allow-adult Permit adult-marked search results
--no-detach Keep the player attached and wait for exit
--exit-after-play Treat an attached player's failure as a CLI failure
-N, --nextep-countdown Show release schedule and exit
-U, --update Install the latest release
-p, --provider VALUE Select anikoto (default) or anikoto2 (Anikoto.cz)
-V, --version Print the version

Options may appear before, between, or after query words where Clap can interpret them unambiguously.

Episode expressions

1
1 3 5
2-6
2-6 8 10.5
latest

Only episodes present in the selected show's catalog are accepted. Numeric and fractional values are ordered numerically.

ani-cli-rs search [--mode sub|dub] [--allow-adult] [--json] "QUERY"

Text output is tab-separated and begins with the show ID. JSON output is recommended for automation.

ani-cli-rs search --json "frieren"
ani-cli-rs --provider anikoto2 search --json "black torch"

Show IDs

The scriptable commands do not search anime names. They require the ID returned by search.

Anikoto API IDs begin with anikoto: and Anikoto.cz IDs begin with anikoto2:. Both route automatically. A raw numeric Anikoto API series ID is accepted with --provider anikoto; a raw Anikoto.cz slug is accepted with --provider anikoto2. --title changes a player title or output filename; it is not a search query.

episodes

ani-cli-rs episodes SHOW_ID [--mode sub|dub] [--json]

Prints available episode labels in numeric order.

ani-cli-rs links SHOW_ID EPISODE [--mode sub|dub] [-q QUALITY] [--json]

Without -q, all resolved links are returned in provider/quality preference order. JSON includes URLs, resolution, HLS status, provider, downloadability, and required request headers.

Resolved URLs may be signed and temporary. Do not publish complete JSON output in issues.

play

ani-cli-rs play SHOW_ID EPISODE [OPTIONS]

Options include --mode, -q/--quality, --title, --player, and --no-detach. --player is an executable path, not a shell command.

download

ani-cli-rs download SHOW_ID EPISODE [OPTIONS]

Options include --mode, -q/--quality, --title, and --output. This subcommand is intentionally non-interactive and downloads one episode. Use ani-cli-rs -d "title" for title, season, and multi-episode selection.

Maintenance

ani-cli-rs update --check
ani-cli-rs update

Exit behavior

  • Argument and validation errors return a non-zero exit code.
  • Scriptable commands never open fuzzy selectors.
  • Canceling an ordinary interactive menu is not treated as a crash.
  • Detached player startup success does not mean playback later succeeded.
  • --no-detach --exit-after-play allows an attached player failure to propagate.