Skip to content

Maron09/Mov-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ mov-cli

A fast, modular, terminal-based CLI for searching and streaming movies & TV series. Inspired by ani-cli.

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  ๐ŸŽฌ  mov-cli  โ€” your terminal cinema  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Features

Feature Status
Search movies & TV (TMDB) โœ…
Rich interactive result tables โœ…
Arrow-key / number selection โœ…
Torrent sources (YTS + EZTV) โœ…
mpv / VLC playback โœ…
Magnet streaming (webtorrent / peerflix) โœ…
SQLite search cache (TTL-based) โœ…
Watch history โœ…
Season / episode picker (TV) โœ…
Trending movies & shows โœ…
Pluggable provider system โœ…
Config file โœ…

Requirements

Tool Purpose Install
Python 3.10+ Runtime โ€”
mpv or VLC Media playback mpv.io
webtorrent-cli or peerflix Magnet streaming npm i -g webtorrent-cli
TMDB API key Search themoviedb.org/settings/api

Installation

# From PyPI (once published)
pip install mov-cli

# From source
git clone https://github.com/Maron09/Mov-cli.git
cd mov-cli
pip install -e .

Setup

1. Get a free TMDB API key

Register at https://www.themoviedb.org/settings/api (free, takes 30 seconds).

2. Configure the key

Option A โ€” environment variable (recommended)

export TMDB_API_KEY=your_key_here
# Add to ~/.bashrc or ~/.zshrc to persist

Option B โ€” config file

mov-cli config set tmdb_api_key your_key_here

3. Check your setup

mov-cli doctor

Usage

Search and stream

# Search all types
mov-cli search "Inception"

# Search movies only
mov-cli search "The Dark Knight" --type movie

# Search TV shows
mov-cli search "Breaking Bad" --type tv

# Jump straight to S3E4
mov-cli search "The Office" --type tv --season 3 --episode 4

Trending

mov-cli trending
mov-cli trending --type movie --window week --play

History

mov-cli history
mov-cli history --limit 50
mov-cli history --clear

Config

mov-cli config show
mov-cli config set preferred_player vlc
mov-cli config set default_quality 1080p
mov-cli config set cache_ttl_hours 48

Cache

mov-cli cache         # show cache status
mov-cli cache --clear # wipe cached search results

System check

mov-cli doctor
mov-cli version

Interactive flow

$ mov-cli search "Interstellar"

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  ๐ŸŽฌ  mov-cli  โ€” your terminal cinema  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Searching for 'Interstellar'โ€ฆ

โ•ญโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ # โ”‚ Title           โ”‚ Type  โ”‚ Year โ”‚ Rating   โ”‚ Overview     โ”‚
โ”œโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1 โ”‚ Interstellar    โ”‚ Movie โ”‚ 2014 โ”‚ 8.4/10   โ”‚ A team ofโ€ฆ  โ”‚
โ”‚ 2 โ”‚ Interstellarโ€ฆ   โ”‚  TV   โ”‚ 2007 โ”‚ 6.2/10   โ”‚ โ€ฆ           โ”‚
โ•ฐโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Select title [1-2] (q to quit): 1

Fetching sources for Interstellarโ€ฆ

โ•ญโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ # โ”‚ Title                            โ”‚ Quality โ”‚ Seeders โ”‚ Size     โ”‚
โ”œโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1 โ”‚ Interstellar [1080p] [BLURAY]    โ”‚ 1080p   โ”‚    4821 โ”‚ 2.2 GB   โ”‚
โ”‚ 2 โ”‚ Interstellar [720p] [WEB]        โ”‚ 720p    โ”‚    2100 โ”‚ 1.1 GB   โ”‚
โ”‚ 3 โ”‚ Interstellar [4K] [REMUX]        โ”‚ 4K      โ”‚     340 โ”‚ 55.0 GB  โ”‚
โ•ฐโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Select source [1-3] (q to quit): 1

โ–ถ Launching mpv for Interstellar [1080p]โ€ฆ

Configuration reference

Config file: ~/.mov-cli/config.json

Key Default Description
tmdb_api_key "" TMDB API key (env: TMDB_API_KEY)
preferred_player "mpv" "mpv" or "vlc"
default_quality "1080p" Preferred quality hint
player_args [] Extra flags passed to the player
cache_enabled true Enable/disable search cache
cache_ttl_hours 24 Hours before cached results expire
request_timeout 10 HTTP timeout in seconds
max_search_results 10 Maximum TMDB results shown

Environment variables override config file values:

  • TMDB_API_KEY
  • MOVCLI_<KEY_UPPERCASE> (e.g. MOVCLI_PREFERRED_PLAYER=vlc)

Architecture

mov_cli/
โ”œโ”€โ”€ main.py               โ† Typer CLI entry point & command definitions
โ”œโ”€โ”€ cli/
โ”‚   โ””โ”€โ”€ commands.py       โ† Interactive UI, table rendering, user prompts
โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ tmdb_service.py   โ† Async TMDB API client
โ”‚   โ”œโ”€โ”€ torrent_service.pyโ† Pluggable source providers (YTS, EZTV, โ€ฆ)
โ”‚   โ””โ”€โ”€ player_service.py โ† mpv / VLC launcher + torrent streamer detection
โ”œโ”€โ”€ models/
โ”‚   โ””โ”€โ”€ media.py          โ† MediaResult, StreamSource, WatchHistoryEntry
โ”œโ”€โ”€ utils/
โ”‚   โ”œโ”€โ”€ cache.py          โ† SQLite cache & watch history
โ”‚   โ””โ”€โ”€ config.py         โ† Config file management
โ””โ”€โ”€ db/                   โ† SQLite database lives here at runtime

Adding a new source provider

# mov_cli/services/torrent_service.py

class MyCustomProvider(SourceProvider):
    name = "MyProvider"

    async def fetch_sources(
        self,
        media: MediaResult,
        season=None,
        episode=None,
    ) -> list[StreamSource]:
        # ... query your source ...
        return [StreamSource(...)]

# Register it
aggregator.register(MyCustomProvider())

Development

# Install with dev extras
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Lint
ruff check mov_cli/

Legal

mov-cli queries publicly available APIs and torrent indexes. It does not host, store, or distribute any copyrighted content. Users are responsible for complying with the laws of their jurisdiction.


License

MIT ยฉ mov-cli contributors

About

A fast, modular, terminal-based CLI for searching and streaming movies & TV series.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages