[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6369":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},6369,"tg","vysheng\u002Ftg","vysheng","telegram-cli","",null,"C",7077,1740,325,1188,0,1,12,68,7,40.72,"GNU General Public License v2.0",false,"master",[],"2026-06-12 02:01:19","## Telegram messenger CLI [![Build Status](https:\u002F\u002Ftravis-ci.org\u002Fvysheng\u002Ftg.png)](https:\u002F\u002Ftravis-ci.org\u002Fvysheng\u002Ftg)\n\nCommand-line interface for [Telegram](http:\u002F\u002Ftelegram.org). Uses readline interface.\n\n### API, Protocol documentation\n\nDocumentation for Telegram API is available here: http:\u002F\u002Fcore.telegram.org\u002Fapi\n\nDocumentation for MTproto protocol is available here: http:\u002F\u002Fcore.telegram.org\u002Fmtproto\n\n### Upgrading to version 1.0\n\nFirst of all, the binary is now in .\u002Fbin folder and is named telegram-cli. So be careful, not to use old binary.\n\nSecond, config folder is now ${HOME}\u002F.telegram-cli\n\nThird, database is not compatible with older versions, so you'll have to login again.\n\nFourth, in peer_name '#' are substitued to '@'. (Not applied to appending of '#%d' in case of two peers having same name).\n\n### Installation\n\nClone GitHub Repository\n\n     git clone --recursive https:\u002F\u002Fgithub.com\u002Fvysheng\u002Ftg.git && cd tg\n\n### Python Support\n\nPython support is currently limited to Python 2.7 or Python 3.1+. Other versions may work but are not tested.\n\n#### Linux and BSDs\n\nInstall libs: readline, openssl and (if you want to use config) libconfig, liblua, python and libjansson.\nIf you do not want to use them pass options --disable-libconfig, --disable-liblua, --disable-python and --disable-json respectively.\n\nOn Ubuntu\u002FDebian use: \n\n     sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make \n\nOn gentoo:\n\n     sudo emerge -av sys-libs\u002Freadline dev-libs\u002Flibconfig dev-libs\u002Fopenssl dev-lang\u002Flua dev-libs\u002Flibevent dev-libs\u002Fjansson dev-lang\u002Fpython\n\nOn Fedora:\n\n     sudo dnf install lua-devel openssl-devel libconfig-devel readline-devel libevent-devel libjansson-devel python-devel\n\nOn Archlinux:\n\n     yaourt -S telegram-cli-git\n\nOn FreeBSD:\n\n     pkg install libconfig libexecinfo lua52 python\n\nOn OpenBSD:\n\n     pkg_add libconfig libexecinfo lua python\n\nOn openSUSE:\n\n     sudo zypper in lua-devel libconfig-devel readline-devel libevent-devel libjansson-devel python-devel libopenssl-devel\n\nThen,\n\n     .\u002Fconfigure\n     make\n\n#### Other methods to install on linux\n\nOn Gentoo: use ebuild provided.\n\nOn Arch: https:\u002F\u002Faur.archlinux.org\u002Fpackages\u002Ftelegram-cli-git\n\n#### Mac OS X\n\nThe client depends on [readline library](http:\u002F\u002Fcnswww.cns.cwru.edu\u002Fphp\u002Fchet\u002Freadline\u002Frltop.html) and [libconfig](http:\u002F\u002Fwww.hyperrealm.com\u002Flibconfig\u002F), which are not included in OS X by default. You have to install these libraries manually.\n\nIf using [Homebrew](http:\u002F\u002Fbrew.sh\u002F):\n\n     brew install libconfig readline lua python libevent jansson\n     export CFLAGS=\"-I\u002Fusr\u002Flocal\u002Finclude -I\u002Fusr\u002Flocal\u002FCellar\u002Freadline\u002F6.3.8\u002Finclude\"\n     export LDFLAGS=\"-L\u002Fusr\u002Flocal\u002Flib -L\u002Fusr\u002Flocal\u002FCellar\u002Freadline\u002F6.3.8\u002Flib\"\n     .\u002Fconfigure && make\n\nThanks to [@jfontan](https:\u002F\u002Fgithub.com\u002Fvysheng\u002Ftg\u002Fissues\u002F3#issuecomment-28293731) for this solution.\n\nIf using [MacPorts](https:\u002F\u002Fwww.macports.org):\n     \n     sudo port install libconfig-hr\n     sudo port install readline\n     sudo port install lua51\n     sudo port install python34\n     sudo port install libevent\n     export CFLAGS=\"-I\u002Fusr\u002Flocal\u002Finclude -I\u002Fopt\u002Flocal\u002Finclude -I\u002Fopt\u002Flocal\u002Finclude\u002Flua-5.1\"\n     export LDFLAGS=\"-L\u002Fusr\u002Flocal\u002Flib -L\u002Fopt\u002Flocal\u002Flib -L\u002Fopt\u002Flocal\u002Flib\u002Flua-5.1\"\n     .\u002Fconfigure && make\n\nInstall these ports:\n\n* devel\u002Flibconfig\n* devel\u002Flibexecinfo\n* lang\u002Flua52\n\nThen build:\n\n     env CC=clang CFLAGS=-I\u002Fusr\u002Flocal\u002Finclude LDFLAGS=-L\u002Fusr\u002Flocal\u002Flib LUA=\u002Fusr\u002Flocal\u002Fbin\u002Flua52 LUA_INCLUDE=-I\u002Fusr\u002Flocal\u002Finclude\u002Flua52 LUA_LIB=-llua-5.2 .\u002Fconfigure\n     make\n\n#### Other UNIX\n\nIf you manage to launch it on other UNIX, please let me know.\n\n### Contacts \nIf you would like to ask a question, you can write to my telegram or to the github (or both). To contact me via telegram, you should use import_card method with argument 000653bf:0738ca5d:5521fbac:29246815:a27d0cda\n\n\n### Usage\n\n    bin\u002Ftelegram-cli -k \u003Cpublic-server-key>\n    \nBy default, the public key is stored in tg-server.pub in the same folder or in \u002Fetc\u002Ftelegram-cli\u002Fserver.pub. If not, specify where to find it:\n\n    bin\u002Ftelegram-cli -k tg-server.pub\n\nClient support TAB completion and command history.\n\nPeer refers to the name of the contact or dialog and can be accessed by TAB completion.\nFor user contacts peer name is Name \u003Cunderscore> Lastname with all spaces changed to underscores.\nFor chats it is it's title with all spaces changed to underscores\nFor encrypted chats it is \u003CExсlamation mark> \u003Cunderscore> Name \u003Cunderscore> Lastname with all spaces changed to underscores. \n\nIf two or more peers have same name, \u003Csharp>number is appended to the name. (for example A_B, A_B#1, A_B#2 and so on)\n  \n### Supported commands\n\n#### Messaging\n\n* **msg** \\\u003Cpeer\\> Text - sends message to this peer\n* **fwd** \\\u003Cuser\\> \\\u003Cmsg-seqno\\> - forward message to user. You can see message numbers starting client with -N\n* **chat_with_peer** \\\u003Cpeer\\> starts one on one chat session with this peer. \u002Fexit or \u002Fquit to end this mode.\n* **add_contact** \\\u003Cphone-number\\> \\\u003Cfirst-name\\> \\\u003Clast-name\\> - tries to add contact to contact-list by phone\n* **rename_contact** \\\u003Cuser\\> \\\u003Cfirst-name\\> \\\u003Clast-name\\> - tries to rename contact. If you have another device it will be a fight\n* **mark_read** \\\u003Cpeer\\> - mark read all received messages with peer\n* **delete_msg** \\\u003Cmsg-seqno\\> - deletes message (not completly, though)\n* **restore_msg** \\\u003Cmsg-seqno\\> - restores delete message. Impossible for secret chats. Only possible short time (one hour, I think) after deletion\n\n#### Multimedia\n\n* **send_photo** \\\u003Cpeer\\> \\\u003Cphoto-file-name\\> - sends photo to peer\n* **send_video** \\\u003Cpeer\\> \\\u003Cvideo-file-name\\> - sends video to peer\n* **send_text** \\\u003Cpeer\\> \\\u003Ctext-file-name> - sends text file as plain messages\n* **load_photo**\u002Fload_video\u002Fload_video_thumb\u002Fload_audio\u002Fload_document\u002Fload_document_thumb \\\u003Cmsg-seqno\\> - loads photo\u002Fvideo\u002Faudio\u002Fdocument to download dir\n* **view_photo**\u002Fview_video\u002Fview_video_thumb\u002Fview_audio\u002Fview_document\u002Fview_document_thumb \\\u003Cmsg-seqno\\> - loads photo\u002Fvideo to download dir and starts system default viewer\n* **fwd_media** \\\u003Cmsg-seqno\\> send media in your message. Use this to prevent sharing info about author of media (though, it is possible to determine user_id from media itself, it is not possible get access_hash of this user)\n* **set_profile_photo** \\\u003Cphoto-file-name\\> - sets userpic. Photo should be square, or server will cut biggest central square part\n\n\n#### Group chat options\n\n* **chat_info** \\\u003Cchat\\> - prints info about chat\n* **chat_add_user** \\\u003Cchat\\> \\\u003Cuser\\> - add user to chat\n* **chat_del_user** \\\u003Cchat\\> \\\u003Cuser\\> - remove user from chat\n* **rename_chat** \\\u003Cchat\\> \\\u003Cnew-name\\>\n* **create_group_chat** \\\u003Cchat topic\\> \\\u003Cuser1\\> \\\u003Cuser2\\> \\\u003Cuser3\\> ... - creates a groupchat with users, use chat_add_user to add more users\n* **chat_set_photo** \\\u003Cchat\\> \\\u003Cphoto-file-name\\> - sets group chat photo. Same limits as for profile photos.\n\n#### Search\n\n* **search** \\\u003Cpeer\\> pattern - searches pattern in messages with peer\n* **global_search** pattern - searches pattern in all messages\n\n#### Secret chat\n\n* **create_secret_chat** \\\u003Cuser\\> - creates secret chat with this user\n* **visualize_key** \\\u003Csecret_chat\\> - prints visualization of encryption key. You should compare it to your partner's one\n* **set_ttl** \\\u003Csecret_chat\\> \\\u003Cttl\\> - sets ttl to secret chat. Though client does ignore it, client on other end can make use of it\n* **accept_secret_chat** \\\u003Csecret_chat\\> - manually accept secret chat (only useful when starting with -E key)\n\n#### Stats and various info\n\n* **user_info** \\\u003Cuser\\> - prints info about user\n* **history** \\\u003Cpeer\\> [limit] - prints history (and marks it as read). Default limit = 40\n* **dialog_list** - prints info about your dialogs\n* **contact_list** - prints info about users in your contact list\n* **suggested_contacts** - print info about contacts, you have max common friends\n* **stats** - just for debugging\n* **show_license** - prints contents of GPLv2\n* **help** - prints this help\n* **get_self** - get our user info\n\n#### Card\n* **export_card** - print your 'card' that anyone can later use to import your contact\n* **import_card** \\\u003Ccard\\> - gets user by card. You can write messages to him after that.\n\n#### Other\n* **quit** - quit\n* **safe_quit** - wait for all queries to end then quit\n","vysheng\u002Ftg 是一个为 Telegram 提供命令行界面的工具。它基于 C 语言开发，利用 readline 接口实现交互，并支持包括 MTProto 协议在内的 Telegram API。项目具备强大的自定义能力，允许用户通过配置文件调整客户端行为，同时提供对 Python 的有限支持以扩展功能。适用于需要在服务器环境或无图形界面条件下使用 Telegram 的场景，如自动化脚本、远程管理等。此外，其跨平台特性使其能够在 Linux、BSDs 以及 Mac OS X 等多种操作系统上运行。",2,"2026-06-11 03:06:42","top_language"]