CLI foundation for building qBittorrent RSS rules from anime search input.
Project description
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. Though, only the interactive flow is pretty much finished as of now
Features
- Search Mikan by anime title or keyword
- Choose from matching Bangumi results and subgroup-specific RSS feeds
- Preview recent RSS feed items before confirming a feed
- Build qBittorrent RSS rules with include and exclude filters
- 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 it with pipx, such so you can use it as a CLI app anytime anywhere from the terminal
You can skip the following if you already have pipx installed:
python -m pip install --user pipx # Installing pipx for the current user on this machine
python -m pipx ensurepath # Update machine's PATH variable to include the folder where pipx places executable files
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 to start using it:
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 are declared in pyproject.toml and installed by pip or pipx. MikanCli does not install packages at runtime.
Guided Flow
When you run mikancli without arguments, the first menu lets you:
- search anime
- modify qBittorrent configuration
- 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 and exclude filters
- asks where downloads should be saved
- builds a rule draft
- optionally 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 mean it is just
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 - macOS(Probably):
~/Library/Application Support/MikanCli/config.json - Linux and other POSIX systems(Probably):
$XDG_CONFIG_HOME/mikancli/config.jsonor~/.config/mikancli/config.json
Saved settings can include:
- default download folder
- 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.
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 text summaries and feed previews
The console command is declared in pyproject.toml:
[project.scripts]
mikancli = "mikancli.cli.entrypoint:main"
Commands Usage
usage: mikancli [-h] [--include INCLUDE] [--exclude EXCLUDE]
[--save-path SAVE_PATH] [--json] [--setup-qbittorrent]
[--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--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--version: print the installed CLI version.
Release
The repository includes a GitHub Actions workflow at .github/workflows/publish.yml that builds distributions, checks them with twine, and publishes to PyPI when a GitHub release is published.
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
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 mikancli-0.1.3.tar.gz.
File metadata
- Download URL: mikancli-0.1.3.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f212d2658c9d1ccb566de83bddd98b70620a142fb2eb5ee68afd1f4468960c12
|
|
| MD5 |
e717b56a107ac388befdb09725b0d7c0
|
|
| BLAKE2b-256 |
66a0231982c9ba634ec70490bfaec87ff8300a98b95f221b3e3a6a810302da00
|
Provenance
The following attestation bundles were made for mikancli-0.1.3.tar.gz:
Publisher:
publish.yml on JianHua-Deng/MikanCli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mikancli-0.1.3.tar.gz -
Subject digest:
f212d2658c9d1ccb566de83bddd98b70620a142fb2eb5ee68afd1f4468960c12 - Sigstore transparency entry: 1399384142
- Sigstore integration time:
-
Permalink:
JianHua-Deng/MikanCli@4d31084e69a550a84dca30a06c9b357ce2c9933d -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/JianHua-Deng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d31084e69a550a84dca30a06c9b357ce2c9933d -
Trigger Event:
release
-
Statement type:
File details
Details for the file mikancli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: mikancli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 31.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c483f4dd1d298df695ca36e5f8d6c489e07494877a331032e720a227a89e0ef1
|
|
| MD5 |
e584e2c2e17fb73ec6f061a244a5db06
|
|
| BLAKE2b-256 |
a0b29a6915b8444bf60bc4afd828ead7adb0d7cc0b7948c0338d28066d9fedb3
|
Provenance
The following attestation bundles were made for mikancli-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on JianHua-Deng/MikanCli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mikancli-0.1.3-py3-none-any.whl -
Subject digest:
c483f4dd1d298df695ca36e5f8d6c489e07494877a331032e720a227a89e0ef1 - Sigstore transparency entry: 1399384145
- Sigstore integration time:
-
Permalink:
JianHua-Deng/MikanCli@4d31084e69a550a84dca30a06c9b357ce2c9933d -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/JianHua-Deng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d31084e69a550a84dca30a06c9b357ce2c9933d -
Trigger Event:
release
-
Statement type: