Skip to main content

A game server for hosting text-based online MOO-like games.

Project description

DjangoMOO

"LambdaMOO on Django"

release pipeline coverage quality docs

DjangoMOO is a MOO server built on Python and Django. A MOO is a persistent online text world where objects — rooms, things, players — have properties and verbs (methods) that define how they behave. Those verbs are written in Python and run in a sandboxed execution environment, so the world itself is programmable by its inhabitants.

The design follows the LambdaMOO model where it makes sense: a parsed command line, verb dispatch through the caller's inventory and location, object inheritance, and a permission system. The implementation is independent — no MOO bytecode, no C — just Python and Django.

Documentation | GitLab | GitHub mirror | PyPI

What's included

  • A LambdaMOO-inspired parser with full dobj/iobj preposition support
  • Objects, Properties, Verbs, and a ManyToMany inheritance hierarchy backed by PostgreSQL
  • A RestrictedPython verb sandbox with a security-audited allowlist (55+ known escape vectors tested)
  • A default bootstrap world: rooms, exits, containers, players, a lighting system, in-world mail, and an object placement system
  • Browser playable with no client required via WebSocket SSH
  • Django admin for browsing and editing the world's objects, properties, and verb source
  • Docker + Helm for self-hosting with docker compose up
  • moo-agent: autonomous LLM agents that inhabit the world via SSH (see below)

Quick Start

git clone https://gitlab.com/bubblehouse/django-moo
cd django-moo
docker compose up

Bootstrap the database and create your first wizard:

docker compose run webapp manage.py migrate
docker compose run webapp manage.py collectstatic
docker compose run webapp manage.py moo_init
docker compose run webapp manage.py createsuperuser --username wizard
docker compose run webapp manage.py moo_enableuser --wizard wizard Wizard

Connect at https://localhost/ and log in with the account you just created.

Interfaces

Web (WebSocket SSH)

The server is accessible through a browser-based SSH client at /. No SSH client needed.

WebSSH Client Example

WebSSH Editor Example

SSH

Direct SSH access is also available. Associate an SSH key with your account in the Django admin to skip the password prompt.

ssh -p 8022 yourname@localhost

SSH Client Example

Hit Ctrl-D to disconnect.

Django Admin

A full Django admin interface is available at /admin for managing objects, properties, verbs, and users.

Django Admin Example

AI agents with moo-agent

moo-agent is a companion package that connects autonomous LLM agents to DjangoMOO via SSH. Each agent has:

  • A SOUL.md personality file (plain text, version-controlled)
  • Persistent memory that accumulates across sessions
  • Tools for interacting with the world: move, look, take, drop, read, send mail, and more
  • Multi-agent orchestration via a Foreman coordination layer

Backends: Anthropic (Claude), AWS Bedrock, and LM Studio for local models.

pip install moo-agent
moo-agent init --name MyAgent --host localhost --port 8022 --user myagent ./my-agent
moo-agent run ./my-agent

Full moo-agent docs: https://moo-agent.readthedocs.io/

LambdaCore attributions

This package is derived from the LambdaMOO and LambdaCore documentation, including the LambdaCore Programmer's Manual and the LambdaMOO Programmer's Manual. The code was written without reading the original LambdaCore source; it is an independent reimplementation based on documented behavior and conventions.

Various verbs have been modified from their LambdaCore equivalents to better fit a Pythonic codebase: output uses print() rather than return values, property access follows Django ORM patterns, and permission idioms have been updated to account for differences in how this server dispatches verbs compared to LambdaMOO.

DjangoMOO could not have happened without the work of the following authors:

  • LambdaCore Database User's Manual (LambdaMOO 1.3, April 1991) Mike Prudence (blip), Simon Hunt (Ezeke), Floyd Moore (Phantom), Kelly Larson (Zaphod), Al Harrington (geezer)

  • LambdaCore Programmer's Manual (LambdaMOO 1.8.0p6, Copyright 1991) Mike Prudence (blip), Simon Hunt (Ezeke), Floyd Moore (Phantom), Kelly Larson (Zaphod), Al Harrington (geezer)

  • LambdaMOO Programmer's Manual (LambdaMOO 1.8.0p6, March 1997) Pavel Curtis (Haakon / Lambda)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_moo-1.0.1.tar.gz (509.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_moo-1.0.1-py3-none-any.whl (438.1 kB view details)

Uploaded Python 3

File details

Details for the file django_moo-1.0.1.tar.gz.

File metadata

  • Download URL: django_moo-1.0.1.tar.gz
  • Upload date:
  • Size: 509.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for django_moo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e24a480075245431bade1f31cec17fac75ee2bb82752d8318b27980cb0a5b1a7
MD5 8dc6419fb5dd31098228c9b16f2ebd04
BLAKE2b-256 47bd47dca935895144b05f06a254da4e2ce9ade62b6b4e4a41a6a1328f0d93b0

See more details on using hashes here.

File details

Details for the file django_moo-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: django_moo-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 438.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for django_moo-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a57156dd562f3bbe2bd0dd09195c9496fe7277b7dd8b0ee450aaa33347217631
MD5 97978da015f3d982ee4edb70c5a1ccbe
BLAKE2b-256 df09f731cb25b4bb7e461da153a37dfa9e3a91ed94487966fbe99b8b5efc8690

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page