Package: telminal
telminalA Terminal in Telegram!There is a lovely messenger in the world that has so many features that we can manage our Linux server with those features.What is this?Telminal is a Python package that helps you have your own server assistant Telegram bot.
You can use Telminal as a terminal or to download & upload files.Telminal features[x] HTML and image output[x] Process state info[x] Interactive command support[x] Download from server[x] Upload to server[x] Multi user[x] TasksGetting StartedPrerequisitesYou need telegram developer API and a bot tokenAPI ID API hashBot tokenVery fast and easy you can have those, just follow this two official links.Installationpip install telminalSetuphttps://user-images.githubusercontent.com/30555691/140306836-98773769-41d5-4d19-b113-f610766f85bf.mp4Runtelminalcommand after installation finished. Telminal needs those Telegram tokens for first run.Also you can create aconfig.jsonfile inside the package directory in this format:{
    "api_id": 1234,
    "api_hash": "abcs",
    "token": "efgh",
    "admins": [8888, 9999]
}⚠️ First admin can manage other admins, so order of admins list matter.In this sample config 8888 must be your Telegram user ID.Interactive Modehttps://user-images.githubusercontent.com/30555691/140306980-98bde1e9-0e3d-4fe8-889b-73cc2774935e.mp4You can activate this mode for last running process by sending/interactive_modeor by clicking onInteractive modebutton of each process.In interactive mode you are talking to the process and each message means an input for that process.Also a two characters message starts with^has own meaning and behave like a control command so^cmeansCTRL + C.To return to normal mode and creating a new process just use/normal_modeorExit interactive modebutton.Optional image outputhttps://user-images.githubusercontent.com/30555691/140307428-e627ca5e-4861-4061-af12-10fe9ad8371f.mp4Image creation for process result is optimized and will be okay on a server with minimum resources.However, creating an image on the server is an expensive process. so if you want to run multiple commands at once or have a process that does not require image output, I strongly recommend using the text version by sending\image_offcommand.Download file from serverhttps://user-images.githubusercontent.com/30555691/140307742-4ee6358a-4f9c-4289-aae4-55491d8e524d.mp4You can save any file (up to 2GB) of your server on telegram.There are two ways to do this :Inline query!get commandInline query just works for current directory and runs als -la | grep <your_query>in background.With!getcommand you can specify path of a file manually.Also you have a nice progress bar when you are downloading or uploading a heavy file.😎Upload file to serverhttps://user-images.githubusercontent.com/30555691/140307784-34f1246e-514d-41a0-b60f-1edc58fef1ab.mp4Upload a file on your server just by sending to Telminal chat.that file can be in telegram or on your hard disk.Multi admin in grouphttps://user-images.githubusercontent.com/30555691/140308347-a5bb32ce-658b-4d41-8984-2b52e29996f5.mp4Fortunately, all features can be used in a group too. by default, Telminal only responds to your commands.!trustand!untrustare two commands that manage a user permission.just reply to one of the user's messages with these commands.Taskshttps://user-images.githubusercontent.com/30555691/140308392-3cc1c786-6e55-488f-ae09-7b847441dc03.mp4At this moment there is only one type of task.Awatchertask downloads a file periodically. write your first watcher in the following format:!watch <number><s,m,h> <file_path>Some real examples :1️⃣ gettelminal.logevery 50 seconds
👉!watch 50s telminal.log2️⃣ gettemp.pngevery 5 minutes
👉!watch 5m home/temp.png3️⃣ getsql.dumpevery 24 hours
👉!watch 24h /backups/sql.dumpFinally set Telminal commands inBotfatherusing this text.image_off - Just text output
image_on - Text and image output
tasks - List of active tasks
interacive_mode - Interact with last process
normal_mode - Process creation modeThankspexpectTelethonxterm.jspuppeteer