Skip to main content

tflix: A Telegram CLI interface for media downloading and streaming.

Project description

tflix

A Telegram CLI interface for media downloading and streaming.

Description

tflix streamlines the process of discovering and downloading media files from Telegram bots. It provides an interactive command-line interface that handles bot navigation, automatic channel joining, and media file downloads with minimal user intervention.

Features

  • Interactive CLI - Navigate bot menus and send messages directly from the terminal
  • Auto-Join Support - Automatically joins groups via invite links when required
  • Button Navigation - Click numbered options from bot menus instantly
  • Media Filtering - Lists and downloads files

Requirements

Installation

From PyPI

pip install tflix

From Source

git clone https://github.com/voidsnax/tflix.git
cd tflix
pip install -e .

Usage

Setup Guide

Creating the .env File

  1. Locate the config folder:

    • Windows: C:\Users\<User>\AppData\Local\tflix\
    • Linux/Mac: ~/.config/tflix/
  2. Create a new file named .env in the config folder

  3. Get your Telegram API credentials:

    • Visit https://my.telegram.org
    • Log in with your Telegram account
    • Go to "API development tools"
    • Create a new application
    • Copy your api_id and api_hash
  4. Add your credentials to .env:

    TGRAM_API_ID=your_api_id_here
    TGRAM_API_HASH=your_api_hash_here
    
  5. Save the file

Basic Command

tflix [CHAT] [OPTIONS]

Options

CHAT                  Chat username, ID, or link
-o, --output PATH     Output directory for downloads (default: current directory)
-l, --list VALUE      List recent N bot media messages (default: 2, max: 100)

Interactive Commands

[Text]     → Send message to bot
[Number]   → Click button # from available options
q[n]       → Quit and download last n messages
exit       → Exit without downloading

Examples

Connect to default bot and list 5 recent files:

tflix -l 5

Connect to a specific bot and set output folder:

tflix @bot -o C:\

Then interact:

Connected to: @bot
---------------------------------------------
Commands:
  [Text]     -> Send message
  [Number]   -> Click button # from the list
  exit       -> Quit
---------------------------------------------


## Notes

- **API Credentials** - Create `.env` in config folder with `TGRAM_API_ID` and `TGRAM_API_HASH`
- **Session Changes** - Overwrites existing session when .env file attributes changes
- **Private groups** - need invite link
- **Inactivity Timeout** - Sessions automatically exit after 10 minutes without input (when server is not running)
- **File Freshness** - Re-fetch files if older downloads fail; bots may remove expired links
- **Input Delay** - Allow 10-15 seconds for input to process if responses seem delayed
- **Message Listing** - Limited to 100 recent messages per query

## License

MIT License

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

tflix-1.0.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

tflix-1.0.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file tflix-1.0.0.tar.gz.

File metadata

  • Download URL: tflix-1.0.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tflix-1.0.0.tar.gz
Algorithm Hash digest
SHA256 77e887ed4b1cf5c47e8ad2a701fc7ba6ef19b1ef0464be5340d06cac82eb3062
MD5 563a92b957682e7ee5d8eb026f26ca56
BLAKE2b-256 2cc5d008ad90540afc83ce5b4c65e9f5eeeabbc55b5436cfa8936f238efa8cb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tflix-1.0.0.tar.gz:

Publisher: publish.yaml on voidsnax/tflix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tflix-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tflix-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tflix-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb98bae89575a90be1f34870a52fda01b2ad70afae7c37d22009189501beeeb2
MD5 7931046865999fd47d5a50fd2ebe3dc3
BLAKE2b-256 ced37be1c63f1e1e6169df1a517b2f01269ef02bb51a69dbf33e596c6923ff0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tflix-1.0.0-py3-none-any.whl:

Publisher: publish.yaml on voidsnax/tflix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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