Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/d4suce/anime-cli

A cli tool to browse and play anime
https://github.com/d4suce/anime-cli

anime cli fzf ish linux mac posix rofi shell steamdeck syncplay terminal termux webscraping windows

Last synced: about 16 hours ago
JSON representation

A cli tool to browse and play anime

Awesome Lists containing this project

README

        











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

## Table of Contents

- [Fixing errors](#fixing-errors)
- [Install](#install)
- [From Source](#installing-from-source)
- [Tier 1: Linux, Mac, Android](#tier-1-support-linux-mac-android)
- [Tier 2: WSL, iOS, FreeBSD](#tier-2-support-wsl-ios-freebsd)
- [Uninstall](#uninstall)
- [Completion](#completion)
- [bash](#bash)
- [zsh](#zsh)
- [Dependencies](#dependencies)
- [anime-skip](#anime-skip)
- [FAQ](#faq)

## Fixing errors

If you encounter `No results found` (and are sure the prompt was correct) or any breaking issue, then make sure you are on **latest version** by typing
`sudo anime-cli -U` to update on Linux, Mac and Android. On Windows, run `anime-cli -U`.
If after this the issue persists then open an issue.

## Install

[![Packaging status](https://repology.org/badge/vertical-allrepos/ani-cli.svg?minversion=4.0)](https://repology.org/project/anime-cli/versions)

### Installing from source

*This method works for any unix-like operating system and is a baseline for porting efforts.*

Install dependencies [(See below)](#dependencies)

```sh
git clone "https://github.com/D4SuCE/anime-cli.git"
sudo cp anime-cli/anime-cli /usr/local/bin
sudo chmod +x /usr/local/bin/anime-cli
```

### Tier 1 Support: Linux, Mac, Android

*These Platforms have rock solid support and are used by maintainers and large parts of the userbase.*

Linux

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

Arch

```sh
git clone "https://github.com/D4SuCE/anime-cli.git"
./anime-cli/install.sh
```

MacOS

Install dependencies [(See below)](#dependencies)

Install [HomeBrew](https://docs.brew.sh/Installation) if not installed.

```sh
git clone "https://github.com/D4SuCE/anime-cli.git" && cd ./anime-cli
cp ./anime-cli "$(brew --prefix)"/bin
cd .. && rm -rf ./anime-cli
```

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

```sh
brew install curl grep aria2 ffmpeg git fzf yt-dlp jq && \
brew install --cask iina
```
*Why iina and not mpv? Drop-in replacement for mpv for MacOS. Integrates well with OSX UI. Excellent support for M1. Open Source.*

Android

Install termux [(Guide)](https://termux.com/)

#### Termux package

```sh
git clone "https://github.com/D4SuCE/anime-cli.git"
cp anime-cli/anime-cli /usr/local/bin
chmod +x /usr/local/bin/anime-cli
```

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.

### Tier 2 Support: WSL, iOS, FreeBSD

*While officially supported (except FreeBSD), installation is more involved on these platforms and sometimes issues arise. \
Reach out if you need help.*
WSL

Follow the installation instructions of your Linux distribution.

Note that the media player (mpv or vlc) will need to be installed on Windows, not WSL.

When installing the media player on Windows, make sure that it is on the Windows Path. An easy way to ensure this is to download the media player with a package manager (on Windows, not WSL) such as scoop.

iOS

Install iSH and VLC from the app store.

Make sure apk is updated using
```apk update; apk upgrade```
then run this:
```sh
apk add grep sed curl fzf git aria2 ncurses patch
apk add ffmpeg jq
git clone "https://github.com/D4SuCE/anime-cli.git"
cp anime-cli/anime-cli /usr/local/bin
chmod +x /usr/local/bin/anime-cli
```
note that downloading is going to be very slow. This is an iSH issue, not an anime-cli issue.

FreeBSD

#### Copypaste script:

```sh
sudo pkg install mpv fzf aria2 yt-dlp patch git jq
git clone "https://github.com/D4SuCE/anime-cli.git"
sudo cp anime-cli/anime-cli /usr/local/bin
sudo chmod +x /usr/local/bin/anime-cli
```

#### Installation in steps:

##### Install dependencies:

```sh
sudo pkg install mpv fzf aria2 yt-dlp patch jq
```

##### Install anime-cli:

install git if you haven't already

```sh
sudo pkg install git
```

install from source:

```sh
git clone "https://github.com/D4SuCE/anime-cli.git"
sudo cp anime-cli/anime-cli /usr/local/bin
sudo chmod +x /usr/local/bin/anime-cli
```

## Uninstall

* Linux:
```sh
sudo rm "/usr/local/bin/anime-cli"
```
* Mac:
```sh
rm "$(brew --prefix)/bin/anime-cli"
```
* Android:
```sh
rm "$PREFIX/bin/anime-cli"
```
* iOS
```sh
rm -rf /usr/local/bin/anime-cli
```
To uninstall other dependencies:
```sh
apk del grep sed curl fzf git aria2 ffmpeg ncurses jq
```

## Completion

### bash

To add tab completions using bash run the following command inside the anime-cli directory
```sh
cp _anime-cli-bash /path/to/your/completions
echo "source /path/to/your/completions/_anime-cli-bash" >> ~/.bashrc
```

### zsh

To add tab completions using zsh run the following command inside the anime-cli directory
```sh
cp _anime-cli-zsh /path/to/your/completions
echo "source /path/to/your/completions/_anime-cli-zsh" >> ~/.zshrc
```

## Dependencies

- grep
- sed
- curl
- mpv - Video Player
- iina - mpv replacement for MacOS
- aria2c - Download manager
- yt-dlp - m3u8 Downloader
- ffmpeg - m3u8 Downloader (fallback)
- fzf - User interface
- jq - Parsing json
- anime-skip (optional)
- patch - Self updating

### Anime-skip

Anime-skip is a script to automatically skip anime opening sequences, making it easier to watch your favorite shows without having to manually skip the intros each time.

Anime-skip uses the external lua script function of mpv and as such – for now – only works with mpv.

Linux

```sh
git clone "https://github.com/D4SuCE/anime-cli.git"
sudo cp anime-cli/anime-skip /usr/local/bin
sudo chmod +x /usr/local/bin/anime-skip
mkdir -p ~/.config/mpv/scripts
cp skip.lua ~/.config/mpv/scripts
```

WSL

After installing mpv you need to copy the lua script to:

```sh
C:\Users\"UserName"\AppData\Roaming\mpv\scripts\
```

If you don't have a scripts folder, just create it.

## FAQ

* Can I change media source? - No (unless you can scrape that source yourself).
* Can I use vlc? - Yes, use `--vlc` or `export ANI_CLI_PLAYER=vlc`.
* Can I adjust resolution? - Yes, use `-q resolution`, for example `anime-cli -q 1080`.
* How can I download? - Use `-d`, it will download into your working directory.
* Can i change download folder? - Yes, set the `ANI_CLI_DOWNLOAD_DIR` to your desired location.
* How can I bulk download? - `Use -d -e firstepisode-lastepisode`, for example `anime-cli onepiece -d -e 1-1000`.

**Note:** All features are documented in `anime-cli --help`.