Terminal survival game · AI-narrated · on-ledger

Escape the Valley:
Ledger Trail.

Lead a party west through procedurally-generated wilderness. The Game Master narrates your journey token-by-token — the storyteller writing in real time. A deterministic engine decides who lives. An optional XRP Ledger tracks your supplies on-chain, with a reconciliation proof the engine can't fake.

Get started Read the Handbook →
$ pip install escape-the-valley
$ trail tui --seed 42
$ trail tui --continue
trail tui — seed 42 day 14 · steady
PARTY Eliza · Samuel · Wren · Tom WAGON 68% DIST 214 mi · 326 to the pass SUPPLY food 31 · water 22 · meds 4 · ammo 19 · parts 2
~ FIRESIDE ~
The fog came up off the river before dusk and did not lift. Wren swears she heard a second axe in the treeline, keeping time with Samuel's. He says it was the echo. ▋
APress on while the light holds
BMake camp early, keep the lantern lit
CSend Wren to walk the treeline
GM Fireside Ollama ✓ ledger ◐ syncing
The narrator
An Ollama Game Master tells the story
The rules-lawyer
A deterministic engine decides outcomes
The receipt book
The XRP Ledger keeps you honest
01

What's new on the trail

v1.1 — the highlights

01 · NARRATION

Streaming AI narration

Three GM profiles — Chronicler, Fireside, Lantern-Bearer — narrate in distinct voices, now streamed token-by-token. Runs locally on Ollama, zero API cost. The GM never bricks a run: if the model's down, the trail tells its own story.

02 · ENGINE

The engine decides

Seeded, deterministic, reproducible. The GM tells the story; the engine is the rules-lawyer. Same seed plus the same choices yields the same run, every time.

03 · STAKES

Real stakes, graded endings

Events can wound and kill; deaths are attributed — injury, dysentery, exposure. Runs end triumphant, weathered, pyrrhic, or lost, with a narrated epilogue read from who survived, how long it took, and what you sacrificed.

04 · LEDGER

The ledger is the receipt book

Optional on-chain inventory on the XRP Ledger testnet: supply tokens, settlement receipts, parcels you trade with other travelers. A reconciliation proof verifies the on-chain memos themselves — the engine cannot fake the ledger.

05 · TERMINAL

A terminal that never freezes

A full-screen Textual TUI with async narration ("the storyteller is thinking…"), reachable last-resort escape valves, an end-of-run postcard, and honest signals when the AI or network is degraded.

06 · HARDENED

Hardened

685 tests, 0 critical / 0 high, crash-safe atomic saves, testnet-only-in-code. Forged by a full dogfood-swarm hardening pass.

02

Break camp in three commands

Python 3.11+ · Ollama optional · XRPL optional

Install
$ pip install escape-the-valley
# with on-chain ledger
$ pip install "escape-the-valley[xrpl]"
# from source, for hacking
$ pip install -e ".[dev,xrpl]"
Play
# launch the full-screen TUI
$ trail tui --seed 42
# with AI narration aloud
$ trail tui --seed 42 --voice
# deterministic, GM off
$ trail tui --gm-off
Commands
$ trail tui --continue
$ trail status
$ trail journal -n 5
$ trail ledger enable
$ trail self-check
03

Choose your narrator

The narrator shapes the tone, not the mechanics. All three play the same game.

Chronicler

--gm-profile chronicler

Grounded, practical, spare. Minimal folklore — reports what happened. For players who want facts.

Fireside

DEFAULT

Serious campfire narrator. Subtle uncanny moments. The place to start your first playthrough.

Lantern-Bearer

--gm-profile lantern

Uncanny and liminal, but still grounded in consequence. The weird one — for experienced travelers.

trail ledger — run #42 weathered
Day 31 · 540 mi · 3 of 4 survived
ON-CHAIN SETTLEMENTS · XRPL TESTNET
Fort Reliance food −8 water −5 7A3F…C19 Mill Crossing meds −2 ammo −6 9E0B…4D2 Cold Fork parts −1 B14C…8AF
✓ reconciliation proof verified
Tom — exposure, day 27. The lantern outlasted him.

Every checkpoint writes a settlement memo anyone can verify. The engine reads the run — it can't rewrite the ledger.

The valley doesn't wait for daylight.

Seed a run, light the lantern, and see how far west your party gets before the trail decides for you.

Get started View on GitHub