A fully fledged terminal emulator in a Discord chat, inspired by BashBot
First, download and install Go. Version 1.18
or later is required.
Now you can clone the repo, and run the project.
git clone https://github.com/polyzium/termbot
cd termbot
go run .
Be sure to configure your instance before running the bot!
- Session management
- Interactive mode
- Autosubmit mode
- Execution of a single command
- Macros
- TUI friendly
- Color!
Color is experimental! As it uses ANSI escape codes the bot can easily reach Discord's 2000 character limit.
User settings are managed via slash commands. Terminal input is being done via the prefix (unless interactive mode is enabled).
The bot accepts shortcut sequences for keys. See the list below.
Input | Key name |
---|---|
\n | Linefeed |
\r | Carriage Return (Enter) |
\b | Backspace |
\t | Tab |
[ESC] | Escape |
[F1] | F1 |
[F2] | F2 |
[F3] | F3 |
[F4] | F4 |
[F5] | F5 |
[F6] | F6 |
[F7] | F7 |
[F8] | F8 |
[F9] | F9 |
[F10] | F10 |
[F11] | F11 |
[F12] | F12 |
[UP] | Up Arrow |
[DOWN] | Down Arrow |
[RIGHT] | Right Arrow |
[LEFT] | Left Arrow |
[INS] | Insert |
[DEL] | Delete |
[PGUP] | Page Up |
[PGDN] | Page Down |
^[key] | CTRL + key (i.e. ^C = CTRL+C, etc) |
The configuration values are located in the config.yaml file. The keys should be pretty self explanatory.
Example:
token: YOUR_TOKEN_HERE
prefix: $
ownerid: "YOUR_USERID_HERE"
macros:
- name: example
in: Here's an example macro.
whitelist: false
allowedids: []
userprefs:
"552930095141224479":
defaultsharedusers:
- "216836179415269376"
color: false
interactive: true
autosubmit: true
anic17 for testing
ZackeryRSmith for suggestions, and README
(Termbot is protected by the GPLv3 licence)