A terminal-based MUD (Multi-User Dungeon) client built in Rust. This project features asynchronous Telnet networking, advanced ANSI color support (for both traditional ANSI escapes and inline GMCP markers with xterm colors), GMCP handling for personal and group information (including gauges for HP, mana, movement, and enemy status), and a text-based UI built with ratatui.
Note: This project is under active development.
- Telnet & GMCP Support
- Connects to MUD servers via Telnet.
- Parses GMCP messages including personal stats (
char.vitals,char.maxstats,char.status) and group data.
- ANSI & Xterm Color Support
- Fully supports ANSI escape sequences.
- Supports inline GMCP markers with xterm 256-color codes (e.g.
$x196) and common color shortcuts (e.g.$G,$R, etc.).
- User Interface
- Text-based UI built with
ratatui. - Displays MUD output and chat messages.
- Renders horizontal gauges for HP, Mana, and Movement above the input box.
- Text-based UI built with
- Input Handling
- Command entry with history and autocomplete.
- Basic navigation controls for scrolling through MUD and chat output.
- Extensible & Future-Proof
- Designed to add further features as needed:
- Group Gauges – Display enemy/group data (coming soon).
- Resizable Windows – Clickable arrows (or key-based controls) to adjust group and chat window sizes.
- Full MXP Support – Properly parse and render MXP tags.
- Sound Integration – Ability to trigger sound effects for events.
- Additional MUD client features such as scripting, macros, and more.
- Designed to add further features as needed:
- Telnet connection and GMCP parsing
- ANSI and xterm 256-color support for both MUD output and GMCP inline markers
- Group Gauges – Display detailed group member and enemy statistics
- Resizable Windows – Allow dynamic resizing of the chat and group display areas
- Full MXP Support – Implement parsing and rendering of MXP tags
- Sound Integration – Add sound notifications and effects
- Additional features as recommended by the community
Make sure you have Rust and Cargo installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
### Clone the Repository
```sh
git clone https://github.com/your-repo/mud-telnet-tui.git
cd mud-telnet-tuicargo build --releasecargo run --releaseUpon running the client, it will attempt to connect to the MUD server specified in the main.rs file. By default, it connects to:
darkwiz.org:6969
You can modify this in main.rs:
client.connect("your-mud-server.com", "port").await;-- Command Input:
Type a command and press Enter to send it.
Backspace to delete a character.
ESC to exit the client.
-- Output Panels:
MUD Output Panel – Displays game messages.
Chat Panel – Displays chat messages.
-- Navigation:
Use arrow keys and page keys for scrolling.
(Future) Clickable arrows to adjust the size of the group and chat windows.
Edit src/main.rs:
client.connect("your-mud-server.com", "port").await;Modify src/ansi_color.rs to update color mappings.
Enable logging by setting the RUST_LOG environment variable:
RUST_LOG=info cargo runThis project uses:
tokio- Asynchronous runtimecrossterm- Terminal input/output handlingratatui- Terminal UI renderingserde- JSON parsinglibmudtelnet- Telnet protocol handlinglog- Logging
This project is licensed under the MIT License.
Contributions are welcome! Feel free to open an issue or submit a pull request.
For support or suggestions, contact the developer at [email protected] or open an issue on GitHub.