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
- Python 3.8+
- Telegram API Credentials
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
-
Locate the config folder:
- Windows:
C:\Users\<User>\AppData\Local\tflix\ - Linux/Mac:
~/.config/tflix/
- Windows:
-
Create a new file named
.envin the config folder -
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_idandapi_hash
-
Add your credentials to
.env:TGRAM_API_ID=your_api_id_here TGRAM_API_HASH=your_api_hash_here -
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83aa469cdf90b35426e3e5481e1a8c0683f76a8d02a9cad633c9c473a469691e
|
|
| MD5 |
7f79b9f39d5349bd6598449634f5346c
|
|
| BLAKE2b-256 |
6367e1b10b8efb75ed24a4e4c55e80335ad574073e0c86a1e5932adfe250a570
|
Provenance
The following attestation bundles were made for tflix-1.1.0.tar.gz:
Publisher:
publish.yaml on voidsnax/tflix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tflix-1.1.0.tar.gz -
Subject digest:
83aa469cdf90b35426e3e5481e1a8c0683f76a8d02a9cad633c9c473a469691e - Sigstore transparency entry: 1134904447
- Sigstore integration time:
-
Permalink:
voidsnax/tflix@c5437e13ddc52ea71fcc97eaed6fde4dbc6754e0 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/voidsnax
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c5437e13ddc52ea71fcc97eaed6fde4dbc6754e0 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712e82a6386aadd4dd753280f442b37ccbef7d3d683a45f668e0d017d4eb83e3
|
|
| MD5 |
433a39736b491e83ffbd09bbbf1c818b
|
|
| BLAKE2b-256 |
8f41f0e7d79cbb858605baba6427e7ba74e9105a484ea7e428b333e8ece23c58
|
Provenance
The following attestation bundles were made for tflix-1.1.0-py3-none-any.whl:
Publisher:
publish.yaml on voidsnax/tflix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tflix-1.1.0-py3-none-any.whl -
Subject digest:
712e82a6386aadd4dd753280f442b37ccbef7d3d683a45f668e0d017d4eb83e3 - Sigstore transparency entry: 1134904517
- Sigstore integration time:
-
Permalink:
voidsnax/tflix@c5437e13ddc52ea71fcc97eaed6fde4dbc6754e0 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/voidsnax
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c5437e13ddc52ea71fcc97eaed6fde4dbc6754e0 -
Trigger Event:
push
-
Statement type: