PipeWorks MUD Server is the canonical multiplayer runtime in the PipeWorks ecosystem. It provides the FastAPI API surface, the browser admin and play surfaces, the SQLite-backed canonical runtime state, and the bootstrap/import flows that turn published policy artifacts into active runtime behavior.
These repositories are designed to live inside a shared PipeWorks workspace
rooted at /srv/work/pipeworks.
repos/contains source checkouts only.venvs/contains per-project virtual environments such aspw-mud-server.runtime/contains mutable runtime state such as databases, exports, session files, and caches.logs/contains service-owned log output when a project writes logs outside the process manager.config/contains workspace-level configuration files that should not be treated as source.bin/contains optional workspace helper scripts.home/is reserved for workspace-local user data when a project needs it.
Across the PipeWorks ecosphere, the rule is simple: keep source in repos/,
keep mutable state outside the repo checkout, and use explicit paths between
repos when one project depends on another.
This repository is the source of truth for:
- the
mud-serverCLI andpipeworks-admin-tuientry points - the FastAPI API server and browser-served admin/play UIs
- canonical runtime storage in SQLite
- world package loading from
data/worlds/ - policy artifact import, activation, and runtime policy APIs
- game logic, session/auth flows, event materialization, and translation orchestration
This repository does not own:
- published policy artifacts as a distribution format
- name-generation corpus and lexicon authoring
- non-authoritative lab tooling such as Axis Descriptor Lab
The server is DB-first.
- SQLite is the canonical runtime store for accounts, sessions, world catalog rows, policy variants, and policy activation state.
- Published artifacts from
pipe-works-world-policiesare import/bootstrap inputs, not runtime authority. - World packages remain filesystem-backed under
data/worlds/<world_id>/. - LLM-backed translation is non-authoritative flavour output and does not become source of truth.
The server also maintains a JSONL event ledger. At present, that ledger still
resolves to repo-local data/ledger/ paths in code. The workspace examples
below therefore externalize the runtime DB while documenting the current
ledger-path limitation honestly.
src/mud_server/api/FastAPI app, route registration, auth, and schemassrc/mud_server/core/game engine, world loading, and event flowsrc/mud_server/db/SQLite schema and repository layersrc/mud_server/services/policy/policy import, publish, and path resolutionsrc/mud_server/translation/OOC to IC translation orchestrationsrc/mud_server/admin_tui/optional terminal admin clientsrc/mud_server/web/browser UI templates and static assetsdata/worlds/versioned world packages loaded by the serverdeploy/checked-in deployment templates (systemd unit, env reference, nginx)examples/example clients and usage materialdocs/Sphinx documentationtests/pytest suite
- Python
>=3.12 - Git access to the private
pipeworks-ipcdependency referenced inpyproject.toml - a PipeWorks workspace rooted at
/srv/work/pipeworks pipe-works-world-policieschecked out if you want canonical policy bootstrap
From the repo root:
python3 -m venv /srv/work/pipeworks/venvs/pw-mud-server
/srv/work/pipeworks/venvs/pw-mud-server/bin/pip install -e ".[dev]"If you also want the terminal admin client:
/srv/work/pipeworks/venvs/pw-mud-server/bin/pip install -e ".[dev,admin-tui]"The canonical runtime DB should live outside the repo checkout:
export MUD_DB_PATH=/srv/work/pipeworks/runtime/pipeworks_mud_server/mud.db
export MUD_POLICY_EXPORTS_ROOT=/srv/work/pipeworks/repos/pipe-works-world-policies
export MUD_WORLDS_ROOT=/srv/work/pipeworks/repos/pipeworks_mud_server/data/worlds
/srv/work/pipeworks/venvs/pw-mud-server/bin/mud-server init-db
/srv/work/pipeworks/venvs/pw-mud-server/bin/mud-server create-superuserinit-db does more than schema creation. It also syncs the world catalog and,
unless --skip-policy-import is supplied, imports canonical world artifacts
using latest.json pointers from the policy export repo.
export MUD_HOST=127.0.0.1
export MUD_PORT=18000
export MUD_DB_PATH=/srv/work/pipeworks/runtime/pipeworks_mud_server/mud.db
export MUD_POLICY_EXPORTS_ROOT=/srv/work/pipeworks/repos/pipe-works-world-policies
export MUD_WORLDS_ROOT=/srv/work/pipeworks/repos/pipeworks_mud_server/data/worlds
/srv/work/pipeworks/venvs/pw-mud-server/bin/mud-server runDefault browser entry points for that example are:
http://127.0.0.1:18000/http://127.0.0.1:18000/adminhttp://127.0.0.1:18000/play
Initialize schema and import canonical world artifacts:
/srv/work/pipeworks/venvs/pw-mud-server/bin/mud-server init-dbSkip artifact import if you only want schema bootstrap:
/srv/work/pipeworks/venvs/pw-mud-server/bin/mud-server init-db --skip-policy-importCreate the first superuser interactively:
/srv/work/pipeworks/venvs/pw-mud-server/bin/mud-server create-superuserImport one published policy artifact explicitly:
/srv/work/pipeworks/venvs/pw-mud-server/bin/mud-server import-policy-artifact \
--artifact-path /srv/work/pipeworks/repos/pipe-works-world-policies/worlds/<world_id>/<scope>/publish_<manifest_hash>.jsonRun the optional terminal admin client:
MUD_SERVER_URL=http://127.0.0.1:18000 \
/srv/work/pipeworks/venvs/pw-mud-server/bin/pipeworks-admin-tuiConfiguration resolves in this order:
- environment variables
config/server.iniin the repo- built-in defaults
The most important runtime variables for workspace-backed development are:
MUD_DB_PATHfor the canonical SQLite database pathMUD_POLICY_EXPORTS_ROOTfor the policy export repo rootMUD_WORLDS_ROOTfor the world package rootMUD_HOSTandMUD_PORTfor the API bind addressMUD_NAMEGEN_BASE_URLfor name-generation integrationMUD_ENTITY_STATE_BASE_URLfor entity-state integrationMUD_TRANSLATION_OLLAMA_URLfor translation rendering
The repo still ships config/server.example.ini and repo-local defaults, but
workspace-backed runs should prefer explicit environment variables or a
workspace-managed config copy under /srv/work/pipeworks/config/.
For hosted service use the expected bind is driven by external environment variables set in the systemd unit.
Current Luminal-oriented host-managed posture:
- bind host
127.0.0.1 - bind port
18000 - nginx front door at
https://admin.pipeworks.luminal.local MUD_NAMEGEN_BASE_URLmust point to the backend port directly (http://127.0.0.1:8360) rather than the nginx front door — service-to-service calls within the host must not go through HTTPS to avoid TLS certificate verification failures
Do not treat the repo-local defaults as the hosted-service truth.
Checked-in templates for the Luminal posture live under deploy/:
deploy/systemd/pipeworks-dev.service— systemd unit with allEnvironment=lines that must be set on a new hostdeploy/env/mud-server.env.example— annotated reference for every recognised environment variabledeploy/nginx/admin.pipeworks.luminal.local— nginx reverse-proxy config
Treat those as checked-in templates. Machine-specific rollout state (TLS certs, runtime DB, policy exports) lives outside the repo.
World packages remain versioned in this repo:
data/worlds/<world_id>/
├── world.json
└── zones/
└── <zone>.json
world.json enables or disables runtime subsystems for that world, including
translation and axis-engine behavior. Policy activation state itself is not read
from world files; it is resolved from canonical policy rows in SQLite.
pipe-works-world-policiesCanonical published artifact source for bootstrap and explicit import flows.pipeworks-policy-workbenchAuthoring and inspection client for the server's canonical policy APIs.pipeworks_axis_descriptor_labNon-authoritative inspection surface that proxies selected mud-server APIs.pipeworks-namegen-apiOptional runtime integration for generated naming flows.pipeworks_entity_state_generationOptional runtime integration for structured entity-state generation.
Run the main local checks from the repo root:
/srv/work/pipeworks/venvs/pw-mud-server/bin/pytest
/srv/work/pipeworks/venvs/pw-mud-server/bin/ruff check src tests
/srv/work/pipeworks/venvs/pw-mud-server/bin/black --check src tests
/srv/work/pipeworks/venvs/pw-mud-server/bin/mypy srcBuild the docs locally:
/srv/work/pipeworks/venvs/pw-mud-server/bin/pip install -e ".[docs]"
make -C docs htmlAdditional documentation lives in docs/source/, including:
getting_started.rstarchitecture.rstapi_reference.rstsecurity.rsttranslation_layer.rst
Published docs: