telegram-cli (8) - Linux Manuals
telegram-cli: Command-line interface for Telegram messenger
NAME
telegram-cli - Command-line interface for Telegram messengerDESCRIPTION
telegram-cli -k <public-server-key>
By default, the public key is stored in /etc/telegram-cli/server.pub
Remember to put your international area code before the phone number:
{areacode}{cellphonenumber}
e.g. for Italy: +391234567890
This package contains a command-line based client for Telegram with the following features:
Supported commands
-
* Messaging
msg <peer> Text - Sends message to this peer
fwd <user> <msg-seqno> - Forward message to user. You can see message numbers starting client with -N
chat_with_peer <peer> - Starts one on one chat session with this peer. /exit or /quit to end this mode
add_contact <phone-number> <first-name> <last-name> - Tries to add contact to contact-list by phone
rename_contact <user> <first-name> <last-name> - Tries to rename contact. If you have another device it will be a fight
mark_read <peer> - Mark read all received messages with peer
delete_msg <msg-seqno> - Deletes message (not completly, though)
restore_msg <msg-seqno> - Restores delete message. Impossible for secret chats. Only possible short time (one hour, I think) after deletion* Multimedia
send_photo <peer> <photo-file-name> - Sends photo to peer
send_video <peer> <video-file-name> - Sends video to peer
send_text <peer> <text-file-name> - Sends text file as plain messages
load_photo/load_video/load_video_thumb/load_audio/load_document/load_document_thumb <msg-seqno> - Loads photo/video/audio/document to download dir
view_photo/view_video/view_video_thumb/view_audio/view_document/view_document_thumb <msg-seqno> - Loads photo/video to download dir and starts system default viewer
fwd_media <msg-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)
set_profile_photo <photo-file-name> - Sets userpic. Photo should be square, or server will cut biggest central square part* Group chat options
chat_info <chat> - Prints info about chat
chat_add_user <chat> <user> - Add user to chat
chat_del_user <chat> <user> - Remove user from chat
rename_chat <chat> <new-name>
create_group_chat <chat topic> <user1> <user2> <user3> ... - Creates a groupchat with users, use chat_add_user to add more users
chat_set_photo <chat> <photo-file-name> - Sets group chat photo. Same limits as for profile photos.* Search
search <peer> pattern - Searches pattern in messages with peer
global_search pattern - Searches pattern in all messages* Secret chat
create_secret_chat <user> - Creates secret chat with this user
visualize_key <secret_chat> - Prints visualization of encryption key. You should compare it to your partner's one
set_ttl <secret_chat> <ttl> - Sets ttl to secret chat. Though client does ignore it, client on other end can make use of it
accept_secret_chat <secret_chat> - Manually accept secret chat (only useful when starting with -E key)* Stats and various info
user_info <user> - Prints info about user
history <peer> [limit] - Prints history (and marks it as read). Default limit = 40
dialog_list - Prints info about your dialogs
contact_list - Prints info about users in your contact list
suggested_contacts - Print info about contacts, you have max common friends
stats - Just for debugging
show_license - Prints contents of GPLv2
help - Prints this help get_self - Get our user info* Card
export_card - Print your 'card' that anyone can later use to import your contact
import_card <card> - Gets user by card. You can write messages to him after that* Other
quit - Quit
safe_quit - Wait for all queries to end then quit
OPTIONS
telegram-cli Usage--phone/-u Specify username (would not be asked during authorization)
- --rsa-key/-k
- Specify location of public key (possible multiple entries)
- --verbosity/-v
- Increase verbosity (0-ERROR 1-WARNIN 2-NOTICE 3+-DEBUG-levels)
- --enable-msg-id/-N
- Message num mode
- --config/-c
- Config file name
- --profile/-p
- Use specified profile
- --log-level/-l
- Log level
- --sync-from-start/-f
- During authorization fetch all messages since registration
- --disable-auto-accept/-E
- disable auto accept of encrypted chats
- --lua-script/-s
- Lua script file
- --wait-dialog-list/-W
- Send dialog_list query and wait for answer before reading input
- --disable-colors/-C
- Disable color output
- --disable-readline/-R
- Disable readline
- --alert/-A
- Enable bell notifications
- --daemonize/-d
- Daemon mode
- --logname/-L <log-name>
- Log file name
- --username/-U <user-name>
- Change uid after start
- --groupname/-G <group-name>
- Change gid after start
- --disable-output/-D
- Disable output
- --tcp-port/-P <port>
- Port to listen for input commands
- --udp-socket/-S <socket-name>
- Unix socket to create
- --exec/-e <commands>
- Make commands end exit
- --disable-names/-I
- Use user and chat IDs in updates instead of names
- --enable-ipv6/-6
- Use ipv6 (may be unstable)
- --help/-h
- Prints this help
- --accept-any-tcp
- Accepts tcp connections from any src (only loopback by default)
- --disable-link-preview
- Disables server-side previews to links
- --bot/-b
- Bot mode
- --json
- Prints answers and values in json format
FILES
/usr/bin/generate/usr/bin/telegram-cli
/usr/bin/tl-parser
* Python2 bindings
/usr/bin/generate-2 -> /usr/bin/python2.7-generate
/usr/bin/generate-2.7 -> /usr/bin/python2.7-generate
/usr/bin/telegram-cli-2.7 -> /usr/bin/python2.7-telegram-cli
/usr/bin/telegram-cli-2 -> /usr/bin/python2.7-telegram-cli
/usr/bin/tl-parser-2 -> /usr/bin/python2.7-tl-parser
/usr/bin/tl-parser-2.7 -> /usr/bin/python2.7-tl-parser
/usr/bin/python2.7-tl-parser
/usr/bin/python2.7-telegram-cli
/usr/bin/python2.7-generate
* Python3 bindings
/usr/bin/generate-3 -> /usr/bin/python3.x-generate
/usr/bin/generate-3.x -> /usr/bin/python3.x-generate
/usr/bin/telegram-cli-3.x -> /usr/bin/python3.x-telegram-cli
/usr/bin/telegram-cli-3 -> /usr/bin/python3.x-telegram-cli
/usr/bin/tl-parser-3 -> /usr/bin/python3.x-tl-parser
/usr/bin/tl-parser-3.x -> /usr/bin/python3.x-tl-parser
/usr/bin/python3.x-tl-parser
/usr/bin/python3.x-telegram-cli
/usr/bin/python3.x-generate
VERSION
1.3.3BUGS
Bug tracker: https://github.com/vysheng/tg/issuesAUTHOR
Vitaliy Vatman (-@-)