fzf to select titles and episodes and curl to fetch the required data.You enter the anime title, fzf shows the available matches, you choose one, select an episode, and mpv starts streaming it. No browser, no ads, no pop-ups, and no need to open multiple tabs just to find the next episode.
What ani-cli Actually Does
ani-cli is a shell script maintained by pystardust on GitHub. It searches a third-party streaming site, processes the results using tools like grep command and sed command, and sends the selected stream URL to your media player.
ani-cli does not host any videos itself. When you search for and play an anime, the video is streamed directly from the source site.
Dependencies ani-cli Needs
ani-cli is a lightweight script, but it relies on a few other tools to handle searching, downloading, and playback. Make sure these are installed before you start.
grepandsed– process the HTML and JSON responses from the source site.curl– fetch search results and episode information.mpv– play the video stream. On macOS, iina can be used instead.fzf– provides the interactive search and episode picker.yt-dlp– downloads episodes when you use the download option.ffmpeg– acts as a fallback downloader if yt-dlp can’t fetch a stream.patch– needed only when using ani-cli’s built-in self-update feature.
One tool worth knowing about is fzf. It’s a command-line fuzzy finder that turns a list of text into an interactive, searchable menu. That’s what gives ani-cli a simple interface instead of making you work through a long list of scraped links.
Installing ani-cli
The easiest way to install ani-cli depends on your Linux distribution, so use the method that matches your system.
On Debian 13 (unstable) and derivatives:
sudo apt install ani-cli
On Fedora:
Fedora requires RPM Fusion for mpv, followed by the maintainer’s COPR repository for ani-cli.
sudo dnf copr enable derisis13/ani-cli sudo dnf install ani-cli
On Arch and Arch-based distributions:
yay -S ani-cli
There is no official package for RHEL or Rocky Linux, and the project currently doesn’t support that family beyond the Fedora COPR build. If you’re using RHEL, Rocky Linux, Ubuntu outside the Debian unstable package, or another distribution without a native package, installing from source is the simplest option.
From source:
This method works on any distribution as long as the required dependencies are already installed.
git clone "https://github.com/pystardust/ani-cli.git" sudo cp ani-cli/ani-cli /usr/local/bin rm -rf ani-cli
Here’s what each command does:
git clone– downloads the ani-cli repository into a local directory.sudo cp– copies the script to/usr/local/bin, which is normally included in your$PATH.- rm -rf ani-cli — removes the cloned directory after the script has been copied.
The sudo command is needed because /usr/local/bin is usually owned by root. If you get a Permission denied error, make sure you’re using sudo and that your account has permission to use it.
After installation, check that ani-cli is available:
ani-cli --help
You should see output similar to this:
Usage:
ani-cli [options] [query]
ani-cli [query] [options]
ani-cli [options] [query] [options]
Options:
-c, --continue
Continue watching from history
-d, --download
Download the video instead of playing it
-D, --delete
Delete history
-s, --syncplay
Use Syncplay to watch with friends
-S, --select-nth
Select nth entry
-q, --quality
Specify the video quality
...
If this help message appears, ani-cli is installed correctly and is available from your $PATH. It also gives you a quick overview of the options you can use for streaming, downloading, selecting episodes, choosing video quality, and more.
Basic Usage
Run ani-cli without any arguments to open its interactive search prompt:
ani-cli
This opens an interactive search prompt. Type the name of an anime and press Enter. ani-cli uses fzf to display the search results, so you can move through the list with the arrow keys or start typing to narrow it down.
After selecting a title, ani-cli shows the available episodes. Choose an episode, and the selected stream is passed to mpv for playback.
You can also provide the anime title directly on the command line:
ani-cli "one piece"
This skips the initial search prompt and searches for the title immediately.
Keep in mind that ani-cli depends on an external source for its search results. If you see “No results found!” it doesn’t necessarily mean that the anime is unavailable or that you entered the title incorrectly. The upstream source can change, become temporarily unavailable, or block requests, which can cause searches to fail.
If you want to see the options available in your installed version, run:
ani-cli --help
For example, you can use -q to request a specific video quality, -e to select particular episodes, --dub to search for dubbed versions, or -v to use VLC instead of mpv.
The simplest workflow is therefore:
Search → Select anime → Select episode → Play
Once that basic workflow is working, you can use ani-cli’s other options to control quality, episode selection, playback, and downloading.
Setting Video Quality
Use -q followed by the resolution you want:
ani-cli -q 1080 "one piece"
ani-cli will try to use the requested quality when it is available. If that resolution isn’t available for an episode, it uses the best quality the source provides.
Switching to VLC
mpv is the default media player, but you can use VLC instead by adding the --vlc option:
ani-cli --vlc "one piece"
If you prefer VLC every time, you can set it as the default in your shell profile, such as ~/.bashrc or ~/.zshrc:
export ANI_CLI_PLAYER=vlc
After adding the variable, reload your shell profile or open a new terminal.
Downloading Episodes
Use -d when you want to download an episode instead of streaming it:
ani-cli -d "one piece"
By default, downloaded files are saved in the current working directory. You can set ANI_CLI_DOWNLOAD_DIR in your shell profile if you want to use a different download location.
Downloading Multiple Episodes
You can combine -d with -e to download a range of episodes:
ani-cli -d -e 1-50 "one piece"
Here:
-d– downloads the episodes instead of streaming them.-e 1-50– selects episodes 1 through 50."one piece"– specifies the anime you want to search for.
Downloading a large range can take a while, depending on your internet connection and the number of episodes, so start with a smaller range if you’re testing the feature.
Common Mistake: Cloudflare Blocking
If ani-cli shows Blocked by cloudflare. Try installing curl-impersonate, it means the source site is blocking requests made by regular curl. This can happen when the site detects that the request does not look like it came from a normal web browser.
Installing curl-impersonate can help because it makes curl behave more like a real browser when connecting to the site. You can install it through your distribution’s package manager if it’s available, or install it manually if your distribution doesn’t provide a package.
After installing it, run your ani-cli search again. If the source is accessible and the request is no longer blocked, the search should work normally.
Common Mistake: Stale Version Errors
ani-cli relies on a live website, so changes to the site’s structure can sometimes break things that were working before. If ani-cli suddenly stops working after an update to the source site, the first thing to try is updating ani-cli itself.
sudo ani-cli -U
Here, -U updates the local ani-cli script to the latest version available on GitHub. The update process uses the patch utility mentioned earlier.
On Windows, run the update without sudo. On other supported platforms, you may need sudo because ani-cli is usually installed in a system directory that requires root permissions to modify.
Keeping Intros Under Control
ani-cli doesn’t skip openings by itself. You can pair it with ani-skip to automatically skip intros and outros.
This works with mpv, because ani-skip relies on mpv’s Lua scripting support. It does not currently have a Windows-compatible build. You can find the installation instructions in the ani-skip repository.
Uninstalling ani-cli
How you remove ani-cli depends on how you installed it. If you installed it through a package manager, use the corresponding removal command:
sudo apt remove ani-cli
On Fedora:
sudo dnf remove ani-cli
On Arch-based distributions:
yay -R ani-cli
If you installed ani-cli from source, remove the script from /usr/local/bin:
sudo rm "/usr/local/bin/ani-cli"
That’s all you need to remove from a source installation. The dependencies you installed separately can stay on your system, since other command-line tools may use them.
Conclusion
ani-cli makes anime streaming from the terminal simple: search, choose an episode, and start watching. In this guide, you’ve learned how to install it on Debian, Fedora, and Arch, switch between subbed and dubbed versions, choose video quality and your preferred media player, and download individual episodes or a range of episodes with -e.
Give it a try with:
ani-cli -q 1080 --dub "your favorite show"
It’s a quick way to see how a terminal-based workflow compares with opening a browser, dealing with ads, and searching through multiple pages just to find an episode.
Have you run into the Cloudflare block or a stale-script error while using ani-cli? Share what fixed it for you in the comments. It might save someone else from going through the same troubleshooting process.






