npm 中文文档 npm 中文文档
指南
npmjs.com (opens new window)
指南
npmjs.com (opens new window)
  • 快速入门

    • npm 是什么?
    • npm 安装和更新
    • npm 防止权限错误
    • npm package.json 文件
    • npm 安装包
    • npm 更新包
    • npm 卸载包
    • npm 创建 Node.js 模块
    • npm 发布和更新包
    • npm 使用语义化版本
    • npm 使用 Dist-tags 标记包
    • npm 包和模块的了解
  • 命令行
  • 配置 npm


A cli to browse and watch anime (alone AND with friends). This tool scrapes the site allanime.

Showcase

ani-cli-demo.webm## Table of Contents

Fixing errors
Install
Linux
Debian
Fedora
Arch
OpenSuse Tumbleweed and Leap
From source
MacOS
Windows
Android
Steam Deck
iOS

Uninstall
Dependencies
Homies
Contribution Guidelines
Disclaimer

Fixing errors


If you encounter "Video url not found" or any breaking issue, then make sure you are on latest version by typing sudo ani-cli -U to update on Linux, Mac and Android. On Windows, run gitbash as administrator then there type ani-cli -U. If after this the issue persists then open an issue.

History has been reworked and relocated. We're working on a transition script, please be patient. Old history can be viewed with less ${XDG_CACHE_HOME:-$HOME/.cache}/ani-hsts

Install


Users of V3.2 or the v3.2.x series should uninstall before upgrading


Otherwise you're likely to see an error like the following: "/usr/bin/ani-cli: line 470: (...)/player_mpv: No such file or directory"

Native packages


Native packages have a more robust update cycle, but sometimes they are slow to upgrade. If the one for your platform is up-to-date we suggest going with it.

Linux


Debian unstable


  1. ``` shell
  2. sudo apt install ani-cli
  3. ```

Fedora


To install mpv (and vlc) you need RPM Fusion freeenabled. Simply follow the instructions here: https://rpmfusion.org/Configuration To be able to install syncplay, you'll need to enable this copr repo (instructions included): https://copr.fedorainfracloud.org/coprs/batmanfeynman/syncplay/.

To install ani-cli:

  1. ``` shell
  2. sudo dnf copr enable derisis13/ani-cli
  3. sudo dnf install ani-cli
  4. ```

If for your distro uses rpm and you would like to see a native package, open an issue.

Arch


Build and install from the AUR:

  1. ``` shell
  2. yay -S ani-cli
  3. ```

Also consider ani-cli-git

Gentoo


Build and install from the GURU:

  1. ``` shell
  2. sudo eselect repository enable guru
  3. sudo emaint sync -r guru
  4. sudo emerge -a ani-cli
  5. ```

Consider using the 9999 ebuild.

  1. ``` shell
  2. sudo emerge -a =app-misc/ani-cli-9999
  3. ```

OpenSuse Tumbleweed and Leap


On Suse the provided MPV and VLC packages are missing features that are used by ani-cli. The only required is the "Only Essentials" repository which has versions for each Suse release. You can find instructions on this here.

To add the ani-cli copr repo, update then install ani-cli run (on both versions):

  1. ``` shell
  2. zypper addrepo https://download.copr.fedorainfracloud.org/results/derisis13/ani-cli/opensuse-tumbleweed-x86_64/ ani-cli
  3. zypper dup
  4. zypper install ani-cli
  5. ```

You'll get a warning about Signature verification failed [4-Signatures public key is not available] but this can be ignored from the prompt.

Note: package is noarch, so any architecture should work, even though the repo is labelled x86-64

Installing from source


Install dependencies (See below)

  1. ``` shell
  2. sudo rm -rf "/usr/local/share/ani-cli" "/usr/local/bin/ani-cli" "/usr/local/bin/UI" /usr/local/bin/player_* #If some of these aren't found, it's not a problem
  3. git clone "https://github.com/pystardust/ani-cli.git"
  4. sudo cp ani-cli/ani-cli /usr/local/bin
  5. rm -rf ani-cli
  6. ```

MacOS


Install dependencies (See below)

Install HomeBrew if not installed.

  1. ``` shell
  2. rm -rf "$(brew --prefix)/share/ani-cli" "$(brew --prefix)/bin/ani-cli" "$(brew --prefix)/bin/UI" "$(brew --prefix)"/bin/player_* #If some of these aren't found, it's not a problem
  3. git clone "https://github.com/pystardust/ani-cli.git" && cd ./ani-cli
  4. cp ./ani-cli "$(brew --prefix)"/bin
  5. cd .. && rm -rf ./ani-cli
  6. ```

To install (with Homebrew) the dependencies required on Mac OS, you can run:

  1. ``` shell
  2. brew install curl grep aria2 ffmpeg git fzf && \
  3. brew install --cask iina
  4. ```

Why iina and not mpv? Drop-in replacement for mpv for MacOS. Integrates well with OSX UI. Excellent support for M1. Open Source.

Windows


ani-cli needs a posix shell and the current way is git bash. Unfortunately fzf can't run in git bash's default terminal. The solution is to use git bash in windows terminal

First, you'll need windows terminal preview. (Install)

Then make sure git bash is installed. (Install) It needs to be added to windows terminal (Instructions)

The following steps and ani-cli need to be run from git bash in windows terminal.

Scoop bucket


  1. ``` shell
  2. scoop bucket add extras
  3. scoop install ani-cli
  4. ```

From source


  1. ``` shell
  2. rm -rf "/usr/local/share/ani-cli" "/usr/local/bin/ani-cli" "/usr/local/bin/UI" /usr/local/bin/player_* #If some of these aren't found, it's not a problem
  3. git clone "https://github.com/pystardust/ani-cli.git"
  4. cp ani-cli/ani-cli /usr/bin
  5. rm -rf ani-cli
  6. ```

Dependencies


All dependencies can be installed with scoop (from the extras bucket), however some users experienced that installed programs aren't always added to the path. If this happens installing from winget instead usually works.

Note that curl can cause issues. ani-cli has been tested unsuccessfully with curl 7.83.1 and successfully with 7.86.0. If you run into issues, try the scoop install or grab the newest curl you can find.

Android


Install termux (Guide)

Termux package


  1. ``` shell
  2. pkg up -y
  3. pkg install ani-cli
  4. ```

From source


  1. ``` shell
  2. pkg up -y
  3. rm -rf "$PREFIX/share/ani-cli" "$PREFIX/bin/ani-cli" "$PREFIX/bin/UI" "$PREFIX"/local/bin/player_* #If some of these aren't found, it's not a problem
  4. git clone "https://github.com/pystardust/ani-cli.git"
  5. cp ani-cli/ani-cli "$PREFIX"/bin
  6. rm -rf ani-cli
  7. ```

For players you can use the apk (playstore/fdroid) versions of mpv and vlc. Note that these cannot be checked from termux so a warning is generated when checking dependencies.

iOS


Install iSH and VLC from the app store.

Make sure apk is updated using apk update; apk upgrade then run this:

  1. ``` shell
  2. apk add grep sed curl fzf git aria2 alpine-sdk ncurses
  3. git clone https://github.com/Lockl00p/ffmpeglibs-iSH.git ~/ffmpeg
  4. cd ~/ffmpeg
  5. cat fmp.?? > ffmpeg.tar.gz
  6. tar -xvf ffmpeg.tar.gz
  7. cd FFmpeg
  8. make install
  9. cd
  10. rm -rf ffmpeg
  11. apk add ffmpeg
  12. git clone https://github.com/pystardust/ani-cli ~/.ani-cli
  13. cp ~/.ani-cli/ani-cli /usr/local/bin/ani-cli
  14. chmod +x /usr/local/bin/ani-cli
  15. rm -rf ~/.ani-cli
  16. ```

note that downloading is going to be very slow. This is an iSH issue, not an ani-cli issue.

Steam Deck


Copypaste script:


Switch to Desktop mode (STEAM Button > Power > Switch to Desktop)
Open Konsole (Steam Deck Icon in bottom left corner > System > Konsole)
Copy the script, paste it in the CLI and press Enter("A" button on Steam Deck)

  1. ``` shell
  2. [ ! -d ~/.local/bin ] && mkdir ~/.local/bin && echo "export $PATH=$HOME/.local/bin:$PATH" >> ".$(echo $SHELL | sed -nE "s|.*/(.*)\$|\1|p")rc"

  3. git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
  4. ~/.fzf/install

  5. mkdir ~/.aria2c
  6. curl -o ~/.aria2c/aria2-1.36.0.tar.bz2 https://github.com/q3aql/aria2-static-builds/releases/download/v1.36.0/aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2
  7. tar xvf ~/.aria2c/aria2-1.36.0.tar.bz2 -C ~/.aria2c/
  8. cp ~/.aria2c/aria2-1.36.0-linux-gnu-64bit-build1/aria2c ~/.local/bin/
  9. chmod +x ~/.local/bin/aria2c

  10. git clone https://github.com/pystardust/ani-cli.git ~/.ani-cli
  11. cp ~/.ani-cli/ani-cli ~/.local/bin/

  12. flatpak install io.mpv.Mpv
  13. ```

press enter("A" button on Steam Deck) on questions

Installation in steps:


Install mpv (Flatpak version):

  1. ``` shell
  2. flatpak install io.mpv.Mpv
  3. ```

press enter("A" button on Steam Deck) on questions

Install fzf:

  1. ``` shell
  2. git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
  3. ~/.fzf/install
  4. ```

press enter("A" button on Steam Deck) on questions

Make a ~/.local/bin folder if doesn't exist and add it to $PATH

  1. ``` shell
  2. [ ! -d ~/.local/bin ] && mkdir ~/.local/bin && echo "export $PATH=$HOME/.local/bin:$PATH" >> ".$(echo $SHELL | sed -nE "s|.*/(.*)\$|\1|p")rc"
  3. ```

Install aria2 (needed for download feature only):

  1. ``` shell
  2. mkdir ~/.aria2c
  3. curl -o ~/.aria2c/aria2-1.36.0.tar.bz2 https://github.com/q3aql/aria2-static-builds/releases/download/v1.36.0/aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2
  4. tar xvf ~/.aria2c/aria2-1.36.0.tar.bz2 -C ~/.aria2c/
  5. cp ~/.aria2c/aria2-1.36.0-linux-gnu-64bit-build1/aria2c ~/.local/bin/
  6. chmod +x ~/.local/bin/aria2c
  7. ```

Install ani-cli:

  1. ``` shell
  2. git clone https://github.com/pystardust/ani-cli.git ~/.ani-cli
  3. cp ~/.ani-cli/ani-cli ~/.local/bin/
  4. ```

Optional: add desktop entry:

  1. ``` sh
  2. echo '[Desktop Entry]
  3. Encoding=UTF-8
  4. Version=4.0
  5. Type=Application
  6. Exec=konsole -e ani-cli
  7. Name=ani-cli' > ~/.local/share/applications/ani-cli.desktop

  8. ```

The .desktop entry will allow to start ani-cli in Konsole directly from "Gaming Mode" In Steam Desktop app: Add game > Add a non-steam game > tick a box for ani-cli > Add selected programs Note: Konsole window size bugs out if launched from "Gaming Mode".Note: this is not working the way it should yet.

Uninstall


apt:

  1. ``` shell
  2. sudo apt remove ani-cli
  3. # to remove the repository from apt
  4. sudo rm -f /etc/apt/trusted.gpg.d/ani-cli.asc /etc/apt/sources.list.d/ani-cli-debian.list
  5. ```

dnf:

  1. ``` shell
  2. sudo dnf remove ani-cli      # for ani-cli
  3. # disable the repo in dnf
  4. dnf copr disable derisis13/ani-cli
  5. ```

You might want to uninstall RPM fusion if you don't use it otherwise

zypper:

  1. ``` shell
  2. zypper remove ani-cli
  3. zypper removerepo ani-cli
  4. ```

You might want to remove packman-essentials if you don't need it otherwise

AUR:

  1. ``` shell
  2. yay -R ani-cli
  3. ```

Scoop:

  1. ``` shell
  2. scoop uninstall ani-cli
  3. ```

Linux:

  1. ``` shell
  2. sudo rm "/usr/local/bin/ani-cli"
  3. ```

Mac:

  1. ``` shell
  2. rm "$(brew --prefix)/bin/ani-cli"
  3. ```

Windows: In Git Bashrun (as administrator):

  1. ``` shell
  2. rm "/usr/bin/ani-cli"
  3. ```

Termux package

  1. ``` shell
  2. pkg remove ani-cli
  3. ```

Android:

  1. ``` shell
  2. rm "$PREFIX/bin/ani-cli"
  3. ```

Steam Deck

  1. ``` shell
  2. rm "~/.local/bin/ani-cli"
  3. rm -rf ~/.ani-cli
  4. ```

optionally: remove dependencies:

  1. ``` shell
  2. rm ~/.local/bin/aria2c
  3. rm -rf "~/.aria2"
  4. rm -rf "~/.fzf"
  5. flatpak uninstall io.mpv.Mpv
  6. ```

iOS

  1. ``` sh
  2. rm -rf /usr/local/bin/ani-cli

  3. ```

To uninstall FFmpeg:

  1. ``` sh
  2. rm -rf /usr/local/lib/libavutil.a /usr/local/lib/libavcodec.a /usr/local/lib/libavformat.a /usr/local/lib/pkgconfig/libavutil.a /usr/local/lib/pkgconfig/libavcodec.a /usr/local/lib/pkgconfig/libavformat.a
  3. apk del ffmpeg

  4. ```

To uninstall other dependencies:

  1. ``` sh
  2. apk del grep sed curl fzf git aria2 alpine-sdk ncurses

  3. ```

Dependencies


grep
sed
curl
mpv - Video Player
iina - mpv replacement for MacOS
aria2c - Download manager
ffmpeg - m3u8 Downloader
fzf - User interface

Homies


animdl : Ridiculously efficient, fast and light-weight (supports most sources: allanime, zoro ... (Python)
jerry : stream anime with anilist tracking and syncing, with discord presence (Shell)
anipy-cli : ani-cli rewritten in python (Python)
saikou : Best android app for anime/manga with anilist integration (Kotlin)
mangal : Download & read manga from any source with anilist sync (Go)
lobster : Watch movies and series from the terminal (Shell)
mov-cli : Watch movies/shows in the cli (Python/Shell)
dra-cla : ani-cli equivalent for korean dramas (Shell)
redqu :  A media centric reddit client (Clojure)
Last Updated: 2023-06-26 08:28:31