Skip to content

CLI Reference

Charlie edited this page Jul 22, 2026 · 2 revisions

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
-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.

search

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"

Show IDs

The scriptable commands do not search anime names. They require the ID returned by search or present after /anime/ in a Mkissa URL:

https://mkissa.to/anime/SyR2K6bGYfKSE6YMm
                        └──── show ID ────┘

--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.

links

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.

Diagnostics and maintenance

ani-cli-rs debug
ani-cli-rs debug --refresh
ani-cli-rs refresh-cipher-map
ani-cli-rs update --check
ani-cli-rs update

debug reports active/fallback AllAnime crypto material. Treat its output as diagnostic information and avoid combining it with private network logs. refresh-cipher-map downloads and validates the latest substitution table from upstream Bash ani-cli.

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.

Clone this wiki locally