Programm to synchronize your AniList and MyAnimeList accounts.
- Sync AniList to MyAnimeList (currently only syncing anime)
- OAuth2 authentication with AniList and MyAnimeList
- CLI interface
- Configurable by environment variables and config file
First configurate your accounts in the site. Then run the program and follow the instructions to authenticate. It prints the URL to visit in the browser. Then you will be redirected to the callback URL and save the token. After that you will go same steps for MyAnimeList.
Token will be saved in the ~/.config/anilist-mal-sync/token.json
file and reused then.
You can change the path in the config file.
If you want to reauthenticate, just delete the file.
- Go to AniList settings (Settings -> Apps -> Developer)
- Create a new client
- Set the redirect URL to
http://localhost:18080/callback
- Set the client ID and client secret in the config file or as environment variables
- Go to MyAnimeList API Settings (Profile -> Account Settings -> API)
- Create a new application
- Set the redirect URL to
http://localhost:18080/callback
- Set the client ID and client secret in the config file or as environment variables
oauth:
port: "18080" # Port for OAuth server to listen on (default: 18080).
redirect_uri: "http://localhost:18080/callback" # Redirect URI for OAuth server (default: http://localhost:18080/callback).
anilist:
client_id: "1" # AniList client ID.
client_secret: "secret" # AniList client secret.
auth_url: "https://anilist.co/api/v2/oauth/authorize"
token_url: "https://anilist.co/api/v2/oauth/token"
username: "username" # Your AniList username.
myanimelist:
client_id: "1" # MyAnimeList client ID.
client_secret: "secret" # MyAnimeList client secret.
auth_url: "https://myanimelist.net/v1/oauth2/authorize"
token_url: "https://myanimelist.net/v1/oauth2/token"
username: "username" # Your MyAnimeList username.
token_file_path: "" # Absolute path to token file, empty string use default path.
PORT
- Port for OAuth server to listen on (default: 18080).CLIENT_SECRET_ANILIST
- AniList client secret.CLIENT_SECRET_MYANIMELIST
- MyAnimeList client secret.
Program supports the following command-line options:
-c
- Path to the config file. Default isconfig.yaml
.-f
- Force sync (sync all entries, not just the ones that have changed). Default is false.-d
- Dry run (do not make any changes to MyAnimeList). Default is false.-h
- Print help message.
Requirements:
- Go 1.22 or later
Build and run the program from source:
- Clone the repository:
git clone https://github.com/bigspawn/anilist-mal-sync.git
- Change directory:
cd anilist-mal-sync
- Configure the program:
cp config.example.yaml config.yaml
and fill in the necessary fields - Run the program:
go run .
Or install the program:
go install github.com/bigspawn/anilist-mal-sync@latest
anilist-mal-sync
This project is not affiliated with AniList or MyAnimeList. Use at your own risk. Both services have rate limits and programm can be looks like freezed or stop by timeout. Just stop it and wait for a while and run again.
- Add documentation
-
Sync favorites(not possible, because it is not available in the API) - Sync manga
- Sync MAL to AniList