Skip to main content

🎬 CineCLI — Search and stream movies from Rutracker directly in your terminal

Project description

English README | Russian README

CineCLI v0.2.6

CLI tool for searching and streaming movies from Rutracker directly in your terminal using mpv and webtorrent.

Features

  • Search torrents on Rutracker directly from the terminal
  • Direct streaming to mpv without downloading files to disk
  • Magnet link generation with multiple trackers for fast startup
  • Interactive mode for convenient browsing and selection
  • Flexible configuration with browser cookie support
  • Smart torrent selection — automatically prefers 1080p, high seed counts, WebRip/BDRip releases

Requirements

  • Python 3.10+ (tested on 3.14)
  • webtorrent — installed globally
  • mpv — media player for streaming
  • Node.js (required for installing webtorrent)

Installation

Step 1: Python package

pip install cinecli-ru

Step 2: System dependencies

macOS

brew install mpv
npm install -g webtorrent

Linux (Ubuntu/Debian)

sudo apt-get install mpv npm
sudo npm install -g webtorrent

Linux (Fedora/RHEL)

sudo dnf install mpv npm
sudo npm install -g webtorrent

Step 3: Configuration

Create the file ~/.config/cinecli/config.toml:

mkdir -p ~/.config/cinecli

Option A: Username + Password

[rutracker]
username = "your_username"
password = "your_password"

[settings]
default_limit = 20

Option B: Browser cookies (recommended)

A more reliable method is to use cookies from your browser.

  1. Open rutracker.org and log in
  2. Open DevTools (F12)
  3. Go to Application → Cookies → rutracker.org
  4. Copy all cookies from the site (needed: bb_guid, bb_session, bb_ssl, bb_t, bb_clearance)
  5. Add them to the config:
[rutracker]
username = "your_username"
password = "your_password"
cookie = "bb_guid=XXX; bb_session=YYY; bb_ssl=1; bb_t=ZZZ; bb_clearance=WWW"

[settings]
default_limit = 20

Tip: You can use a browser extension to export cookies automatically.

Usage

Search torrents

cinecli-ru search matrix
cinecli-ru search "enemy at the gates" --limit 10
cinecli-ru search avatar -n 5

Watch directly (main command)

Searches, automatically selects the best torrent, and starts streaming.

cinecli-ru watch matrix
cinecli-ru watch dune --limit 10

Selection can be manual if auto-selection is disabled in the prompt.

Torrent details and actions

Open a specific torrent (by topic_id) and choose what to do with it.

cinecli get 6677988

Available actions:

  • stream — direct streaming to mpv via webtorrent
  • magnet — open the magnet link in a torrent client (qBittorrent, Transmission, etc.)
  • page — open the torrent page in a browser
  • skip — cancel and exit

Interactive mode

cinecli-ru interactive

How it works:

  1. Enter the movie name
  2. See a table of results
  3. Choose automatic selection (best by seeds) or select manually
  4. Select an action (stream, magnet, or page)

Command Options

search and watch

  • --limit N or -n N — maximum number of results (default: 20)

Examples:

cinecli-ru search "blade runner" --limit 5
cinecli-ru watch inception -n 15

Streaming Quality

The tool automatically prioritizes torrents suitable for streaming.

Priority:

  • 1080p resolution
  • WebRip, BDRip formats (~2–4 GB for fast start)
  • High seed counts

Avoided:

  • Large remux releases (>10 GB, slow buffering)
  • UHD or Blu-ray rips that are too large

Tip: For the best experience choose WebRip or BDRip releases around 2–4 GB.

Troubleshooting

Authentication error

Problem: "Rutracker login failed" or login page returned.

Solution:

  1. Check your username and password
  2. Try using browser cookies instead (more reliable)
  3. Make sure the site is accessible
  4. Refresh cookies — they may expire

webtorrent not found

npm install -g webtorrent
webtorrent --version

mpv not found

  • macOS: brew install mpv
  • Ubuntu: sudo apt-get install mpv
  • Fedora: sudo dnf install mpv

Slow streaming

  • Check your internet connection
  • Choose torrents with more seeds
  • Use cinecli get <id> and select a smaller file (WebRip)
  • Avoid large remux releases for streaming

API unavailable

If you see a warning about the API, the Rutracker server may be temporarily unavailable. The tool will automatically fall back to scraping the web interface (which works but may be slower).

Configuration

Config file location

  • Linux/macOS: ~/.config/cinecli/config.toml
  • Windows: %APPDATA%\cinecli\config.toml

Full configuration example

[rutracker]
username = "your_username"
password = "your_password"
cookie = ""

[settings]
default_limit = 20

Development

Build from source

git clone https://github.com/yourusername/cinecli
cd cinecli
pip install -e .

Project dependencies

  • typer — CLI framework
  • rich — formatted terminal output (tables, panels)
  • rutracker-api — Rutracker API client
  • beautifulsoup4 — HTML parsing
  • requests — HTTP requests
  • lxml — parser for BeautifulSoup

Development & testing

pip install -e ".[dev]"
pytest
black .
ruff .

Usage Examples

Scenario 1: Quickly watch a movie

$ cinecli watch matrix
Searching: matrix

Auto-select (most seeds)? [Y/n]: y

Selected: The Matrix (1999) 1080p WEB-DL [10 seeds, 2.3 GB]

Streaming: The Matrix (1999) 1080p WEB-DL

Scenario 2: Manual selection

$ cinecli watch dune

Auto-select (most seeds)? [Y/n]: n
Select number [0-19]: 5

Scenario 3: Get a magnet link for a torrent client

$ cinecli-ru get 6677988

Action [stream/magnet/page/skip]: magnet

Magnet link opened in torrent client

Legal Notice

This tool is intended only for personal lawful use with content you are legally allowed to access. Please respect copyright laws in your jurisdiction.


Version: 0.1.5
Python: 3.10+
License: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cinecli_ru-0.2.6.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cinecli_ru-0.2.6-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file cinecli_ru-0.2.6.tar.gz.

File metadata

  • Download URL: cinecli_ru-0.2.6.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cinecli_ru-0.2.6.tar.gz
Algorithm Hash digest
SHA256 5d715479bef4b86d05e5bc8d8b8dbda5696f73c0c4736ab07423c8a4d10d6380
MD5 6e3432df305cb183dd1ba7432dda777b
BLAKE2b-256 8a173e33267f56198c800a67424ee7e8f31fa5abf2384bd5a9451af015b8826f

See more details on using hashes here.

File details

Details for the file cinecli_ru-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: cinecli_ru-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cinecli_ru-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a8997d516067ec5c3cae946de1e41a7d6739bb49f0bccfadf070d4542484d41d
MD5 cc35222ef0bfc8fecf00c3da7e3c4280
BLAKE2b-256 c66392f14c6b7b141105e33a4b749d06765b08125d2a7db029eeae4d739b11ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page