BashBot is a Discord bot that provides terminal access via chat.
This bot is in work in progress state
There are few features missing such as help command. List of commands is available in readme below
- Interactive. Works with
nano
,htop
etc - Reactions can be used as input keys
- Open/Close/Select/Freeze terminal sessions
- Run terminal session as different user
These instructions will get you a bot installed and running quickly
- Python 3.5+
pyte
library (installation instructions below)discord.py
library (installation instructions below)
Type following commands to install dependencies:
pip install -r requirements.txt
In order to run bot you have to obtain a bot account. It can be obtained through the applications page. Later you have to transform your app into app bot user
After this operation reveal your token and copy it
And run
python bashbot.py
Now BashBot should start and show later instructions
(Every command have to start with prefix. By default it's "$". You can change it in settings. More information about commands after typing "$.help")
Command | Alias | Usage | Description |
---|---|---|---|
.about | - | .about | Shows information about project |
.open | .o | .open [name] | Opens new terminal session |
.close | .c | .close | Closes current terminal session |
.freeze | .f | .freeze | Freezes current terminal session |
.here | .h | .here | Moves selected terminal below the user message |
.select | .s | .select [name] | Sets terminal as selected |
.controls | - | .controls add/remove [emoji] [content..] | Manages terminal controls |
.repeat | .r | .repeat <string..> | Repeats string n times and sends to the current terminal session |
.rename | - | .rename <new_name> | Changes session name |
.submit | - | .submit | Toggles auto submit mode |
.macro | .m | .macro <macro_name> | Executes macro from "macros" directory |
.interactive | .i | .i | Enables interactive mode where all messages are sent to terminal |
Shortcut | Description |
---|---|
[UP] | Arrow up |
[DOWN] | Arrow down |
[LEFT] | Arrow left |
[RIGHT] | Arrow right |
[ESC] | Escape |
[TAB] or [T] | Horizontal tab |
[F1]...[F12] | |
[<] | Clears entire input line |
\a | Bell (BEL) |
\b | Backspace (BS) |
\f | Formfeed (FF) |
\n | Linefeed(Newline) (LF) |
\r | Carriage Return (CR) |
\t | Horizontal Tab (TAB) |
\v | Vertical Tab (VT) |
^(key) | CTRL + (key) |
- Discord.py - Discord API wrapper for Python
- Pyte - VTXXX-compatible terminal emulator
Feel free to contribute
- Adam Zambrzycki (Adikso)
See also the list of contributors who participated in this project.
This project is licensed under the GNU License - see the LICENSE file for details
- Bopke, tomangelo, RhAnjiE for testing