Ana içeriğe geç

CLI Commands Reference

Complete reference for all Weeb CLI command-line commands.

Main Commands

Default (Interactive Mode)

Start interactive mode with main menu.

weeb-cli

This is the default command when no subcommand is provided.

start

Alternative command for interactive mode (same as default).

weeb-cli start

api

Non-interactive JSON API for scripts and automation.

weeb-cli api [SUBCOMMAND]

See API Mode for details.

serve

Start Torznab server for *arr integration.

weeb-cli serve [OPTIONS]

See Serve Mode for details.

API Subcommands

api providers

List all available providers.

weeb-cli api providers

Output:

[
  {
    "name": "animecix",
    "lang": "tr",
    "region": "TR",
    "class": "AnimecixProvider"
  }
]

Search for anime.

weeb-cli api search QUERY [OPTIONS]

Options: - --provider, -p: Provider name (default: animecix)

Example:

weeb-cli api search "One Piece" --provider hianime

Output:

[
  {
    "id": "one-piece-100",
    "title": "One Piece",
    "type": "series",
    "cover": "https://...",
    "year": 1999
  }
]

api episodes

Get episode list for anime.

weeb-cli api episodes ANIME_ID [OPTIONS]

Options: - --provider, -p: Provider name (default: animecix) - --season, -s: Filter by season number

Example:

weeb-cli api episodes "one-piece-100" --provider hianime --season 1

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.

weeb-cli api streams ANIME_ID EPISODE_ID [OPTIONS]

Options: - --provider, -p: Provider name (default: animecix)

Example:

weeb-cli api streams "one-piece-100" "ep-1" --provider hianime

Output:

[
  {
    "url": "https://...",
    "quality": "1080p",
    "server": "megacloud",
    "headers": {}
  }
]

Global Options

--help

Show help message.

weeb-cli --help
weeb-cli api --help
weeb-cli api search --help

--version

Show version information.

weeb-cli --version

Environment Variables

WEEB_CLI_CONFIG_DIR

Override configuration directory:

export WEEB_CLI_CONFIG_DIR="/custom/path"
weeb-cli

WEEB_CLI_DEBUG

Enable debug mode:

export WEEB_CLI_DEBUG=1
weeb-cli

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

eval "$(_WEEB_CLI_COMPLETE=bash_source weeb-cli)"

Zsh

eval "$(_WEEB_CLI_COMPLETE=zsh_source weeb-cli)"

Fish

eval (env _WEEB_CLI_COMPLETE=fish_source weeb-cli)

Next Steps