A Windows-native Node.js CLI tool for browsing and streaming anime from your terminal. Inspired by the original ani-cli, reimplemented in TypeScript just for fun.
- 🔍 Search anime by title with fuzzy matching
- 📺 Stream episodes directly in your media player (MPV or VLC)
- 🎬 Quality selection (1080p, 720p, 480p, etc.)
- 🗣️ Dub/Sub support - watch dubbed or subtitled versions
- 📜 Watch history - resume where you left off
- 🔄 Multi-provider fallback - reliable streaming from multiple sources
- 🎯 Episode ranges - binge-watch multiple episodes (e.g., 1-10)
- ⚙️ Configurable - customize quality, player, and preferences
- 🎨 Beautiful UI - colorful terminal interface with chalk
- Node.js 18+ (Download)
- Media Player - Install one of the following:
- MPV (Recommended): mpv.io/installation
- VLC: videolan.org/vlc
Option 1: Chocolatey (Recommended)
choco install mpvOption 2: Scoop
scoop install mpvOption 3: Manual Installation
- Download from mpv.io/installation
- Extract to
C:\mpv\orC:\Program Files\mpv\ - Add to PATH or configure in ani-cli
# Clone the repository
git clone https://github.com/yourusername/ani-cli-node.git
cd ani-cli-node
# Install dependencies
npm install
# Build the project
npm run build
# Install globally (optional)
npm install -g .# Search for an anime
ani-cli "death note"
# Search with episode selection
ani-cli "attack on titan" -e 5
# Watch episode range (binge mode)
ani-cli "cowboy bebop" -e 1-10ani-cli [search] [options]
Options:
-d, --dub Watch dubbed version
-q, --quality <quality> Quality preference (best, worst, 1080p, 720p, 480p, 360p)
-e, --episode <number> Episode number or range (e.g., 5 or 1-10)
-c, --continue Continue watching from history
-p, --player <name> Preferred player (mpv, vlc, auto)
--debug Enable debug logging
-h, --help Display help
-V, --version Display versionSearch and select interactively:
ani-cli
# Enter search query when promptedWatch specific episode:
ani-cli "one piece" -e 1000Watch with quality preference:
ani-cli "demon slayer" -e 1 -q 720pWatch dubbed version:
ani-cli "cowboy bebop" --dubContinue from history:
ani-cli --continueBinge watch episodes 1-25:
ani-cli "steins gate" -e 1-25View watch history:
ani-cli historyManage configuration:
# View all settings
ani-cli config get
# View specific setting
ani-cli config get defaultQuality
# Change setting
ani-cli config set defaultQuality 1080p
ani-cli config set preferredPlayer mpv
# Reset to defaults
ani-cli config resetClear history:
ani-cli clear-historyConfiguration is stored in %APPDATA%\ani-cli-node-nodejs\config.json
| Setting | Type | Default | Description |
|---|---|---|---|
defaultQuality |
string | best |
Default video quality (best, worst, 1080p, 720p, 480p, 360p) |
preferredPlayer |
string | auto |
Media player (mpv, vlc, auto) |
playerPath |
string | - | Custom player path (optional) |
translationType |
string | sub |
Default audio (sub, dub) |
historyEnabled |
boolean | true |
Enable watch history |
maxHistoryEntries |
number | 100 |
Maximum history entries |
cacheTimeout |
number | 300000 |
Cache timeout in milliseconds |
retryAttempts |
number | 3 |
HTTP retry attempts |
debug |
boolean | false |
Enable debug logging |
# Set default quality to 1080p
ani-cli config set defaultQuality 1080p
# Always use MPV
ani-cli config set preferredPlayer mpv
# Prefer dubbed anime
ani-cli config set translationType dub
# Enable debug mode
ani-cli config set debug trueani-cli-node uses multiple video providers with automatic fallback:
- HiAnime (Primary) - HLS streaming with multiple qualities
- Wixmp - HLS/MP4 streams
- YouTube - Direct MP4 links
- SharePoint - Direct downloads
If one provider fails, it automatically tries the next until a working stream is found.
- Automatically tracks watched episodes
- Resume from where you left off with
--continue - View history with
ani-cli history - Stores in
%LOCALAPPDATA%\ani-cli-node\history.json
Supports automatic quality detection from HLS streams:
- Best: Highest available quality
- Worst: Lowest quality (for slow connections)
- 1080p, 720p, 480p, 360p: Specific resolution preference
Watch multiple episodes sequentially:
# Single episode
ani-cli "naruto" -e 150
# Range of episodes
ani-cli "naruto" -e 150-160
# Continues to next episode automaticallyani-cli-node/
├── src/
│ ├── api/ # AllAnime GraphQL API client
│ ├── cli/ # CLI commands, prompts, and UI
│ ├── models/ # Data models (Anime, Episode, Stream)
│ ├── player/ # Media player integration (MPV, VLC)
│ ├── providers/ # Video source providers
│ ├── storage/ # Configuration and history management
│ ├── streaming/ # M3U8 parsing and quality selection
│ ├── types/ # TypeScript type declarations
│ ├── utils/ # Utilities (logger, cache, validators)
│ └── index.ts # Main entry point
├── bin/ # Executable entry point
├── dist/ # Compiled JavaScript (generated)
└── tests/ # Tests
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Watch mode (auto-rebuild on changes)
npm run watch# Using tsx (development)
npm run dev
# Using built version
node dist/index.js "anime name"Enable debug mode to see detailed logs:
ani-cli "anime name" --debugOr set it permanently:
ani-cli config set debug trueSolution: Install MPV or VLC:
- MPV:
choco install mpvor download from mpv.io - VLC: Download from videolan.org
If installed but not detected, set the path manually:
ani-cli config set playerPath "C:\Program Files\mpv\mpv.exe"Possible causes:
- Typo in anime name
- Anime not available on AllAnime API
- Network issues
Solution: Try alternative search terms or check internet connection
Possible causes:
- Episode not yet available
- All video sources temporarily down
- Network/firewall blocking requests
Solution:
- Try again later
- Check firewall settings
- Try with
--debugto see which providers are failing
Checklist:
- Verify player is installed:
mpv --versionorvlc --version - Check PATH or set custom player path
- Try specifying player:
ani-cli "anime" -p mpv
If Windows Defender blocks network requests:
- Allow Node.js through firewall
- Allow MPV/VLC through firewall
- Disable antivirus temporarily to test
| Feature | Original ani-cli | ani-cli-node |
|---|---|---|
| Platform | Linux/macOS (Git Bash on Windows) | Windows-native (cross-platform) |
| Language | Shell script | TypeScript/Node.js |
| Dependencies | curl, grep, sed, fzf | npm packages only |
| Setup | Manual script installation | npm install |
| IDE Support | Limited | Full TypeScript support |
| Debugging | Shell debugging | Proper debug mode & logging |
| Updates | Git pull | npm update |
| Downloads | ✅ (with yt-dlp) | ❌ (streaming only) |
- No download support (streaming only) - may be added in future
- Requires external player (MPV/VLC)
- AllAnime API dependency - if API changes, tool may break
- No intro skipping (original ani-cli has ani-skip integration)
- No syncplay support for group watching
Contributions are welcome! Please feel free to submit issues or pull requests.
- Add download functionality
- Implement intro skipping
- Add support for more video players
- Improve error handling
- Add unit tests
- Add CI/CD pipeline
MIT License - see LICENSE file for details
- Original ani-cli by pystardust
- AllAnime API for anime metadata
- All the amazing npm package maintainers
This tool is for educational purposes only. Please support the anime industry by watching through official legal streaming services when available.
Made with ❤️ and TypeScript
Stream anime from your terminal, the modern way.