Telegram-cli

Jul 20, 2023

Command-line interface for Telegram

Telegram-cli is a command-line interface for the Telegram instant-messaging network.


If you’re a FreeBSD user, the ports system can sometimes seem daunting. But with a little patience and a few helpful hints like this article!, it can become a powerful tool in your arsenal. We’ll look today at one specific port telegram-cli in the net-im category.

What is Telegram-cli?

Telegram-cli is a command-based interface for the popular messaging application Telegram, which can be installed and used on FreeBSD systems via the ports system. It provides all the conveniences of Telegram’s graphical client but in a terminal-friendly, command-based format.

Why use Telegram-cli?

There are many reasons why FreeBSD users might want to use telegram-cli. For example

  • It can be faster. With commands and scripts, certain repetitive tasks can be automated, making chatting and file-sharing quicker and more efficient.
  • It’s ideal for remote access. If you’re accessing your FreeBSD system remotely, a command-line interface is often more practical than a GUI.
  • It’s lighter on resources. Unlike the full Telegram client, telegram-cli requires minimal system resources.

But before we jump in, here’s a quick reminder ensure your FreeBSD system is secure and up-to-date. FreeBSD has a number of excellent security ports like [nmap]https//freebsdsoftware.org/security/nmap.html that can help you with this.

How to Install Telegram-cli

Telegram-cli isn’t pre-installed on FreeBSD systems, but it’s easy to add via the ports system. The first step is to navigate to the net-im category within the ports tree

cd /usr/ports/net-im/telegram-cli

Next, install the port

make install clean

These commands will download and compile the source code from tg’s GitHub repository and install it. This may take a while depending on your system’s specifications.

How to Configure Telegram-cli

Once installed, telegram-cli needs to be configured. The primary configuration file, telegram.conf, is located in /usr/local/etc/.

In this file, you can specify your Telegram account details, setup proxy settings, and control aesthetic factors like contact format.

nano /usr/local/etc/telegram.conf

Use Ctrl+X to save changes and exit. Remember to replace “nano” with your preferred text editor.

How to Use Telegram-cli

With telegram-cli installed and configured, you start the program by entering “telegram-cli” into the terminal.

Once it starts, you’ll see a prompt like

>

You type commands into this prompt. For example, to send a message, type

msg [Your_Contact's_Name] [Your message]

Here are a few other common telegram-cli commands

  • contact_list Displays a list of contacts.
  • chat_info [chat] Displays details about a chat.
  • history [peer] [limit] Displays your chat history.

You can quit telegram-cli at any time by typing quit or using the keyboard combination Ctrl+C.

More details on using specific telegram-cli commands can usually be found with the help or man commands.

Conclusion

Telegram-cli is an excellent addition to any FreeBSD system. It’s light, powerful, and highly customizable. Whether for personal or professional use, knowledge and usage of telegram-cli allows you to harness the power of Telegram in a FreeBSD-friendly way. And now, you’re one step closer to becoming a FreeBSD ports master. Happy messaging!


Checkout these related ports:
  • Zoom - Zoom videoconferencing client (CAVEAT Sound doesn't yet work)
  • Zkgroup - Library for the Signal Private Group System
  • Zephyr - Enterprise-scale distributed messaging system
  • Yume - Encrypted peer-to-peer IPv6 UDP messaging terminal
  • Yoono - Client for Twitter and other social networks
  • Xmpp-client - XMPP client with OTR support
  • Vqcc-gtk - LAN chat client compatible with quickChat and Vypress Chat (TM)
  • Utox - Lightweight Tox client
  • Twirssi - Twitter script to irssi
  • Tut - TUI for Mastodon
  • Toxins - Collection of small programs using toxcore
  • Toxic - Console client for Tox
  • Toxext - Extension library for tox
  • Toxbot - Groupchat control bot for Tox
  • Tox_extension_messages - Message extension library for tox