Skip to main content

NeonRP CLI: A file-backed text RPG engine

Project description

NeonRP CLI

NeonRP CLI is a developer-friendly command-line engine for playing and iterating on file-backed text RPGs.

Why NeonRP (vs. a web chat)?

NeonRP is built around engine-like guarantees:

  • Resume / Undo / Branch: checkpointed gameplay you can safely explore.
  • Plan → Diff → Apply: changes are visible and validated before they land.
  • Append-only events + snapshots: reproducible and debuggable runs.
  • Minimal-context retrieval: fast runs even with large worlds.
  • Sandbox & Replay: isolated experimentation and determinism verification.

Installation

End users — one-liner

curl -LsSf https://worldlines.gg/install.sh | sh

Installs uv (if missing) then uv tool install worldlines. Works on macOS and Linux. Verify with neonrp --help or just worldlines.

Developers — editable install

# From local source (editable install — picks up code changes)
uv tool install -e /path/to/NeonRP

# Verify installation
neonrp --help

Users in China (partial GitHub / Cloudflare connectivity)

Some mainland networks throttle or drop GitHub Release downloads and Cloudflare-fronted domains. If curl https://worldlines.gg/install.sh times out, try:

# 1) Fetch install.sh from GitHub directly (sometimes faster than the
#    Cloudflare redirect, depending on ISP routing):
curl -LsSf \
  https://github.com/LudicDynamics/WorldLines/releases/latest/download/install.sh \
  | sh

# 2) Force uv to use a China-hosted PyPI mirror before installing:
export UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
uv tool install worldlines

#    (alternative mirrors: mirrors.aliyun.com/pypi/simple,
#     mirrors.cloud.tencent.com/pypi/simple)

# 3) Both at once — pass CHINA_MIRROR=1 to install.sh:
CHINA_MIRROR=1 curl -LsSf https://worldlines.gg/install.sh | sh

If none of the above work, a VPN is the last resort. Auto-update (neonrp self-update) honors the same UV_DEFAULT_INDEX variable, so exporting it in your shell profile keeps future upgrades on the mirror too.

Quick start

# Just run neonrp to start the TUI (like Claude Code)
neonrp

# Or use subcommands directly
neonrp init
neonrp game new
neonrp run "look around"
neonrp save
neonrp undo
neonrp branch "try-stealing-route"

neonrp init is enough to start working in TUI build mode. Fresh projects now expose packaged builtin skills automatically, so /game new is optional unless you want the default starter world and play-agent scaffold immediately.

Validation & Indexing (M1)

# validate game data against schema
neonrp validate [--json]

# build / update entity index
neonrp index build [--json]
neonrp index update [--json]

# search entities
neonrp find "tokyo" --kind town --json

# get ranked context for a query
neonrp context "neon city" --limit 5 --json

Embedding Retrieval (Opt-in)

{
  "embedding": {
    "enabled": true,
    "model_ref": "openai-local-qwen3-embedding-0.6b"
  },
  "models": {
    "openai-local-qwen3-embedding-0.6b": {
      "provider": "openai",
      "base_url": "http://127.0.0.1:1234/v1",
      "model": "text-embedding-qwen3-embedding-0.6b",
      "api_key": "1234"
    }
  }
}
  • index build will precompute vectors when embedding.enabled=true.
  • context / read_context use hybrid fuzzy + vector retrieval automatically when enabled.
  • If embedding is disabled, retrieval remains fuzzy-only.

Agents & Controlled Writes (M2)

# create and manage agents
neonrp agent new narrator
neonrp agent list --json
neonrp agent show narrator --json

# apply a pre-generated proposal
neonrp agent run narrator --proposal changes.json --apply --json

# view agent run logs
neonrp agent logs <run_id>

LLM Integration + Import (M3)

# LLM-driven agent run (single-shot)
neonrp agent run narrator --query "describe the town square" --provider glm --json
neonrp agent run narrator --query "..." --provider stub --apply --json

# import SillyTavern character card (JSON or PNG)
neonrp import sillytavern-card character.json --json
neonrp import sillytavern-card character.png --json

# import on TUI startup
neonrp tui --import-card character.png --import-id my-character

Sandbox & Replay (M4)

# save, then create a sandbox from it
neonrp save my-checkpoint
neonrp load          # list loadable snapshots
neonrp sandbox new experiment --from my-checkpoint --switch

# list / switch / drop sandboxes
neonrp sandbox list --json
neonrp sandbox switch main
neonrp sandbox drop experiment --force

# verify replay determinism
neonrp replay verify --from my-checkpoint --json

# checkout a past event into a new sandbox
neonrp replay checkout --from my-checkpoint --to 5 --to-branch rollback --json

save/load snapshots now include the current branch's session transcript in addition to game/, events, and metadata.

Terminal User Interface (TUI)

NeonRP includes a rich terminal UI for interactive gameplay:

# launch the TUI
neonrp tui

# launch with specific branch
neonrp tui --branch experiment

# launch with provider override
neonrp tui --provider openai

# continue previous branch session on startup
neonrp tui --continue

# force start a new session on startup (default behavior)
neonrp tui --new

# import a Tavern card before the first turn
neonrp tui --import-card character.png --import-id my-character

# enable verbose diagnostics
neonrp tui --verbose

# launch with LM Studio (OpenAI-compatible local server)
neonrp tui --provider lmstudio

TUI Features

  • Single-pane conversational layout: Claude Code style transcript + input
  • Init-first workflow: /init is enough to start build-mode work in a fresh directory
  • Builtin skills on fresh projects: packaged skills appear even before local skills/ exist
  • Slash command workflow: Enter/Tab completion with command hints
  • Session management: /sessions picker, /continue, /new
  • Direct Tavern import entry points: --import-card on startup or /import sillytavern-card ... in-session
  • Verbose diagnostics: /verbose on|off|status and --verbose
  • Streaming transcript: assistant/tool/thinking updates rendered incrementally
  • Live token counters: local real-time estimates in the top-right status bar

Key Bindings

Key Action
q Quit
Ctrl+Q Safe quit (immediate terminal return)
Esc Interrupt in-flight LLM turn
Ctrl+K Command palette
Ctrl+P Command palette
F6 Copy full transcript

See TUI Guide for complete documentation.

Testing & Coverage

# fast regression
uv run pytest -q

# full coverage report
uv run pytest --cov=neonrp --cov-report=term-missing -q

# real endpoint e2e (uses ~/.neonrp/config.json)
NEONRP_E2E_LLM=1 uv run pytest tests/test_llm_real_endpoint.py -q

Documentation

Development

For contribution guidelines, architecture details, and the roadmap, see:

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

neonrp-0.1.0.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

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

neonrp-0.1.0-py3-none-any.whl (512.4 kB view details)

Uploaded Python 3

File details

Details for the file neonrp-0.1.0.tar.gz.

File metadata

  • Download URL: neonrp-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neonrp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b0f2dd614ab5abdfad8dc3de930e28dcb200697d0aaaf62ad2db56dc9799555
MD5 035ac2389157ca6ef38e60abdb10061c
BLAKE2b-256 b8ae29c2207bf247ef2486d1819ce79da5e0634c3f1c00ddd11aaceaa5e189fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for neonrp-0.1.0.tar.gz:

Publisher: release.yml on LudicDynamics/NeonRP

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

File details

Details for the file neonrp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: neonrp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 512.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neonrp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57824f86debd5bc4a566f998652f2997bab0251879e5d60a569c0d9410814901
MD5 70a58c45b1143a924343c4661c427071
BLAKE2b-256 609721065fe00365e0ea3fe8d95e2f74f38ba584356b289f82988946179a3c27

See more details on using hashes here.

Provenance

The following attestation bundles were made for neonrp-0.1.0-py3-none-any.whl:

Publisher: release.yml on LudicDynamics/NeonRP

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