{"id":13493908,"url":"https://github.com/botgram/shell-bot","last_synced_at":"2025-03-28T13:31:18.609Z","repository":{"id":40660033,"uuid":"98029130","full_name":"botgram/shell-bot","owner":"botgram","description":":robot: Telegram bot that executes commands and sends the live output","archived":false,"fork":false,"pushed_at":"2024-02-20T21:23:32.000Z","size":82,"stargazers_count":797,"open_issues_count":38,"forks_count":490,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-10-31T08:37:32.365Z","etag":null,"topics":["telegram","telegram-bot","terminal-emulator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botgram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-22T12:12:07.000Z","updated_at":"2024-10-07T19:36:25.000Z","dependencies_parsed_at":"2024-10-31T08:31:32.911Z","dependency_job_id":null,"html_url":"https://github.com/botgram/shell-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botgram%2Fshell-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botgram%2Fshell-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botgram%2Fshell-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botgram%2Fshell-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botgram","download_url":"https://codeload.github.com/botgram/shell-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246037288,"owners_count":20713388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["telegram","telegram-bot","terminal-emulator"],"created_at":"2024-07-31T19:01:19.930Z","updated_at":"2025-03-28T13:31:18.268Z","avatar_url":"https://github.com/botgram.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# shell-bot\n\nThis is a fully functional shellrunner [Telegram bot][]. You tell it a\ncommand, it executes it and posts the live output. You can send input to the\ncommand by replying to the output messages.\n\nIt's a fairly complex example, because it actually appears to the\ncommand as a terminal, interprets escape sequences and **it will\nupdate messages if their lines get touched**. This means interactive\nprograms such as wget should work naturally, you should see the\nstatus bar update.\n\nThe bot also allows files to be uploaded or downloaded, and also\nhas a simple text editor available for convenience.\n\nHere's an example of the bot running `git` to clone a repository:\n\n![Basic tasks](http://i.imgur.com/Xxtoe4G.png)\n\nHere's an example of the bot running alsamixer:\n\n![Alsamixer with keypad](http://i.imgur.com/j8aXFLd.png)\n\nThis bot demonstrates a great part of [Botgram][]'s API.\n\n**Note:** Due to the tight integration, running this bot on Windows is\ncurrently *not* supported.\n\n## Install\n\nFirst install [node-pty dependencies](https://github.com/Microsoft/node-pty#dependencies). For example, if you're in Ubuntu/Debian:\n\n~~~\nsudo apt install -y make python build-essential\n~~~\n\nIf you're using fedora instead:\n```\nsudo dnf install -y python\nsudo dnf group install -y \"C Development Tools and Libraries\" \n```\n\nBefore using this, you should have obtained an auth token for your bot,\nand know your personal user's numeric ID. If you don't know what this\nmeans, check out the [blog post][] for a full step-by-step guide.\n\n~~~\ngit clone https://github.com/botgram/shell-bot.git \u0026\u0026 cd shell-bot\nnpm install\n~~~\n\nTo start the bot:\n\n~~~\nnode server\n~~~\n\nThe first time you run it, it will ask you some questions and create\nthe configuration file automatically: `config.json`. You can also\nwrite it manually, see `config.example.json`.\n\nWhen started it will print a `Bot ready.` message when it's up and running.\nFor convenience, you might want to talk to the BotFather and set the\ncommand list to the contents of `commands.txt`.\n\n## Authorization\n\nWhen first started, the bot will just accept messages coming from your user.\nThis is for security reasons: you don't want arbitrary people to issue\ncommands to your computer!\n\nIf you want to allow another user to use the bot, use `/token` and give\nthat user the resulting link. If you want to use this bot on a group,\n`/token` will give you a message to forward into the group.\n\n## Proxy server\n\nshell-bot obeys the `https_proxy` or `all_proxy` environment variable\nto use a proxy, and supports HTTP/HTTPS/SOCKS4/SOCKS4A/SOCKS5 proxies.\nExamples:\n\n~~~ bash\nexport https_proxy=\"http://168.63.76.32:3128\"\nnode server\n\nexport https_proxy=\"socks://127.0.0.1:9050\"\nnode server\n~~~\n\n**Warning:** For SOCKS proxies, you need to use an IP address (not a DNS hostname).\n\n\n\n[Telegram bot]: https://core.telegram.org/bots\n[Botgram]: https://botgram.js.org\n[blog post]: https://alba.sh/blog/telegram-shell-bot/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotgram%2Fshell-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotgram%2Fshell-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotgram%2Fshell-bot/lists"}