Skip to content

Latest commit

Β 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎌 Anichi

Version Node License TypeScript

A Modern, Interactive CLI for Discovering, Streaming, and Managing Anime Directly from the Terminal

Built by Aditya K.

Features β€’ Installation β€’ Usage β€’ Setup Guide β€’ Troubleshooting β€’ License


🌟 Features

Anichi brings a premium anime streaming experience to your terminal with a focus on speed and aesthetics, powered by the ShivraAPI:

  • πŸ“‘ Powered by ShivraAPI: High-performance API integration (https://shivraapi.my.id/otd) providing fast, reliable, and up-to-date anime data including schedules, genres, and streaming links.
  • 🎨 Premium Modern UI: Gradient banners, elegant tables, ASCII art, and vibrant color themes powered by chalk, boxen, figlet, and gradient-string.
  • πŸ“‚ Comprehensive Browsing:
    • Ongoing Anime: Track currently airing series with release days and latest episodes.
    • Completed Anime: Explore finished series with ratings and scores.
    • Popular Anime: Discover trending and high-rated titles.
    • Search by Genre: Filter anime by categories (Action, Adventure, Comedy, etc.).
    • Anime Schedule: View broadcast schedule organized by day of the week.
    • Smart Search: Instantly search anime by title with detailed metadata.
  • πŸ“Ί Optimized Streaming:
    • Play episodes directly using MPV.
    • Browser Fallback: Automatic fallback to browser if MPV is unavailable.
  • ⬇️ Download Support:
    • Single Episode: Download with multiple resolution and provider options.
    • Batch Downloads: Download entire series with format/quality selection.
  • βš™οΈ Configuration & History:
    • Config Management: Customize player paths and arguments easily.
    • Watch History: Automatically tracks your recently watched episodes.
  • ⚑ Performance: Built-in intelligent caching with rate-limiting protection to ensure smooth API interactions.

πŸ› οΈ Tech Stack

Anichi is built with modern, efficient libraries:

  • Language: TypeScript 5.x
  • Runtime: Node.js 18+
  • Data Source: ShivraAPI - Open Anime Data API
  • CLI Framework: Commander.js
  • HTTP Client: Axios (with Node-Cache)
  • UI/Styling: chalk, cli-table3, boxen, gradient-string, figlet
  • Process Management: ora (spinners), open (cross-platform opener)
  • Video Player: Optimized for MPV with yt-dlp integration

πŸ“¦ Requirements

Before installing Anichi, ensure you have the following:

  1. Node.js version 18.0.0 or higher.
  2. MPV Player (Recommended for the best experience).
  3. yt-dlp (Required for MPV to stream video links).

πŸ’‘ Note: Without yt-dlp, MPV cannot open most streaming links, and Anichi will automatically fallback to your web browser.


πŸš€ Installation

Install via NPM

npm install -g anichi

Install via Yarn

yarn global add anichi

Verify Installation

anichi --version
# Output: 2.9.1

anichi --help
# Shows available commands

πŸ’» Usage

Launch Interactive Menu

Start the application:

anichi home or an home

This launches the interactive dashboard. Navigate using your keyboard arrow keys (↑/↓) and press Enter to select.

Command Line Options

Direct Playback

Skip the menu and play a specific episode immediately:

anichi play <slug> <episode>

Example:

anichi play one-piece 1070

Configuration Management

# View current config
anichi config show

# Set custom MPV path
anichi config set playerPath "C:\mpv\mpv.exe"

# Set MPV arguments (e.g., force fullscreen)
anichi config set playerArgs "--fullscreen"

Cache Management

Clear cached data to force fresh API fetches:

anichi cache clear

🎬 Menu Guide

1. πŸ”„ Ongoing Anime

Browse anime currently airing. Shows release day, latest episode, and air date.

  • Nav: n (Next), p (Prev), [number] (Select Anime).

2. βœ… Completed Anime

Browse finished series sorted by completion date and rating.

3. 🌟 Popular Anime

Discover top-rated and trending anime.

4. πŸ” Search Anime

Find anime by title.

  • Input: Type anime name (e.g., "Naruto").

5. 🎬 Search by Genre

Filter anime by specific categories (Action, Isekai, Slice of Life, etc.).

6. πŸ“… Schedule Anime

View the weekly broadcast schedule organized by day (Senin - Minggu).

7. πŸ•’ History Anime

View and resume your recently watched episodes.

8. ❓ FAQ

Built-in help guide for installation and troubleshooting.


πŸ› οΈ Setup Guide: MPV & yt-dlp

For the best experience, using MPV is highly recommended.

Windows (Recommended: Chocolatey)

  1. Install Chocolatey (Run PowerShell as Admin):

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  2. Install Tools:

    choco install mpv yt-dlp -y

macOS (Homebrew)

# Install Homebrew if needed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install MPV and yt-dlp
brew install mpv yt-dlp

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install mpv yt-dlp -y

πŸ› Troubleshooting

❓ "MPV Player tidak ditemukan" (MPV Not Found)

  • Solution: Ensure MPV is installed and added to your system PATH. If installed in a custom location, set it manually:
    anichi config set playerPath "C:\Path\To\Your\mpv.exe"

❓ Video doesn't play / MPV closes immediately

  • Cause: You likely do not have yt-dlp installed.
  • Solution: MPV requires yt-dlp to extract direct video streams from hosting sites. Install it using commands in the Setup Guide above. If yt-dlp is missing, Anichi will automatically fallback to opening the video in your browser.

❓ "Rate Limiting" / "Too Many Requests"

  • Cause: The API has rate limits to prevent abuse.
  • Solution: Anichi has built-in delays and caching. Avoid rapidly switching pages (mashing Next/Prev) to allow the cooldown to reset.

❓ Pagination stuck or wrong data

  • Solution: Clear the cache to fetch fresh data:
    anichi cache clear

πŸ“ Project Structure

anichi/
β”œβ”€β”€ src/
|   β”œβ”€β”€ ui
|   |   β”œβ”€β”€ interactive.ts  # Terminal UI Interactive
β”‚   β”œβ”€β”€ index.ts            # Main logic, commands, and CLI flow
β”‚   β”œβ”€β”€ api.ts              # HTTP client (Axios) and caching logic
β”‚   β”œβ”€β”€ ui.ts               # Terminal UI, tables, and colors
β”‚   β”œβ”€β”€ player.ts           # MPV detection and spawning logic
β”‚   β”œβ”€β”€ config.ts           # Configuration file handling
β”‚   β”œβ”€β”€ types.ts            # TypeScript interfaces
β”‚   └── history.ts          # Watch history management
β”œβ”€β”€ bin/
β”‚   └── anichi              # Entry point
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


🀝 Contributors

We would like to thank the following contributors who have helped improve this project:


πŸ™ Credits


Made with ❀️ and β˜• by Aditya K.

If you find Anichi useful, please give it a ⭐ on GitHub!

About

Streaming anime in CLI

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages