mud-slop 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. mud_slop-0.1.2/.github/workflows/ci.yml +51 -0
  2. mud_slop-0.1.2/.github/workflows/release-please.yml +88 -0
  3. mud_slop-0.1.2/.gitignore +25 -0
  4. mud_slop-0.1.2/.python-version +1 -0
  5. mud_slop-0.1.2/.release-please-manifest.json +3 -0
  6. mud_slop-0.1.2/CHANGELOG.md +38 -0
  7. mud_slop-0.1.2/LICENSE +21 -0
  8. mud_slop-0.1.2/PKG-INFO +244 -0
  9. mud_slop-0.1.2/README.md +216 -0
  10. mud_slop-0.1.2/assets/logo.png +0 -0
  11. mud_slop-0.1.2/configs/README.md +262 -0
  12. mud_slop-0.1.2/configs/aardwolf.yml +96 -0
  13. mud_slop-0.1.2/configs/default.yml +104 -0
  14. mud_slop-0.1.2/profiles/.gitkeep +0 -0
  15. mud_slop-0.1.2/profiles/README.md +36 -0
  16. mud_slop-0.1.2/pyproject.toml +48 -0
  17. mud_slop-0.1.2/release-please-config.json +12 -0
  18. mud_slop-0.1.2/src/mud_slop/__init__.py +6 -0
  19. mud_slop-0.1.2/src/mud_slop/__main__.py +3 -0
  20. mud_slop-0.1.2/src/mud_slop/ansi.py +135 -0
  21. mud_slop-0.1.2/src/mud_slop/app.py +154 -0
  22. mud_slop-0.1.2/src/mud_slop/cli.py +63 -0
  23. mud_slop-0.1.2/src/mud_slop/config.py +680 -0
  24. mud_slop-0.1.2/src/mud_slop/connection.py +177 -0
  25. mud_slop-0.1.2/src/mud_slop/constants.py +26 -0
  26. mud_slop-0.1.2/src/mud_slop/conversation.py +189 -0
  27. mud_slop-0.1.2/src/mud_slop/debug_log.py +65 -0
  28. mud_slop-0.1.2/src/mud_slop/gmcp.py +51 -0
  29. mud_slop-0.1.2/src/mud_slop/help.py +190 -0
  30. mud_slop-0.1.2/src/mud_slop/history.py +67 -0
  31. mud_slop-0.1.2/src/mud_slop/info.py +78 -0
  32. mud_slop-0.1.2/src/mud_slop/input_buffer.py +104 -0
  33. mud_slop-0.1.2/src/mud_slop/map.py +243 -0
  34. mud_slop-0.1.2/src/mud_slop/telnet.py +122 -0
  35. mud_slop-0.1.2/src/mud_slop/types.py +31 -0
  36. mud_slop-0.1.2/src/mud_slop/ui.py +1355 -0
  37. mud_slop-0.1.2/tests/__init__.py +0 -0
  38. mud_slop-0.1.2/tests/test_config.py +220 -0
  39. mud_slop-0.1.2/tests/test_help.py +341 -0
  40. mud_slop-0.1.2/tests/test_input_buffer.py +443 -0
  41. mud_slop-0.1.2/tests/test_map.py +379 -0
  42. mud_slop-0.1.2/uv.lock +200 -0
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [ubuntu-latest, macos-latest]
16
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v4
28
+
29
+ - name: Install dependencies
30
+ run: uv sync
31
+
32
+ - name: Run tests
33
+ run: uv run python -m pytest tests/ -v
34
+
35
+ lint:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+
40
+ - name: Set up Python
41
+ uses: actions/setup-python@v5
42
+ with:
43
+ python-version: "3.12"
44
+
45
+ - name: Install uv
46
+ uses: astral-sh/setup-uv@v4
47
+
48
+ - name: Check build
49
+ run: |
50
+ pip install build
51
+ python -m build --sdist --wheel
@@ -0,0 +1,88 @@
1
+ name: Release Please
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+ id-token: write # For PyPI trusted publishing
12
+
13
+ jobs:
14
+ release-please:
15
+ runs-on: ubuntu-latest
16
+ outputs:
17
+ release_created: ${{ steps.release.outputs.release_created }}
18
+ tag_name: ${{ steps.release.outputs.tag_name }}
19
+ steps:
20
+ - uses: googleapis/release-please-action@v4
21
+ id: release
22
+ with:
23
+ config-file: release-please-config.json
24
+ manifest-file: .release-please-manifest.json
25
+
26
+ build:
27
+ name: Build distribution
28
+ needs: release-please
29
+ if: ${{ needs.release-please.outputs.release_created }}
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+
34
+ - name: Set up Python
35
+ uses: actions/setup-python@v5
36
+ with:
37
+ python-version: "3.12"
38
+
39
+ - name: Install build tools
40
+ run: python -m pip install --upgrade pip build
41
+
42
+ - name: Build package
43
+ run: python -m build
44
+
45
+ - name: Store distribution packages
46
+ uses: actions/upload-artifact@v4
47
+ with:
48
+ name: python-package-distributions
49
+ path: dist/
50
+
51
+ publish-pypi:
52
+ name: Publish to PyPI
53
+ needs: [release-please, build]
54
+ if: ${{ needs.release-please.outputs.release_created }}
55
+ runs-on: ubuntu-latest
56
+ environment:
57
+ name: pypi
58
+ url: https://pypi.org/p/mud-slop
59
+ permissions:
60
+ id-token: write
61
+ steps:
62
+ - name: Download distributions
63
+ uses: actions/download-artifact@v4
64
+ with:
65
+ name: python-package-distributions
66
+ path: dist/
67
+
68
+ - name: Publish to PyPI
69
+ uses: pypa/gh-action-pypi-publish@release/v1
70
+
71
+ github-release-assets:
72
+ name: Upload to GitHub Release
73
+ needs: [release-please, build, publish-pypi]
74
+ if: ${{ needs.release-please.outputs.release_created }}
75
+ runs-on: ubuntu-latest
76
+ permissions:
77
+ contents: write
78
+ steps:
79
+ - name: Download distributions
80
+ uses: actions/download-artifact@v4
81
+ with:
82
+ name: python-package-distributions
83
+ path: dist/
84
+
85
+ - name: Upload to GitHub Release
86
+ env:
87
+ GITHUB_TOKEN: ${{ github.token }}
88
+ run: gh release upload "${{ needs.release-please.outputs.tag_name }}" dist/* --repo "${{ github.repository }}"
@@ -0,0 +1,25 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # Logging
13
+ *.log
14
+
15
+ # Profiles (contain credentials — never commit)
16
+ profiles/*
17
+ !profiles/.gitkeep
18
+ !profiles/*.md
19
+
20
+ # IDE and AI
21
+ .idea
22
+ .vscode
23
+ .claude
24
+ CLAUDE.md
25
+ cursor.json
@@ -0,0 +1 @@
1
+ 3.9
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.2"
3
+ }
@@ -0,0 +1,38 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.2](https://github.com/mrosata/mud-slop/compare/mud-slop-v0.1.1...mud-slop-v0.1.2) (2026-02-06)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * chain publish jobs directly to release-please workflow ([f8ad1e9](https://github.com/mrosata/mud-slop/commit/f8ad1e95622ada72b59ddee5ea9ad0e142510e47))
14
+ * chain publish jobs directly to release-please workflow ([d4221e9](https://github.com/mrosata/mud-slop/commit/d4221e943199484cfc33ac2018f843b11dce8469))
15
+
16
+ ## [0.1.1](https://github.com/mrosata/mud-slop/compare/mud-slop-v0.1.0...mud-slop-v0.1.1) (2026-02-06)
17
+
18
+
19
+ ### Features
20
+
21
+ * add automated release process with release-please and PyPI publishing ([5f39f97](https://github.com/mrosata/mud-slop/commit/5f39f97f18f482d3ad689a683fccaa310decfd56))
22
+
23
+ ## [0.1.0] - Unreleased
24
+
25
+ ### Added
26
+ - Initial release
27
+ - Curses-based terminal UI with ANSI color support
28
+ - GMCP protocol support with stats pane
29
+ - Conversation overlay for speech detection
30
+ - Info ticker for INFO: channel messages
31
+ - Map pane with room descriptions
32
+ - Help pager for in-game help content
33
+ - Debug logging to files
34
+ - Command history with prefix filtering
35
+ - Full line editing (cursor movement, word operations)
36
+ - Password masking during login
37
+ - Auto-login profiles via YAML configuration
38
+ - Scrollback with Page Up/Down navigation
mud_slop-0.1.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 mrosata
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.4
2
+ Name: mud-slop
3
+ Version: 0.1.2
4
+ Summary: A terminal-based MUD client with GMCP support, ANSI colors, and protocol inspection
5
+ Project-URL: Homepage, https://github.com/mrosata/mud-slop
6
+ Project-URL: Repository, https://github.com/mrosata/mud-slop
7
+ Project-URL: Issues, https://github.com/mrosata/mud-slop/issues
8
+ Author: mrosata
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: client,curses,gmcp,mud,telnet,terminal
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console :: Curses
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: POSIX
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)
25
+ Classifier: Topic :: Terminals
26
+ Requires-Python: >=3.9
27
+ Description-Content-Type: text/markdown
28
+
29
+ # mud-slop
30
+
31
+ ![image](./assets/logo.png)
32
+
33
+ A terminal-based MUD (Multi-User Dungeon) client with GMCP support, ANSI color rendering, and protocol inspection. Built entirely with the Python standard library.
34
+
35
+ ## Features
36
+
37
+ - **ANSI color rendering** — full support for 8 foreground/background colors, bright variants, bold, underline, and reverse
38
+ - **GMCP support** — negotiates with Aardwolf-style servers and displays HP/Mana/Moves bars and character attributes in a stats pane
39
+ - **Conversation overlay** — speech lines (says, tells, whispers, yells, asks) are captured and shown in a navigable overlay panel
40
+ - **Info ticker** — `INFO:` channel messages display in a ticker bar above the input line
41
+ - **Map pane** — ASCII maps are extracted using `<MAPSTART>`/`<MAPEND>` tags, room descriptions via `{rdesc}`/`{/rdesc}` tags, and rendered in a fixed panel on the right side of the screen showing room name, coords, map, exits, and word-wrapped description
42
+ - **Help pager** — help content wrapped in `{help}`/`{/help}` tags is displayed in a scrollable overlay with paging controls (PgUp/PgDn/Home/End/ESC), allowing users to read help while still typing commands
43
+ - **Debug logging** — writes output, protocol, and GMCP streams to log files
44
+ - **Scrollback** — Page Up/Down to scroll through history; full unfiltered history available when scrolled up
45
+ - **Command history** — Up/Down arrows with prefix filtering
46
+ - **Line editing** — Left/Right arrows, Ctrl+A/E (home/end), Ctrl+Left/Right (word jump), Ctrl+W/U/K (kill word/to-start/to-end), Delete key
47
+ - **Password masking** — input is hidden when the server signals password mode (via telnet WILL ECHO)
48
+ - **Auto-login profiles** — store credentials in gitignored YAML profiles (`profiles/<name>.yml`) and use `-p <name>` to log in automatically
49
+
50
+ ## Requirements
51
+
52
+ - Python 3.9+
53
+ - [uv](https://docs.astral.sh/uv/) (recommended) or pip
54
+
55
+ ## Installation
56
+
57
+ ### From PyPI (recommended)
58
+
59
+ ```bash
60
+ pip install mud-slop
61
+ ```
62
+
63
+ Or with [uv](https://docs.astral.sh/uv/):
64
+
65
+ ```bash
66
+ uv tool install mud-slop
67
+ ```
68
+
69
+ ### From source
70
+
71
+ ```bash
72
+ git clone <repo-url> && cd mud-slop
73
+ uv sync
74
+ ```
75
+
76
+ ## Usage
77
+
78
+ ```bash
79
+ uv run mud-slop <host> <port>
80
+ ```
81
+
82
+ ### Options
83
+
84
+ | Flag | Description |
85
+ |---|---|
86
+ | `-c`, `--config` | Configuration name (loads `configs/<name>.yml`, default: `default`) |
87
+ | `-p`, `--profile` | Login profile name (loads `profiles/<name>.yml` for auto-login) |
88
+ | `--create-profile NAME` | Create a login profile interactively and exit |
89
+ | `--no-color` | Disable ANSI color rendering |
90
+ | `-d`, `--debug` | Enable debug logging to `mud_*.log` files |
91
+ | `--conv-pos {top-left\|top-center\|...\|bottom-right}` | Conversation overlay position (default: `bottom-right`) |
92
+
93
+ ### Examples
94
+
95
+ ```bash
96
+ # Connect to Aardwolf using config file
97
+ uv run mud-slop -c aardwolf
98
+
99
+ # Connect with explicit host/port (overrides config)
100
+ uv run mud-slop aardmud.org 4000
101
+
102
+ # With debug logging enabled
103
+ uv run mud-slop -c aardwolf --debug
104
+
105
+ # Create a login profile (prompts for username/password)
106
+ uv run mud-slop --create-profile mychar
107
+
108
+ # Auto-login with a profile
109
+ uv run mud-slop -c aardwolf -p mychar
110
+
111
+ # Override host/port from config
112
+ uv run mud-slop -c aardwolf localhost 5000
113
+ ```
114
+
115
+ ### Configuration
116
+
117
+ Configuration files are stored in the `configs/` directory as YAML files. Use `-c <name>` to load `configs/<name>.yml`. CLI arguments override config values.
118
+
119
+ Example config structure (`configs/aardwolf.yml`):
120
+
121
+ ```yaml
122
+ connection:
123
+ host: aardmud.org
124
+ port: 4000
125
+
126
+ gmcp:
127
+ subscriptions:
128
+ - "char 1"
129
+ - "char.vitals 1"
130
+ - "char.stats 1"
131
+
132
+ patterns:
133
+ map:
134
+ start_tag: '<MAPSTART>'
135
+ end_tag: '<MAPEND>'
136
+ info:
137
+ prefix: '^INFO:\s+'
138
+
139
+ timers:
140
+ conversation:
141
+ auto_close: 8.0
142
+
143
+ ui:
144
+ right_panel_max_width: 70
145
+ max_output_lines: 5000
146
+
147
+ hooks:
148
+ # Commands to run after login (when GMCP vitals first arrive)
149
+ post_login:
150
+ - map
151
+ - look
152
+ # Commands to run before disconnecting
153
+ on_exit:
154
+ - quit
155
+ ```
156
+
157
+ See `configs/default.yml` for the complete schema with all options.
158
+
159
+ ### Profiles
160
+
161
+ Login profiles are stored in the `profiles/` directory as YAML files. Profile files are **gitignored** to prevent committing credentials.
162
+
163
+ Create a profile interactively (password input is hidden):
164
+
165
+ ```bash
166
+ uv run mud-slop --create-profile mychar
167
+ ```
168
+
169
+ Then use it to auto-login:
170
+
171
+ ```bash
172
+ uv run mud-slop -c aardwolf -p mychar
173
+ ```
174
+
175
+ The client sends the username after the server's initial prompt and sends the password when the server enters password mode (telnet WILL ECHO). See `profiles/README.md` for details.
176
+
177
+ ### In-app commands
178
+
179
+ | Command | Action |
180
+ |---|---|
181
+ | `/quit` | Exit the client |
182
+ | `/clear` | Clear output pane (and conversation, map, ticker) |
183
+ | `/debug` | Toggle debug logging on/off at runtime |
184
+ | `/info` | Show timestamped info message history |
185
+
186
+ Everything else typed at the prompt is sent to the server.
187
+
188
+ ### Keyboard shortcuts
189
+
190
+ | Key | Action |
191
+ |---|---|
192
+ | Enter | Send input |
193
+ | Left / Right | Move cursor within input line |
194
+ | Ctrl+A | Jump to start of input |
195
+ | Ctrl+E | Jump to end of input |
196
+ | Ctrl+Left / Ctrl+Right | Jump word left/right |
197
+ | Backspace | Delete character before cursor |
198
+ | Delete | Delete character at cursor |
199
+ | Ctrl+W | Delete word backwards |
200
+ | Ctrl+U | Delete to start of line |
201
+ | Ctrl+K | Delete to end of line |
202
+ | Up / Down | Navigate command history |
203
+ | Page Up / Page Down | Scroll output (or help pager when open) |
204
+ | Home / End | Jump to top/bottom of scrollback (or help pager when open) |
205
+ | Shift+Right / Shift+Left | Navigate conversation entries |
206
+ | Escape | Dismiss conversation overlay or help pager |
207
+ | W / A / S / D | Move north/west/south/east (only when input is empty, after login) |
208
+ | F1 | Toggle help overlay |
209
+ | Ctrl+C | Quit |
210
+
211
+ ### UI layout
212
+
213
+ The UI has up to five regions:
214
+
215
+ - **Output pane** — main MUD text (filtered: speech, info, and map lines removed at scroll position 0)
216
+ - **Stats pane** — GMCP vitals/status/attributes (appears automatically when GMCP data arrives, 24-char column on the right)
217
+ - **Map pane** — fixed panel on the right side (below stats if both present) showing room name, coordinates, ASCII map, exits, and word-wrapped description (appears after login when map data is received)
218
+ - **Help pager** — scrollable overlay on the right side showing help content (appears when server sends `{help}` tags, covers stats/map panes)
219
+ - **Info ticker** — single-row bar above the input line showing `INFO:` channel messages
220
+ - **Input line** — command entry with `> ` prompt
221
+
222
+ The conversation overlay draws on top of the output pane. The map pane is a fixed panel on the right side of the screen (below the stats pane if both are present), and is hidden while the conversation overlay is visible. Scrolling up reveals the full unfiltered history including speech, info, and map lines.
223
+
224
+ Debug logging (`-d` or `/debug`) writes to `mud_output.log`, `mud_proto.log`, and `mud_gmcp.log` in the current directory.
225
+
226
+ ## Development
227
+
228
+ ```bash
229
+ # Install in dev mode
230
+ uv sync
231
+
232
+ # Run via entry point
233
+ uv run mud-slop <host> <port>
234
+
235
+ # Run via python -m
236
+ uv run python -m mud_slop <host> <port>
237
+ ```
238
+
239
+ The project has zero runtime dependencies. See `CLAUDE.md` for detailed architecture notes and the module dependency graph.
240
+
241
+ ```bash
242
+ # Run tests
243
+ uv run python -m pytest tests/ -v
244
+ ```
@@ -0,0 +1,216 @@
1
+ # mud-slop
2
+
3
+ ![image](./assets/logo.png)
4
+
5
+ A terminal-based MUD (Multi-User Dungeon) client with GMCP support, ANSI color rendering, and protocol inspection. Built entirely with the Python standard library.
6
+
7
+ ## Features
8
+
9
+ - **ANSI color rendering** — full support for 8 foreground/background colors, bright variants, bold, underline, and reverse
10
+ - **GMCP support** — negotiates with Aardwolf-style servers and displays HP/Mana/Moves bars and character attributes in a stats pane
11
+ - **Conversation overlay** — speech lines (says, tells, whispers, yells, asks) are captured and shown in a navigable overlay panel
12
+ - **Info ticker** — `INFO:` channel messages display in a ticker bar above the input line
13
+ - **Map pane** — ASCII maps are extracted using `<MAPSTART>`/`<MAPEND>` tags, room descriptions via `{rdesc}`/`{/rdesc}` tags, and rendered in a fixed panel on the right side of the screen showing room name, coords, map, exits, and word-wrapped description
14
+ - **Help pager** — help content wrapped in `{help}`/`{/help}` tags is displayed in a scrollable overlay with paging controls (PgUp/PgDn/Home/End/ESC), allowing users to read help while still typing commands
15
+ - **Debug logging** — writes output, protocol, and GMCP streams to log files
16
+ - **Scrollback** — Page Up/Down to scroll through history; full unfiltered history available when scrolled up
17
+ - **Command history** — Up/Down arrows with prefix filtering
18
+ - **Line editing** — Left/Right arrows, Ctrl+A/E (home/end), Ctrl+Left/Right (word jump), Ctrl+W/U/K (kill word/to-start/to-end), Delete key
19
+ - **Password masking** — input is hidden when the server signals password mode (via telnet WILL ECHO)
20
+ - **Auto-login profiles** — store credentials in gitignored YAML profiles (`profiles/<name>.yml`) and use `-p <name>` to log in automatically
21
+
22
+ ## Requirements
23
+
24
+ - Python 3.9+
25
+ - [uv](https://docs.astral.sh/uv/) (recommended) or pip
26
+
27
+ ## Installation
28
+
29
+ ### From PyPI (recommended)
30
+
31
+ ```bash
32
+ pip install mud-slop
33
+ ```
34
+
35
+ Or with [uv](https://docs.astral.sh/uv/):
36
+
37
+ ```bash
38
+ uv tool install mud-slop
39
+ ```
40
+
41
+ ### From source
42
+
43
+ ```bash
44
+ git clone <repo-url> && cd mud-slop
45
+ uv sync
46
+ ```
47
+
48
+ ## Usage
49
+
50
+ ```bash
51
+ uv run mud-slop <host> <port>
52
+ ```
53
+
54
+ ### Options
55
+
56
+ | Flag | Description |
57
+ |---|---|
58
+ | `-c`, `--config` | Configuration name (loads `configs/<name>.yml`, default: `default`) |
59
+ | `-p`, `--profile` | Login profile name (loads `profiles/<name>.yml` for auto-login) |
60
+ | `--create-profile NAME` | Create a login profile interactively and exit |
61
+ | `--no-color` | Disable ANSI color rendering |
62
+ | `-d`, `--debug` | Enable debug logging to `mud_*.log` files |
63
+ | `--conv-pos {top-left\|top-center\|...\|bottom-right}` | Conversation overlay position (default: `bottom-right`) |
64
+
65
+ ### Examples
66
+
67
+ ```bash
68
+ # Connect to Aardwolf using config file
69
+ uv run mud-slop -c aardwolf
70
+
71
+ # Connect with explicit host/port (overrides config)
72
+ uv run mud-slop aardmud.org 4000
73
+
74
+ # With debug logging enabled
75
+ uv run mud-slop -c aardwolf --debug
76
+
77
+ # Create a login profile (prompts for username/password)
78
+ uv run mud-slop --create-profile mychar
79
+
80
+ # Auto-login with a profile
81
+ uv run mud-slop -c aardwolf -p mychar
82
+
83
+ # Override host/port from config
84
+ uv run mud-slop -c aardwolf localhost 5000
85
+ ```
86
+
87
+ ### Configuration
88
+
89
+ Configuration files are stored in the `configs/` directory as YAML files. Use `-c <name>` to load `configs/<name>.yml`. CLI arguments override config values.
90
+
91
+ Example config structure (`configs/aardwolf.yml`):
92
+
93
+ ```yaml
94
+ connection:
95
+ host: aardmud.org
96
+ port: 4000
97
+
98
+ gmcp:
99
+ subscriptions:
100
+ - "char 1"
101
+ - "char.vitals 1"
102
+ - "char.stats 1"
103
+
104
+ patterns:
105
+ map:
106
+ start_tag: '<MAPSTART>'
107
+ end_tag: '<MAPEND>'
108
+ info:
109
+ prefix: '^INFO:\s+'
110
+
111
+ timers:
112
+ conversation:
113
+ auto_close: 8.0
114
+
115
+ ui:
116
+ right_panel_max_width: 70
117
+ max_output_lines: 5000
118
+
119
+ hooks:
120
+ # Commands to run after login (when GMCP vitals first arrive)
121
+ post_login:
122
+ - map
123
+ - look
124
+ # Commands to run before disconnecting
125
+ on_exit:
126
+ - quit
127
+ ```
128
+
129
+ See `configs/default.yml` for the complete schema with all options.
130
+
131
+ ### Profiles
132
+
133
+ Login profiles are stored in the `profiles/` directory as YAML files. Profile files are **gitignored** to prevent committing credentials.
134
+
135
+ Create a profile interactively (password input is hidden):
136
+
137
+ ```bash
138
+ uv run mud-slop --create-profile mychar
139
+ ```
140
+
141
+ Then use it to auto-login:
142
+
143
+ ```bash
144
+ uv run mud-slop -c aardwolf -p mychar
145
+ ```
146
+
147
+ The client sends the username after the server's initial prompt and sends the password when the server enters password mode (telnet WILL ECHO). See `profiles/README.md` for details.
148
+
149
+ ### In-app commands
150
+
151
+ | Command | Action |
152
+ |---|---|
153
+ | `/quit` | Exit the client |
154
+ | `/clear` | Clear output pane (and conversation, map, ticker) |
155
+ | `/debug` | Toggle debug logging on/off at runtime |
156
+ | `/info` | Show timestamped info message history |
157
+
158
+ Everything else typed at the prompt is sent to the server.
159
+
160
+ ### Keyboard shortcuts
161
+
162
+ | Key | Action |
163
+ |---|---|
164
+ | Enter | Send input |
165
+ | Left / Right | Move cursor within input line |
166
+ | Ctrl+A | Jump to start of input |
167
+ | Ctrl+E | Jump to end of input |
168
+ | Ctrl+Left / Ctrl+Right | Jump word left/right |
169
+ | Backspace | Delete character before cursor |
170
+ | Delete | Delete character at cursor |
171
+ | Ctrl+W | Delete word backwards |
172
+ | Ctrl+U | Delete to start of line |
173
+ | Ctrl+K | Delete to end of line |
174
+ | Up / Down | Navigate command history |
175
+ | Page Up / Page Down | Scroll output (or help pager when open) |
176
+ | Home / End | Jump to top/bottom of scrollback (or help pager when open) |
177
+ | Shift+Right / Shift+Left | Navigate conversation entries |
178
+ | Escape | Dismiss conversation overlay or help pager |
179
+ | W / A / S / D | Move north/west/south/east (only when input is empty, after login) |
180
+ | F1 | Toggle help overlay |
181
+ | Ctrl+C | Quit |
182
+
183
+ ### UI layout
184
+
185
+ The UI has up to five regions:
186
+
187
+ - **Output pane** — main MUD text (filtered: speech, info, and map lines removed at scroll position 0)
188
+ - **Stats pane** — GMCP vitals/status/attributes (appears automatically when GMCP data arrives, 24-char column on the right)
189
+ - **Map pane** — fixed panel on the right side (below stats if both present) showing room name, coordinates, ASCII map, exits, and word-wrapped description (appears after login when map data is received)
190
+ - **Help pager** — scrollable overlay on the right side showing help content (appears when server sends `{help}` tags, covers stats/map panes)
191
+ - **Info ticker** — single-row bar above the input line showing `INFO:` channel messages
192
+ - **Input line** — command entry with `> ` prompt
193
+
194
+ The conversation overlay draws on top of the output pane. The map pane is a fixed panel on the right side of the screen (below the stats pane if both are present), and is hidden while the conversation overlay is visible. Scrolling up reveals the full unfiltered history including speech, info, and map lines.
195
+
196
+ Debug logging (`-d` or `/debug`) writes to `mud_output.log`, `mud_proto.log`, and `mud_gmcp.log` in the current directory.
197
+
198
+ ## Development
199
+
200
+ ```bash
201
+ # Install in dev mode
202
+ uv sync
203
+
204
+ # Run via entry point
205
+ uv run mud-slop <host> <port>
206
+
207
+ # Run via python -m
208
+ uv run python -m mud_slop <host> <port>
209
+ ```
210
+
211
+ The project has zero runtime dependencies. See `CLAUDE.md` for detailed architecture notes and the module dependency graph.
212
+
213
+ ```bash
214
+ # Run tests
215
+ uv run python -m pytest tests/ -v
216
+ ```
Binary file