Skip to main content

Wuxia-themed terminal client for streaming Chinese animation

Project description

Donghua CLI

A fast, Wuxia-themed terminal client for streaming Chinese animation with intelligent caching, preloading, and multi-source support.

Python 3.9+ License: MIT GitHub Pages

Full Documentation | Report Bug | Request Feature


Screenshots

Click to view screenshots

Banner

Banner

Episode Selection

Episode Selection

Playback Controls

Playback Controls


Quick Start

# Install (recommended)
pipx install donghua-cli

# Or with pip
pip install donghua-cli

# Run
donghua "Battle Through the Heavens"

Features

  • Lightning fast -- preloads episodes while you watch, LRU cache makes replays instant
  • Multi-source -- aggregates from LuciferDonghua and AnimeXin
  • Rich terminal UI -- Wuxia-themed interface built on Rich with panels, tables, and styled output
  • Cross-platform -- Linux, Windows, macOS, Android (Termux), iOS (iSH)
  • Downloads -- parallel episode downloads via yt-dlp

Installation

Prerequisites

  • Python 3.9+
  • mpv (for playback) or VLC
  • yt-dlp (optional, for downloads and fallback extraction)

pipx (recommended)

pipx install donghua-cli

pip

pip install donghua-cli

From source

git clone https://github.com/Thanukamax/donghua-cli.git
cd donghua-cli
pip install -e .

Platform-specific dependencies

Linux (Debian/Ubuntu)
sudo apt install mpv ffmpeg
Linux (Fedora)
sudo dnf install mpv ffmpeg
Windows
winget install mpv
Android (Termux)
pkg install python mpv ffmpeg

Platform is auto-detected -- quality defaults to 360p and playback uses Android intents (MPV, VLC, MX Player).

Usage

# Interactive mode (full TUI)
donghua

# Direct search
donghua "Soul Land"

# Specify source
donghua "Perfect World" -s ld

# Set quality
donghua "Martial Peak" -q 1080

# Download mode
donghua "Tales of Demons and Gods" -d

# Show features
donghua --features

# Clear cache
donghua --clear-cache

# The 'dhua' alias also works
dhua "Soul Land"

Playback Controls

Key Action
n / Enter Next episode
p Previous episode
s Skip to specific episode
r Replay current
d Download current episode
q Quit

How It Works

  1. Stream Extraction -- fast regex on first 8KB of HTML, BeautifulSoup fallback, yt-dlp for complex cases
  2. LRU Cache -- 100-entry persistent cache makes repeat plays instant
  3. Preloading -- background thread resolves the next 2 episodes while you watch
  4. Episode Detection -- multiple CSS selectors per source, auto-sorted chronologically

Project Structure

donghua-cli/
  src/donghua_cli/    # Main package
    cli.py            # Entry point + arg parsing
    app.py            # Application logic
    ui.py             # User interaction flows
    theme.py          # Rich-based Wuxia theme
    scraper.py        # Source scrapers
    extractor.py      # Stream URL extraction
    player.py         # MPV/VLC/Android player
    cache.py          # LRU cache + preloader
    config.py         # Platform detection + settings
    utils.py          # Shared utilities
  docs/               # GitHub Pages site + assets
  scripts/            # Install helpers
  pyproject.toml      # Package config (hatchling)

Contributing

Pull requests welcome! See docs/future_ideas.md for the roadmap.

License

MIT License -- see LICENSE for details.

Disclaimer

This tool is for educational purposes only. Please support official releases when available. Not affiliated with any streaming sites.


Made by Thanukamax

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

donghua_cli-3.1.0.tar.gz (447.0 kB view details)

Uploaded Source

Built Distribution

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

donghua_cli-3.1.0-py3-none-any.whl (103.5 kB view details)

Uploaded Python 3

File details

Details for the file donghua_cli-3.1.0.tar.gz.

File metadata

  • Download URL: donghua_cli-3.1.0.tar.gz
  • Upload date:
  • Size: 447.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for donghua_cli-3.1.0.tar.gz
Algorithm Hash digest
SHA256 9bf43541b0e0a8a70678dede33fdd16edf921cedf0759d94b2eaf3f9f9fbb9d7
MD5 db8b8c472b6fcbbc38b18f130caaee3c
BLAKE2b-256 e63f06d029b3842d31c0eaa705aa0490fe75eff4fd4d28938350ee576b42b204

See more details on using hashes here.

File details

Details for the file donghua_cli-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: donghua_cli-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 103.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for donghua_cli-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c01bf7b9f50bf40de7bf422c5f7f19657c76f2b1aa66cfaef604997549cc8a42
MD5 b8b17dbc5bd741608822586996259a4b
BLAKE2b-256 008a902dc062a1548d779e62f280150c58fd12df64e9a469cbf44370e85854ce

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