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.1.0.tar.gz (18.2 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.1.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tflix-1.1.0.tar.gz
Algorithm Hash digest
SHA256 83aa469cdf90b35426e3e5481e1a8c0683f76a8d02a9cad633c9c473a469691e
MD5 7f79b9f39d5349bd6598449634f5346c
BLAKE2b-256 6367e1b10b8efb75ed24a4e4c55e80335ad574073e0c86a1e5932adfe250a570

See more details on using hashes here.

Provenance

The following attestation bundles were made for tflix-1.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: tflix-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 712e82a6386aadd4dd753280f442b37ccbef7d3d683a45f668e0d017d4eb83e3
MD5 433a39736b491e83ffbd09bbbf1c818b
BLAKE2b-256 8f41f0e7d79cbb858605baba6427e7ba74e9105a484ea7e428b333e8ece23c58

See more details on using hashes here.

Provenance

The following attestation bundles were made for tflix-1.1.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