CLI Commands Reference¶
Complete reference for all Weeb CLI command-line commands.
Main Commands¶
Default (Interactive Mode)¶
Start interactive mode with main menu.
This is the default command when no subcommand is provided.
start¶
Alternative command for interactive mode (same as default).
api¶
Non-interactive JSON API for scripts and automation.
See API Mode for details.
serve¶
Start Torznab server for *arr integration.
See Serve Mode for details.
API Subcommands¶
api providers¶
List all available providers.
Output:
api search¶
Search for anime.
Options:
- --provider, -p: Provider name (default: animecix)
Example:
Output:
[
{
"id": "one-piece-100",
"title": "One Piece",
"type": "series",
"cover": "https://...",
"year": 1999
}
]
api episodes¶
Get episode list for anime.
Options:
- --provider, -p: Provider name (default: animecix)
- --season, -s: Filter by season number
Example:
Output:
[
{
"id": "ep-1",
"number": 1,
"title": "I'm Luffy! The Man Who Will Become Pirate King!",
"season": 1
}
]
api streams¶
Get stream URLs for episode.
Options:
- --provider, -p: Provider name (default: animecix)
Example:
Output:
Global Options¶
--help¶
Show help message.
--version¶
Show version information.
Environment Variables¶
WEEB_CLI_CONFIG_DIR¶
Override configuration directory:
WEEB_CLI_DEBUG¶
Enable debug mode:
Exit Codes¶
- 0: Success
- 1: General error
- 2: Invalid arguments
- 130: Interrupted (Ctrl+C)
Examples¶
Search and Stream¶
# Search
weeb-cli api search "Naruto" --provider animecix > results.json
# Get anime ID from results
ANIME_ID=$(jq -r '.[0].id' results.json)
# Get episodes
weeb-cli api episodes "$ANIME_ID" --provider animecix > episodes.json
# Get episode ID
EPISODE_ID=$(jq -r '.[0].id' episodes.json)
# Get streams
weeb-cli api streams "$ANIME_ID" "$EPISODE_ID" --provider animecix > streams.json
# Play with mpv
STREAM_URL=$(jq -r '.[0].url' streams.json)
mpv "$STREAM_URL"
Batch Processing¶
#!/bin/bash
# Download all episodes of an anime
ANIME_ID="one-piece-100"
PROVIDER="hianime"
# Get episodes
episodes=$(weeb-cli api episodes "$ANIME_ID" --provider "$PROVIDER")
# Loop through episodes
echo "$episodes" | jq -c '.[]' | while read episode; do
ep_id=$(echo "$episode" | jq -r '.id')
ep_num=$(echo "$episode" | jq -r '.number')
echo "Processing episode $ep_num..."
# Get streams
streams=$(weeb-cli api streams "$ANIME_ID" "$ep_id" --provider "$PROVIDER")
stream_url=$(echo "$streams" | jq -r '.[0].url')
# Download with yt-dlp
yt-dlp -o "Episode-$ep_num.mp4" "$stream_url"
done
Shell Completion¶
Bash¶
Zsh¶
Fish¶
Next Steps¶
- API Mode Guide: Detailed API usage
- Serve Mode Guide: Torznab server
- User Guide: Interactive mode