Configuration

ani-cli can be customized using environment variables. Command-line options will always take precedence over these variables.

To set a variable for a single command, prefix it:

ANI_CLI_PLAYER=vlc ani-cli "Attack on Titan"

To set it for your current terminal session:

export ANI_CLI_PLAYER=vlc

To make the change permanent, add the export command to your shell's configuration file (e.g., ~/.bashrc, ~/.zshrc).

Environment Variables

Variable Description Options Default
ANI_CLI_MODE Sets the audio type. sub, dub sub
ANI_CLI_PLAYER Sets the media player. mpv, vlc, iina, syncplay, debug, download, catt, or any player that can handle URLs. Varies by OS (mpv on Linux, iina on macOS, etc.)
ANI_CLI_QUALITY Sets the default video quality. best, worst, 360p, 480p, 720p, 1080p best
ANI_CLI_DOWNLOAD_DIR The directory for downloaded files. Any valid path. . (current directory)
ANI_CLI_HIST_DIR The directory for storing history files. Any valid path. $XDG_STATE_HOME/ani-cli or $HOME/.local/state/ani-cli
ANI_CLI_LOG Toggles the logging of watched episodes. 1 (enabled), 0 (disabled) 1
ANI_CLI_DEFAULT_SOURCE Sets the default action on launch. history (equivalent to -c), or scrape (default search) scrape
ANI_CLI_EXTERNAL_MENU Selects the interactive menu program. 0 (fzf), 1 (rofi) 0
ANI_CLI_MULTI_SELECTION Sets the multi-selection flag for the menu program. e.g., -m for fzf, --multi-select for rofi Varies by menu program
ANI_CLI_SKIP_INTRO Toggles ani-skip integration (mpv only). 1 (enabled), 0 (disabled) 0
ANI_CLI_SKIP_TITLE Overrides the anime title for ani-skip queries. Any string. Anime title from search results
ANI_CLI_NO_DETACH Prevents detaching the player process (mpv only). 1 (enabled), 0 (disabled) 0
ANI_CLI_EXIT_AFTER_PLAY Exits ani-cli after the player closes (mpv only). 1 (enabled), 0 (disabled) 0
ANI_CLI_EXTERNAL_MENU_NORMAL_WINDOW Makes the rofi menu a normal window. 1 (enabled), 0 (disabled) 0