A Dungeon Master
in your terminal

QuestCode is a solo text RPG. A language model narrates the adventure - a Rust engine keeps the rules, rolls the dice and remembers the world.

Free - Source-available - Run offline

Prompt-only games can't keep the rules.

Most AI text games put the entire game - every rule, every fact, every act - into one prompt. QuestCode splits the job: the engine runs the game, the model only writes the prose.

Prompt-only
QuestCode
Memory
prompt-onlyThe world fades as the chat window grows.
questcodeState lives in serialized game save files.
Fairness
prompt-onlyOutcomes are improvised to please you.
questcodeDice and rules run in code - no LLM bootlicking.
Consistency
prompt-onlyLore drifts - names and facts mutate.
questcodeLore is re-read from your world files, never from memory.
Cost
prompt-onlyDemands the biggest, priciest models.
questcodeA small, local model suffices - narration is cheap.

Runs on hardware you already own.

Self-host the whole stack. The engine carries the rules, so the language model on your GPU only has to do the one thing models are actually good at - generating text.

Bring your own endpoint

Llama.cpp, vLLM, SGLang, LM Studio or a cloud API - anything that speaks OpenAI-compatible HTTP.

Sized for consumer hardware

The harness moves rules and memory into Rust, so a 9B-class model (Qwen-3.5-9B, Gemma-4) on a gaming GPU is enough for a great game.

Tolerant of small models

Small models often mangle structured output and get confused. The engine is created for this and deploys several techniques to mitigate this.

Your models, your bill

Cheap local turns cost near zero. If you want a bigger model for story-critical moments, route them upward - you can configure every endpoint.

No account - No telemetry - No cloud bill

A world is a folder.

A world lore is markdown you own - edit it between sessions, version it with git, share it with friends.

  1. 1. Drop markdown files into a world folder - lore, places, NPCs, your party.
  2. 2. Run questcode start ./world and play in plain English.
  3. 3. The engine indexes the lore for use in RAG, the models can read/write files on demand.
  4. 4. Return tomorrow - everything is exactly where you left it.
./my_game_world/
my_game_world/
├── world.md
├── npcs.md
├── party.md
├── inventory.md
├── lore/
│ ├── factions.md
│ └── history.md
└── session.json

An engine, not a prompt.

QuestCode is a Rust harness built on top of Tokio, Bevy ECS and Ratatui. The model is not the heavy lifter - the harness is.

  • State machine, not prompts

    Turn order, tool calls and validation are fixed in code. The model proposes an action - the engine decides what happens.

  • Routed by difficulty

    Each LLM call is tagged by difficulty to save tokens. Routine tasks runs on a small local model. Story-critical reasoning can climb to something larger.

  • Parallel across providers

    Workers on multiple endpoints run side by side - OpenAI-compatible, Anthropic, Gemini, Llama.cpp, vLLM - behind one config file.

~/.config/questcode/config.toml
# ~/.config/questcode/config.toml

[ai.providers.local]
  base_url = "http://localhost:11434/v1"
  max_parallel = 2

[ai.providers.cloud]
  base_url = "https://api.openai.com/v1"
  api_key = "sk-…"

[ai.preferences."local/<your-model>"]
  tier = "low"     # routine narration stays local

[ai.preferences."cloud/<your-model>"]
  tier = "high"    # reserved for story-critical turns

Free to play.
Premium when you want zero setup.

The CLI - FREE

  • Bring your own AI endpoint and API key
  • Unlimited play - no account, no telemetry
  • Local or cloud models - it is up to you to configure
  • Source-available under PolyForm Shield

The backend - PREMIUM

  • We provide you with an AI endpoint for convinience
  • Cloud saves that follow you between machines
  • Multiplayer sessions with your friends
  • In development - not available now

Get started.

QuestCode runs on Windows, macOS and Linux.

The program or source code has not been released yet. It is currently under active development. Please come back later!