telegram cli

telegeram2025-06-16 11:58:4811

Telegram CLI: Your Ultimate Tool for Managing Your Channels and Chats

Introduction to Telegram CLI

Telegram CLI is an open-source command-line interface tool that allows you to manage your Telegram channels and chats from the comfort of your terminal. This guide will walk you through how to set up and use Telegram CLI on your Linux system.

Prerequisites

Before diving into Telegram CLI, ensure you have:

  • A recent version of git installed (sudo apt-get install git)
  • A Unix-like shell (e.g., Bash)
  • The necessary permissions to run the application as root or with appropriate user privileges

Installation Steps

To get started with Telegram CLI, follow these steps:

  1. Clone the Repository: Open your terminal and navigate to where you want to clone the repository. Then, run:

    git clone https://github.com/YourGitHubAccount/TelegramCLI.git
    cd TelegramCLI/
  2. Install Dependencies: Before installing Telegram CLI, make sure all dependencies are installed. Run:

    sudo apt-get update && sudo apt-get install -y python3-pip libffi-dev build-essential
    pip3 install -r requirements.txt
  3. Setup Environment Variables: To configure Telegram CLI correctly, create a .env file in the root directory with the following content:

    TELEGRAM_TOKEN=<your_telegram_token>
    CHAT_ID=<chat_id>
  4. Run Telegram CLI: Finally, start Telegram CLI using the following command:

    ./telegram-cli.py
  5. Add Channel/Chat: Once Telegram CLI is running, add a channel or chat ID by entering ./add <channel_id_or_chat_id> in the terminal.

Basic Commands

After setting everything up, you can perform various tasks using the commands below:

  • List All Channels/Chats:

    ./list
  • Send Message:

    ./send "message"
  • Edit Channel Info:

    ./edit <channel_name> "new_info"
  • Delete Channel:

    ./delete <channel_id_or_chat_id>
  • Create New Chat:

    ./create "name"
  • View Detailed Information:

    ./info <channel_id_or_chat_id>

Advanced Features

For more advanced features like fetching messages, managing users, and more, check out the full documentation available here.

Conclusion

Telegram CLI offers a powerful way to interact with Telegram directly from your terminal. Whether you're a developer looking to integrate Telegram functionalities into your applications or just need quick access to manage your channels, this tool is definitely worth considering.

By following this guide, you should be able to easily get started with Telegram CLI and start leveraging its capabilities right away!

本文链接:https://www.insteegram.com/post/489.html

TelegramBotAPIBotSDK

阅读更多