Skip to main content

Deterministic Zork-style text adventure authoring and runtime CLI

Project description

AnyZork

AnyZork

A Zork-style text adventure generator. Describe a world to any LLM, get back a complete game, and play it on a fully deterministic engine — no AI needed at runtime.

Quickstart · Docs · Contributing


Install

Requires Python 3.11+

The recommended way to install AnyZork is with pipx, which gives you an isolated environment and puts the anyzork command on your PATH:

pipx install anyzork

To enable Narrator Mode (optional LLM-powered prose), install with the narrator extra:

pipx install 'anyzork[narrator]'

Upgrade to the latest release:

pipx upgrade anyzork
Alternative: install with pip

If you prefer a regular pip install into a virtual environment:

pip install anyzork            # core only
pip install 'anyzork[narrator]'  # with narrator providers

Homebrew: A Homebrew formula is not available yet. We want to prove out the Python packaging path first and will revisit Homebrew support once the release cadence is stable.

Quickstart

Browse and play a community game:

anyzork browse                        # see what's available
anyzork install haunted-lighthouse    # add it to your library
anyzork play haunted-lighthouse       # start playing

Make your own:

anyzork generate "haunted lighthouse on a cliff" -o prompt.txt
# paste prompt.txt into any LLM, save the response as lighthouse.zorkscript
anyzork import lighthouse.zorkscript -o lighthouse.zork
anyzork play lighthouse.zork

Features

Make Your Own Game — Generate a prompt, paste it into any LLM to get ZorkScript, then compile and play. A guided wizard or a one-liner gets you started.

Playing Games — Play local files or library games, manage named save slots, and list your collection.

Narrator Mode — An optional live-LLM layer that rewrites room descriptions and event text without touching game state. Supports Claude, OpenAI, and Gemini.

Sharing Games — Publish games to the official catalog, browse community submissions, and install with a single command.

Docs

Doc What it covers
Game Design Document Mechanics, design constraints, and motivation
System Architecture Components, commands, and runtime model
World Schema .zork database reference
ZorkScript Spec Authoring language reference
Command DSL Spec Runtime rule vocabulary
Author Tooling Lint and import diagnostics design
CLI Reference All commands, flags, and options
Configuration Config file, env vars, and provider setup
Narrator Mode Optional LLM prose layer
Sharing Games Publishing, browsing, and installing
ADR-001: SQLite Storage Original SQLite rationale (superseded — .zork files are now zip archives)
Roadmap Ordered plan and milestone tracking

How It Works

 You describe a world        Any LLM writes           AnyZork compiles it       You play it
 ───────────────────   ──>   ZorkScript code   ──>    into a .zork file    ──>  deterministically
 "haunted lighthouse         (rooms, items,           (zip archive)             No AI at runtime.
  on a cliff"                 NPCs, puzzles)                                    Pure engine.
  1. Generateanyzork generate builds a structured prompt from your idea (freeform or wizard-guided).
  2. Author — You paste that prompt into any LLM. It returns ZorkScript — a human-readable DSL for rooms, items, NPCs, puzzles, dialogue trees, and commands.
  3. Compileanyzork import compiles ZorkScript into a .zork file (a game archive). Lint and validation catch errors before you play.
  4. Play — The deterministic engine evaluates commands, preconditions, and effects with no LLM involved. Game state is always consistent and reproducible.

The optional Narrator Mode adds an LLM prose layer on top — it rewrites descriptions for atmosphere but never touches game state.

Contributing

MIT-licensed, solo-maintained. Issues and PRs welcome — small focused changes and clear bug reports are easiest to review.

Development

For contributors working on AnyZork itself:

git clone https://github.com/oobagi/anyzork.git
cd anyzork
python3.11 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,narrator,catalog]"
ruff check .
pytest -q

License

MIT

Project details


Download files

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

Source Distribution

anyzork-0.2.0.tar.gz (192.0 kB view details)

Uploaded Source

Built Distribution

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

anyzork-0.2.0-py3-none-any.whl (220.3 kB view details)

Uploaded Python 3

File details

Details for the file anyzork-0.2.0.tar.gz.

File metadata

  • Download URL: anyzork-0.2.0.tar.gz
  • Upload date:
  • Size: 192.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for anyzork-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2c8b95fef0b414d9078302b3a873cc5a64993c14f09f4b7caa71c77307d25322
MD5 b99b60cc58a5f7f7dacccc69603172a6
BLAKE2b-256 6acb7eefbaae817580e8a4150367c80e476756a36bbf14d5cdfd7bf5c8d0b903

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyzork-0.2.0.tar.gz:

Publisher: publish.yml on oobagi/anyzork

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anyzork-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: anyzork-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 220.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for anyzork-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f608472e6f7d63b6a2e40c321cb9414a7ae47997d4e16447924b6d83f126f0d1
MD5 5a1b195d52cbbc66f2b591be1f09893f
BLAKE2b-256 7b5a9f2c3f482052fa822ec41abc6c6628aabd3ced07752aa54ca3af5df37bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyzork-0.2.0-py3-none-any.whl:

Publisher: publish.yml on oobagi/anyzork

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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