- Rust 75.3%
- Lua 18.3%
- HTML 6.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Ani-term
Find anime on AniList, watch in mpv, and pick up from your last episode.
Quick start
Install Rust 1.89+ and mpv, and put mpv on your PATH. From this repository, run:
cargo run --locked
Search for a title, pick an episode, and the video opens in mpv. Ani-term resolves the HiAnime stream itself (the same ZokoAnime source the official ani-cli uses).
Open Settings to choose your preferred audio and subtitle language. HiAnime playback in mpv starts with your preferred subtitle language, falls back to English, and starts with subtitles off if neither is available. Audio defaults to SUB. If an episode lacks your selected audio, Ani-term asks which available version to use for the rest of the session.
Ani-term ▸ mpv ▸
↑ ↓ Move Enter Select Esc Back
◆ Main menu
❯ Search anime
Watch history
Favorites
Settings
Continue Initial D 1st Stage · after ep. 1
Exit
Continue appears after your first playback and opens the next available episode. If AniList and HiAnime use different names and the match is ambiguous, pick the corresponding title once. Ani-term remembers your choice.
Controls
| Where | Action | Control |
|---|---|---|
| Terminal | Move, select, or go back | ↑ / ↓, Enter, Esc |
| Long lists | Filter titles or episodes | Type part of a title or an episode number |
| mpv | Previous episode | Previous or Ctrl+← |
| mpv | Open the episode picker | Episodes or Ctrl+E |
| mpv | Next episode | Next or Ctrl+→ |
| mpv | Choose an available resolution | Quality |
| mpv | Choose a subtitle track or turn subtitles off | Subtitles |
Move the mouse to show episode controls in the top-left corner of mpv. They follow mpv's auto-hide timeout in both windowed and fullscreen playback. Switching episodes opens a new mpv window. Quality and subtitle changes apply to the currently playing episode. The on-screen menus need an mpv build with mp.input.select.
From Watch history or Favorites, you can replay, advance, or browse episodes for a title you've watched. Use the title menu to add or remove a favorite. Set NO_COLOR=1 for a monochrome terminal.
Playback modes
| Mode | Command | Where it plays |
|---|---|---|
| Default | cargo run --locked |
mpv, with the HiAnime stream and subtitles |
| Browser | cargo run --locked -- --browser |
The provider's episode page |
| Custom API | Set API_BASEURL and run either command |
mpv directly or the local browser player |
Custom provider
Set API_BASEURL in your shell or in a .env file at the repository root.
API_BASEURL=https://your-provider.example
The provider must implement /anime/info/{id}, /anime/servers/{episodeId}, and /anime/sources. Ani-term uses your preferred audio when available and asks you to pick a server before playback. The custom API mode uses those choices when switching episodes and can send the source directly to mpv.
With --browser and a custom API, open the local player at http://localhost:5000/. It includes previous and next buttons and an episode dropdown. Stop the local player with Ctrl+C.
Local data
The library holds your favorites, title matches, and up to 50 recently played episodes. The path is $XDG_DATA_HOME/ani-cli/library.json, with ~/.local/share/ani-cli/library.json as the default.
mpv playback enters history after the player exits successfully. The local browser player reports when video starts. For playback on the provider's website, enter y in the terminal to confirm.
Development
cargo fmt --check
cargo clippy --locked -- -D warnings
cargo test --locked