Skip to main content

Watch anime from your terminal

Project description

Requirements

  • python must be installed (if you're on windows, go to microsoft store or something to install it)

Check by running:

python --version
  • mpv must be installed

Check by running:

mpv --version

On Linux, mpv can be installed using your package manager (or it might already be installed).

On Windows, it's gonna be a bit difficult.

You can try to download mpv just from the offical site.

Here are the steps we used:

  1. Went to https://github.com/shinchiro/mpv-winbuild-cmake/releases
  2. Extract it to a folder somewhere
  3. Add it as an environmental variable following this tutorial
  4. Check that it works by doing mpv --version, if not, find another tutorial (sorry, Windows kinda sucks for developing)

(Optional) for downloading anime

  • ffmpeg must be installed
ffmpeg -version

On linux, you know what to do. Idk how you'd install it on windows tho.

  • yt-dlp must be installed
yt-dlp -version

I would honestly just install the binaries (executable) and add it to path for both linux and windows.

Usage

Watch anime

It's very easy to try it out using uv.

uvx --from anime-from-terminal anime

And there you go!

Otherwise, simply install it using pip

pip install anime-from-terminal

Now run:

anime

Download anime

Download a whole anime season in one command (with subs too).

First, create a directory where you want all the episodes to be stored in and cd into it.

mkdir baan
cd baan

Now just run

uvx --from anime-from-terminal anime_dl --search "baan" --type "sub"

Enjoy.

A handy command to sort the episodes:

perl-rename 's/Ep\. (\d+): Episode \1/"Ep. ".sprintf("%04d",$1).": Episode ".sprintf("%04d",$1)/e' *.mkv

Clanker Support!

Watch anime through MCP! Connect to an AI agent and let pull up the anime for you.

Start the mcp server:

uvx --from anime-from-terminal mcp --host 0.0.0.0 --port 6969

Connect to the mcp server through an mcp client. For example, in opencode, edit the ~/.config/opencode/opencode.json and input:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "anime-from-terminal": {
      "command":["uvx", "--from", "anime-from-terminal", "mcp"]
      "type": "remote",
      "enabled": true,
      "url": "http://localhost:6767/mcp",
    }
  }
}

About

This is simply a cli front end for the hi-anime scraping API by @f4rh4d-4hmed this is their repo.

TODO

  • Write all the api interfaces
    • searching (also continuously fetches until there's no more next page)
    • getting episodes
    • getting servers
    • fetching the stream data
  • Figure out a way to query using iterfzf correctly
  • Figure out all the prompt and the flow of the program
  • Handle errors
  • Kinda wanna implement an mcp server for the api too (but that's for another time)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anime_from_terminal-1.2.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anime_from_terminal-1.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file anime_from_terminal-1.2.0.tar.gz.

File metadata

  • Download URL: anime_from_terminal-1.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for anime_from_terminal-1.2.0.tar.gz
Algorithm Hash digest
SHA256 97608cd6861192b3b57db40dbcab5b150c114326b6299f8f1041c8be4ac5c495
MD5 3583fdecaca6fe87ba768c66ddec8a18
BLAKE2b-256 cc41d6a18f89c6e5e5fa0ee3aac6b6de8ee8842f64e3424ca8221e8b2e7b2c6f

See more details on using hashes here.

File details

Details for the file anime_from_terminal-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for anime_from_terminal-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40577b0d8acbcd581dd2bec4f90f4bea9e5a17107e389b6c3c3f71b89dce930c
MD5 f151fb4005794bcc4d4b026f8d3218b2
BLAKE2b-256 cbabb5188299810a9c1c68d3934c28c94e8875f82cc3884e751c1d54c75ac5b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page