[Bug] Lich 5 Integration wiki and LichArgs are out of date with current Lich 5 (path-flag aliases, license, default port)
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- backend, documentation
Research direction
Read src/Genie.Core/LichArgs.cs and src/Genie.Core/LichDebugLogTailer.cs to trace how Lich path flags are validated and how the debug log folder is selected. Update the wiki page using the supplied replacement text, and check DirFlags for the missing active-session-dir flag. Done means the current Lich path aliases work and the wiki matches the documented behavior; the issue does not name tests to run.
Written by the indexing model from the issue text.
Description
What happened
The Lich 5 Integration wiki page describes several things about Lich 5 that no longer match it. One of them is also built into Genie's code: LichArgs refuses to launch Lich with path flags that Lich accepts today.
Everything below was checked against lich-5 main at 757eafb (2026-11-25; latest release v5.25.0) and Genie5 main at 07ca7c8.
1. Code bug: LichArgs rejects --temp-dir=, --script-dir=, --data-dir=
src/Genie.Core/LichArgs.cs lists these as "flags Lich's own --help advertises that nothing implements" and aborts the connect if lichargs contains one.
That was true until lich-5 #1472, released in v5.20.0. Now lich.rbw lines 10-30 accepts both spellings of every path flag:
| Short form | Long form (alias) |
|---|---|
--home= |
(none) |
--temp= |
--temp-dir= |
--scripts= |
--script-dir= |
--maps= |
--map-dir= |
--logs= |
--log-dir= |
--backup= |
--backup-dir= |
--data= |
--data-dir= |
--lib= |
--lib-dir= |
--active-session-dir= |
(none) |
The = form is still required. A space-separated value is still silently ignored, so that part of the check is still worth keeping.
Suggested fix:
- Treat the
-dirspellings as aliases instead of errors, or keep a warning only for Lich older than v5.20.0. - Also update
LichDebugLogTailer.cs. It looks only for--tempand--home. If only the reject check is removed,lichdebugwill watch the wrong folder when a user passes--temp-dir=. DirFlagsis also missingactive-session-dir.
2. Wiki: wrong license
Genie 5 and Lich 5 are both GPL-3.0
Lich 5 is under the BSD 3-Clause license (LICENSE, added in #1173; also stated in the lich.rbw header).
3. Wiki: Lich has no default port of 127.0.0.1:8000
Start Lich 5 the way you normally do, so it logs in and listens locally (its default is
127.0.0.1:8000).
Lich has no default listen port. Depending on how it's started:
- Normal login (
lich --login NAME --genie): Lich binds a random free local port (lib/main/main.rb#L423) and starts the frontend pointed at it. It leaves no port open for a separately started Genie to attach to. --headless PORT(since v5.17.0): this expands to--without-frontend --detachable-client=PORT(lib/main/arg_normalization.rb). Lich listens on the port you give it, and this is the mode Genie's "Lich proxy (local)" needs.--headless autolets the OS pick the port.--headless HOST:PORT(ortailscale/lan/any) changes the bind address.- A bare
--headlessis rejected, and--headlesscan't be combined with--detachable-client.
- Hosts-file mode (
--genie --dragonrealmswith no--login): Lich pretends to be the game server on the DR game port: 11024 for Prime, 11624 for--test, 11324 for--fallen, 11124 for--platinum(lib/main/argv_options.rb).
8000 appears only as an example in older detachable-client docs. If Genie's Connect dialog uses 8000 as its default, that's fine as a Genie default, but the wiki shouldn't call it Lich's default.
4. Wiki: Lich scripts are mostly .lic, not .rb
The "Three script ecosystems" table says Lich scripts are "Ruby (.rb)". Most Lich scripts are .lic files. Lich also loads .rb, and can run Wizard .cmd/.wiz scripts too (lib/common/script.rb#L152).
5. Wiki: the stream is not passed through unchanged
Genie receives a clean DragonRealms stream … Lich scripts … transparent to Genie
Lich does a few Genie-specific things:
- It strips the room number from the Room
streamWindowsubtitle (lib/games.rb#L1319). - Script output sent with
Lich::Messaging.stream_windowarrives aspushStream. Genie 5 showsfamiliar/thoughts/combatin their own windows, andspeechin Main with an[id]prefix (lib/common/frontend/genie.rb, v5.21.0+). - Lich's exp-gain display defaults to off under Genie (
lib/lich.rb#L1141). - When Genie attaches through a detachable/headless port, Lich skips the initial state push it sends to other frontends (
lib/global_defs.rb#L2269).
6. Wiki: missing the Lich command prefix
The page never says how to talk to Lich from Genie. Under Genie, Lich's command prefix is , rather than ; (lib/main/main.rb#L58), for example ,repository or ,go2. Lich accepts both characters.
What you expected
The wiki and LichArgs match current Lich 5. Suggested replacement text for the wiki is below. Wiki edits can't go through a pull request, so it's ready to paste.
Replace the license callout
> Genie 5 is licensed under **GPL-3.0**; Lich 5 is licensed under the **BSD 3-Clause** license. They are separate programs that talk over a local socket.
Replace "1. Lich proxy mode" steps 1–3
1. **Start Lich 5 headless** so it logs in and waits for a frontend on a local port, e.g.
`ruby lich.rbw --login YourCharacter --dragonrealms --genie --headless 8000`
(any free port works; `--headless auto` lets the OS pick one and Lich prints it). A normal Lich login without `--headless` launches its own frontend on a random port instead, so Genie has nothing to attach to. Or let Genie start Lich for you (see auto-launch below).
2. In Genie, **File → Connect…** and set **Mode** to **Lich proxy (local)**.
3. Point it at the host/port you gave `--headless` (`127.0.0.1` and the port above), pick the **Instance** Lich is logged into, and connect. The instance is what scripts read as `$game`; once connected, the server's own identity tag corrects `$game` automatically if the pick was wrong.
Lich commands use the `,` prefix under Genie (for example `,repository` or `,go2`); `;` also works.
Replace the sentence "Genie receives a clean DragonRealms stream…"
Genie receives the DragonRealms stream through Lich and renders it normally. Your **Lich scripts keep running** underneath, and their output shows up as game text. Lich makes a few small Genie-specific changes: the room number is removed from the Room window title, script output sent to `familiar`/`thoughts`/`combat` goes to those windows (`speech` lands in Main with an `[speech]` prefix), and Lich's exp-gain display is off by default.
Update the script table row
| **Lich scripts** | Ruby (`.lic`, also `.rb`) | Run by Lich behind the proxy; Genie sees their output as game text. |
Replace the "Lich's path flags require the = form" paragraph and its error example
**Lich's path flags require the `=` form.** `lich.rbw` reads `--home=PATH`, `--temp=PATH` (or `--temp-dir=`), `--scripts=` (`--script-dir=`), `--data=` (`--data-dir=`), `--maps=` (`--map-dir=`), `--logs=` (`--log-dir=`), `--backup=` (`--backup-dir=`), `--lib=` (`--lib-dir=`) and `--active-session-dir=`. It does *not* read a space-separated value, and it silently ignores anything it doesn't match. The `-dir` spellings need Lich 5.20.0 or newer. Rather than start Lich with an argument it would throw away, Genie aborts the connect and says so.
The [lich] Lich ignores '--temp-dir=/tmp/lich' … example should be changed to a case that's still wrong, e.g. --temp /tmp/lich (space instead of =). The lichdebug note should also list --temp-dir=PATH as a way Lich finds its temp folder.
Steps to reproduce
Code bug:
#config lichargs {--login {character} --dragonrealms --genie --headless {port} --temp-dir=/tmp/lich}#config lichautolaunch on, then connect in Lich-proxy mode.- Genie aborts with
[lich] Lich ignores '--temp-dir=/tmp/lich' — use --temp=PATH instead, but Lich 5.20.0+ accepts--temp-dir=.
Docs: compare the wiki page with the lich-5 files linked above.
Environment
- Genie 5 version: found by reading the code at
main(07ca7c8), not by running a build - Connection mode: Lich Proxy
- Lich 5:
mainat757eafb/ v5.25.0
Anything else
The headless and detachable-client options in Lich are described in lich --help login and lich --help paths.
🤖 Generated with Claude Code
- Dominant language
- C#
- Stars
- 2
- Forks
- 5
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenieClient/Genie5
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
GenieClient/Genie5#496 ·
Maintainers usually reply within 5 days
-
enhancement g4-regression
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
GenieClient/Genie5#494 ·
Maintainers usually reply within 5 days
-
area:ui-dock enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GenieClient/Genie5#462 ·
Maintainers usually reply within 5 days
-
area:mapper bug est:<1d P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
GenieClient/Genie5#449 · 1 comment ·
Maintainers usually reply within 5 days
-
[Bug] Maps ▸ Update from Official Repo / Repair Maps give no notification of success or failurePossibly taken A pull request linked to this issue is open or already merged. Openarea:mapper area:updater bug est:<1d P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GenieClient/Genie5#423 · 1 assignee ·
Maintainers usually reply within 5 days
All issues in GenieClient/Genie5
Similar issues
-
documentation good first issue kind:task level:starter size:s
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Arggon/ArggonStores#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Tool] MockAPIOpenhas-image has-license has-readme new-tool ready-to-approve repo-verified
Difficulty 1/5 Under an hour Newbie friendliness 72/100
shanselman/TinyToolTown#956 ·
Maintainers usually reply within 2 days
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Bug]: Native build script prints a traceback when Git is missing from PATHPossibly taken @Jaisuryan-web claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
KnifeLemon/Filee#1953 ·
Maintainers usually reply within 1 day