@mtsku/mangadex-cli
v0.1.3
Published
Production-ready MangaDex CLI for discovery, manga/chapter lookup, follow feed, and recommendations via direct MangaDex API.
Readme
mangadex-cli
Direct MangaDex CLI for discovery, manga/chapter lookup, follow-feed checks, and recommendations.
Features
- Discovery/search
- Manga, author, and group search
- Works by author or group
- Manga/chapter info
- Manga details, chapter lists, latest chapters, chapter metadata
- Feed updates
- Followed manga updates by time window (
24h,7d, etc.)
- Followed manga updates by time window (
- Recommendations
- Tag-based suggestions
- Optional followed-feed inferred tags
- Optional library-aware exclusions where endpoint access allows
- Auth and output
- Public read commands without auth
- OAuth/token workflows for account-specific commands
- Human output and global
--json
Install
npm install -g @mtsku/mangadex-cliFor local source install from this repository:
npm install
npm run build
npm install -g .Repository: https://github.com/mtsku/mangadex-cli
Auth Setup
Personal client login (recommended)
mangadexcli auth set-client <client_id> <client_secret>
mangadexcli auth login <username> <password>
mangadexcli whoamiAlternative env vars:
export MANGADEX_TOKEN="..."
export MANGADEX_CLIENT_ID="..."
export MANGADEX_CLIENT_SECRET="..."OAuth authorization-code exchange
mangadexcli auth set-client <client_id> <client_secret>
mangadexcli auth exchange --code <code> --redirect-uri <redirect_uri> [--code-verifier <pkce_verifier>]
mangadexcli auth refreshCore Examples
Discovery/search
mangadexcli search manga "blue lock" -n 5
mangadexcli search author "Inoue Takehiko" -n 5
mangadexcli search group "asura" -n 5
mangadexcli works author "Inoue Takehiko" -n 15
mangadexcli works group "asura" -n 20Manga/chapter info
mangadexcli manga details <manga_uuid>
mangadexcli manga chapters <manga_uuid> --lang en -n 30
mangadexcli manga latest <manga_uuid> --lang en -n 10
mangadexcli chapter meta <chapter_uuid>Follow feed updates
mangadexcli feed updates --window 24h --lang en -n 30
mangadexcli feed updates --window 7d -n 100Recommendations
mangadexcli recommend suggest --tags "action,psychological" -n 10
mangadexcli recommend suggest --from-followed --window 7d --exclude-library -n 10JSON mode
mangadexcli --json manga details <manga_uuid>
mangadexcli --json feed updates --window 24hConfig and Token Storage
Stored config path:
~/.config/mangadex-cli/config.jsonFile permissions are set to 0600.
Inspect auth/token resolution:
mangadexcli auth whereResolution precedence:
--tokenMANGADEX_TOKEN/MANGADEX_ACCESS_TOKEN- Stored config token
Troubleshooting
MangaDex token is required:- Set
MANGADEX_TOKENor runmangadexcli auth set-token <token>
- Set
- OAuth exchange/refresh fails:
- Verify redirect URI, client ID/secret, and PKCE verifier
- Empty follow feed:
- The account may not have followed updates in that window/language
- Recommendation exclusions partial:
- Exclusion coverage depends on endpoint access/scope
Development
npm run check
npm run build
npm testLicense
MIT
