Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
Make sure Node.js and npm are already installed in your system. Verify installation using
node -v
npm -v
If you see the version then its installed. Otherwise install nodejs and npm should already be installed with nodejs. Then install the package by running
npm install -g @irfanshadikrishad/anilist
This will install the package globally. And you have to use commands like
anilist tr -c 15
Create an API client from anilist developer setting with an application name and redirect url as https://anilist.co/api/v2/oauth/pin
. After creating the client you will get Client ID
and Client Secret
which is required in order to login from CLI.
To login:
anilist login -i <client-id> -s <client-secret>
here <client-id>
and <client-secret>
should be replaced by the ones that you recieved from the developer setting.
Command | Options | Description |
---|---|---|
login |
-i, --id -s, --secret
|
Log in with your AniList credentials |
logout |
None | Log out from your AniList account |
me |
None | Display information about the logged-in user |
-V, --version |
None | Display the current version of the CLI |
-h, --help |
None | Display available commands and options |
trending (alias: tr )
|
-c (default: 10) |
Fetch trending anime (default count is 10) |
popular (alias: plr )
|
-c (default: 10) |
Fetch popular anime (default count is 10) |
user |
<username> |
Get information about a specific AniList user |
lists (alias: ls )
|
-a, --anime -m, --manga
|
Fetch anime or manga lists of the logged-in user |
delete (alias: del )
|
-a, --anime -m, --manga -ac, --activity
|
Delete collections of anime, manga or activities |
upcoming (alias: up )
|
-c (default: 10) |
Fetch upcoming anime (default count is 10) |
anime |
<anime-id> |
Get anime details by Anime Id |
search (alias: srch /find )
|
<query> -a, --anime -m, --manga -c (default: 10)
|
Get anime/manga search results |
status (alias: write /post )
|
<status> |
Write a status... (text/markdown/html) |
export (alias: exp )
|
-a, --anime -m, --manga
|
Export anime or manga list in JSON, CSV or XML (MyAnimeList) |
import (alias: imp )
|
-a, --anime -m, --manga
|
Import anime or manga list from exported JSON or MyAnimeList (XML) |
anilist login -i <client-id> -s <client-secret>
-
Options:
-
-i, --id
: Specify AniList Client ID -
-s, --secret
: Provide the AniList Client Secret
-
- Usage: Authenticate and log in to AniList using your ID and secret credentials.
anilist logout
- Description: End the current session and log out from your AniList account.
anilist me
- Description: Retrieve and display information about the currently logged-in user, including stats and profile details.
anilist -V
- Description: Quickly check which version of the CLI you are running.
anilist -h
- Description: List all available commands and their usage details for quick reference.
anilist tr -c 15
-
Options:
-
-c (count)
: Specify how many trending anime to fetch (default: 10).
-
- Description: Fetch the current trending anime series, with the option to customize how many results to display.
anilist popular
-
Options:
-
-c (count)
: Specify how many popular anime to fetch (default: 10).
-
- Description: Fetch the most popular anime series, with the option to customize how many results to display.
anilist up -c 25
-
Options:
-
-c (count)
: Specify how many upcoming anime to fetch (default: 10).
-
- Description: Fetch the upcoming anime series next season, with the option to customize how many results to display.
anilist user <username>
-
Options:
-
<username>
: Specify the AniList username to fetch.
-
- Description: Retrieve profile information about a specific AniList user.
anilist ls -a
-
Options:
-
-a, --anime
: Fetch the authenticated user's anime list. -
-m, --manga
: Fetch the authenticated user's manga list.
-
- Description: Get the anime or manga lists of the logged-in user.
anilist del -ac
-
Options:
-
-a, --anime
: Delete your specific anime collection that you want. -
-m, --manga
: Delete your specific manga collection that you want. -
-ac, --activity
: Delete all or any type of activities you want.
-
- Description: Delete the entire anime or manga collection from the logged-in user's profile.
anilist anime <anime-id>
-
Options
-
<anime-id>
(eg: 21) : Id of the anime you want to get details of.
-
- Description: Get anime details by anime Id.
anilist search <query> -a -c 20
-
Options:
-
<query>
: What you want to search (eg: naruto). -
-a, --anime
: To get results of anime search. -
-m, --manga
: To get results of manga search. -
-c (count)
: Specify how many items to fetch (default: 10).
-
- Description: Get anime/manga search results
anilist write <status>
-
Options:
-
<status>
: This is what you want to write, It can be HTML, Markdown and/or Text. But wrap it with quotation mark (") else it might get cut-off.
-
- Description: Get anime/manga search results
anilist export -a
-
Options:
-
-a, --anime
: To export anime list. -
-m, --manga
: To export manga list.
-
-
Description: Export anime or manga list. For
XML (MyAnimeList)
file, to import it on MyAnimeList, go here and chooseMyAnimeList Import
.
anilist import -m
-
Options:
-
-a, --anime
: To import anime list. -
-m, --manga
: To import manga list.
-
- Description: Import anime or manga list. If you want to import anime/manga list from MyAnimeList, export the XML from here.
Since you are creating your own API client for login no else else can get your credentials and the generated access token will be stored in your own system. So, As long as you don't share your device (in case you do, just logout) you are safe.
Want to contribute to the project? Check out complete guideline here.