MikanCli
MikanCli is a Python command-line tool for finding bangumi/anime on Mikanani.me, choosing the correct Bangumi and subgroup RSS feed, and turning that selection into a qBittorrent RSS download rule.
It supports both a guided interactive flow and a JSON preview mode for scripting or inspection. The interactive flow is the most complete mode right now.
Features
- Search Mikan by anime title or keyword
- Choose from matching Bangumi results and subgroup-specific RSS feeds
- Preview recent RSS feed items with pagination before confirming a feed
- Read Rich-formatted rule summaries, feed previews, and status messages, with loading indicators for network requests
- Build qBittorrent RSS rules with include and exclude filters
- Filter anime-style episode numbers at or above a minimum episode
- Choose and save a default download folder
- Configure qBittorrent WebUI access from the CLI
- Submit RSS feeds and auto-download rules to qBittorrent, then verify that qBittorrent saved them
- Print rule drafts as JSON without submitting anything
Requirements
- Python 3.10 or newer
pipxfor installing MikanCli as a standalone CLI app- qBittorrent, if you want MikanCli to submit RSS feeds and rules automatically
Quick Start | Install
I recommend installing MikanCli with pipx so you can use it as a CLI app from any terminal.
You can skip the following if you already have pipx installed:
python -m pip install --user pipx # Install pipx for the current user
python -m pipx ensurepath # Add the pipx executable folder to PATH
Refresh by reopening a new terminal after running pipx ensurepath, then run:
pipx install mikancli
How to Use
Now that it is installed, run the following and follow the menu:
mikancli
Install by Cloning the Repo
To install from a local clone:
git clone https://github.com/JianHua-Deng/MikanCli.git
cd MikanCli
python -m pipx install -e .
For development, an editable pip install also works:
python -m pip install -e .
python -m mikancli
Dependencies, including Rich for output and InquirerPy for prompts, are declared in pyproject.toml and installed by pip or pipx. MikanCli does not install packages at runtime.
After pulling dependency changes into an existing editable pip installation, rerun python -m pip install -e . in that environment. Update pipx installations through pipx so dependencies stay in the app's environment.
Terminal Output
Rich formats rule summaries, feed previews, and feedback. InquirerPy handles menus and text input. Release titles containing brackets are displayed literally, and long titles, URLs, and paths wrap to fit the terminal.
Interactive terminals show loading indicators during network requests. Indicators stop before prompts and after failures. Redirected output uses static status messages, and feed previews retain their plain-text layout.
To disable Rich colors in PowerShell:
$env:NO_COLOR = "1"
mikancli
Remove that setting with Remove-Item Env:NO_COLOR. Bold or dim text and loading animations may remain; InquirerPy manages menu styling separately.
The --json draft mode prints one JSON document without Rich formatting or progress messages.
Guided Flow
When you run mikancli without arguments, the first menu lets you:
- search anime
- modify qBittorrent configuration
- change language
- exit MikanCli
The search flow then:
- asks for an anime title or keyword
- searches Mikan for matching Bangumi entries
- lets you choose the correct Bangumi entry
- fetches subgroup RSS feeds from the selected Bangumi page
- lets you choose a subgroup
- previews recent RSS feed items
- asks for include, exclude, and minimum episode filters
- asks where downloads should be saved
- builds a rule draft
- submits the feed and rule to qBittorrent
- verifies the submitted feed and rule through the qBittorrent WebUI API
Interactive prompts accept exit or quit where text input is requested, and menus include an exit option.
qBittorrent Setup
Before MikanCli can submit feeds or rules, enable qBittorrent WebUI:
- Open qBittorrent settings
- Enable WebUI or remote control
- Confirm the WebUI address, username, and password. If the address is empty, it usually means it is
http://localhost:[port] - Run
mikancli --setup-qbittorrent
Setup notes:
- Pressing Enter for the URL uses
http://localhost:8080 - Entering
localhost:8080is normalized tohttp://localhost:8080 - Username and password can be left blank if your qBittorrent WebUI allows localhost access without authentication
- If qBittorrent rejects the connection, re-check the WebUI port and credentials in qBittorrent settings
Configuration
MikanCli stores configuration in a JSON file:
- Windows:
%APPDATA%\Roaming\MikanCli\config.json
Saved settings can include:
- default download folder
- language preference
- qBittorrent WebUI URL
- qBittorrent username and password
- qBittorrent category
- whether qBittorrent should add matched torrents paused
The qBittorrent password is stored in the config file so MikanCli can submit rules in later runs. Keep that file private on shared machines.
Language Support
MikanCli supports English and Simplified Chinese for user-facing CLI text, including interactive menus, prompts, setup instructions, summaries, and help text. Command names, option names, JSON field names, Mikan titles, subgroup names, URLs, and qBittorrent API payloads stay stable.
Language selection uses this precedence order:
--language enor--language zh-CNMIKANCLI_LANG=enorMIKANCLI_LANG=zh-CN- saved config value
- English fallback
Interactive users can always change language from the startup menu. The selected language is saved to the config file for future runs.
Project Structure
mikancli/
cli/ CLI entrypoint, prompts, and interactive flows
core/ dataclasses, normalization, and rule-building logic
integrations/ Mikan and qBittorrent adapters
config.py user config and folder selection helpers
display.py Rich summaries, feed previews, feedback, and loading indicators
The console command is declared in pyproject.toml:
[project.scripts]
mikancli = "mikancli.cli.entrypoint:main"
Commands Usage
usage: mikancli [-h] [--include INCLUDE] [--exclude EXCLUDE]
[--min-episode MIN_EPISODE] [--save-path SAVE_PATH] [--json]
[--setup-qbittorrent] [--language {en,zh-CN}] [--version]
[keyword]
Options:
keyword: anime title or search phrase--include VALUE: require a word or phrase in accepted release titles. Repeat for multiple values--exclude VALUE: reject release titles containing a word or phrase. Repeat for multiple values--min-episode NUMBER: only accept anime-style release titles at or above this episode number--save-path PATH: use this base download folder for the generated qBittorrent rule--json: print the rule draft as JSON. This mode does not submit to qBittorrent--setup-qbittorrent: configure and verify qBittorrent WebUI settings--language {en,zh-CN}: choose CLI language for this run--version: print the installed CLI version
Minimum Episode Filtering
Use --min-episode when RSS item titles use common anime formats with a dash before the episode number or a bracketed episode number:
[SubsPlease] One Piece - 1126 (1080p)
[Skymoon-Raws][One Piece][1126][ViuTV][WEB-RIP][CHT][SRT][1080p][MKV]
For example:
mikancli "one piece" --include SubsPlease --min-episode 1126
MikanCli converts the minimum episode into a qBittorrent regular expression in the rule's mustContain field and enables useRegex. Normal --include and --exclude values still behave as literal words or phrases, and every include value must also be present in a title before qBittorrent treats it as a match.
When submitting a minimum-episode rule, MikanCli checks qBittorrent's RSS article retention limit. If qBittorrent is keeping fewer than 500 articles per feed, MikanCli offers to increase that setting so qBittorrent can see enough of Mikan's feed to match newer episodes.
Release
The repository includes a GitHub Actions workflow at .github/workflows/publish.yml that publishes to PyPI from main when the package version in pyproject.toml changes.
Metadata
Release files for mikancli 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mikancli-0.2.0.tar.gz | 40.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mikancli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 81.0 kB
Release files / mikancli-0.2.0.tar.gz
| Download URL | mikancli-0.2.0.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f65bf0a8830d686066d8f598abf9b124804473ac5ca8897cf600e0d6d230e5e
|
|
BLAKE2b-256 checksum How to use checksums |
e387509fab6161c6419744831d8ef8155230a69567ad895ba6d7e76e88f8a2b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logRelease files / mikancli-0.2.0-py3-none-any.whl
| Download URL | mikancli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 41.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f01877db8d2e4aa4acab54dfab4a60a08ff885410d04d0829ac63178190cd59
|
|
BLAKE2b-256 checksum How to use checksums |
632c28235398948f1b7edc0bb0417b0fd758a478d32a43efb516115d96e17d0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logSecurity for mikancli 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mikancli-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.