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.
Full Documentation | Report Bug | Request Feature
Screenshots
Click to view screenshots
Banner
Episode Selection
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
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
- Stream Extraction -- fast regex on first 8KB of HTML, BeautifulSoup fallback, yt-dlp for complex cases
- LRU Cache -- 100-entry persistent cache makes repeat plays instant
- Preloading -- background thread resolves the next 2 episodes while you watch
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bf43541b0e0a8a70678dede33fdd16edf921cedf0759d94b2eaf3f9f9fbb9d7
|
|
| MD5 |
db8b8c472b6fcbbc38b18f130caaee3c
|
|
| BLAKE2b-256 |
e63f06d029b3842d31c0eaa705aa0490fe75eff4fd4d28938350ee576b42b204
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c01bf7b9f50bf40de7bf422c5f7f19657c76f2b1aa66cfaef604997549cc8a42
|
|
| MD5 |
b8b17dbc5bd741608822586996259a4b
|
|
| BLAKE2b-256 |
008a902dc062a1548d779e62f280150c58fd12df64e9a469cbf44370e85854ce
|