https://github.com/alex5402/telegram-cli
A telegram cli tool to upload files and send message on telegram using telegram id
https://github.com/alex5402/telegram-cli
telegram telegram-api telegram-cli
Last synced: 4 months ago
JSON representation
A telegram cli tool to upload files and send message on telegram using telegram id
- Host: GitHub
- URL: https://github.com/alex5402/telegram-cli
- Owner: ALEX5402
- License: mit
- Created: 2024-12-30T11:44:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-30T12:46:29.000Z (about 1 year ago)
- Last Synced: 2025-06-12T09:53:11.326Z (8 months ago)
- Topics: telegram, telegram-api, telegram-cli
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# π Telegram CLI Tool
A simple and efficient command-line interface (CLI) tool for interacting with Telegram. This project is built using Python and packaged into a standalone executable using PyInstaller.
---
## π Features
- π€ Send text messages
- π Send files with optional descriptions
- π Works with private chats, groups, and channels
- π Secure and lightweight executable
---
## π οΈ Build Instructions
Follow these steps to build the project into a standalone executable:
### Prerequisites
1. π **Python 3.8+**
2. π¦ Required dependencies (install via `requirements.txt`):
```bash
pip install -r requirements.txt
```
3. π οΈ **PyInstaller**:
```bash
pip install pyinstaller
```
### Building the Executable
1. Clone the repository and navigate to the project directory.
2. Run the following command to build the executable:
```bash
make
```
### Cleaning Up
To remove build artifacts and temporary files:
```bash
make clean
```
---
## π¦ Generated Executable
- The standalone executable will be located in the `dist` folder after the build process.
- Run the executable using:
```bash
./dist/telegram-cli
```
---
## π§ Usage
Hereβs how to use the CLI tool:
### Sending a Text Message
```bash
./dist/telegram-cli -p -t "Hello, this is a test message!"
```
### Sending a File with Description
```bash
./dist/telegram-cli -g -F /path/to/file.txt -d "File description here."
```
### Available Options
| Option | Description |
|------------------|-----------------------------------|
| `-p ` | Send to a private user |
| `-g ` | Send to a group |
| `-c `| Send to a channel |
| `-t ` | Text message to send |
| `-F ` | File path to send |
| `-d `| Description for the file (optional)|
---
## π File Structure
```plaintext
βββ telegram-cli.py # Main script
βββ requirements.txt # Dependencies
βββ Makefile # Build automation
βββ dist/ # Generated executables
βββ README.md # Project documentation
```
---
## π Contributions
Contributions are welcome! Feel free to open issues or submit pull requests. π
---
## π License
This project is licensed under the MIT License. See `LICENSE` for details.
---
## π€ Acknowledgments
- Built with β€οΈ using [Telethon](https://docs.telethon.dev/)
- Packaged with π οΈ [PyInstaller](https://www.pyinstaller.org/)
---
## π Let's Build Together!
If you find this project helpful, please β it and share it with others! π