Skip to content

Run the game every way with one ./rylween command, and move support/ into runtimes/, tools/ and game/ - #58

Merged
lagergren merged 3 commits into
mainfrom
lagergren/one-rylween-command
Nov 7, 2026
Merged

lagergren merged 3 commits into
mainfrom
lagergren/one-rylween-command

Conversation

@lagergren

Copy link
Copy Markdown
Owner

What

Six scripts become one command: ./rylween plays the game, serves it, stops it, and backs up its data. Serving defaults to this machine only, so nothing is reachable from other machines unless you ask for it with --lan. The repository root also loses bin/ and support/: their modules move next to the code that uses them.

Stacked on #57; the base moves to main once that merges.

Commits

Move support/ into runtimes/, tools/ and game/.

  • support/web-common → runtimes/web-common, beside the runtimes that use it.
  • support/tools → tools.
  • support/audio → game/audio-tools, beside the sounds it renders.
  • support/terminal is merged into :runtime. AnsiTerminal, AnsiCodes and AnsiInput keep their rylween.terminal package, and :runtime now depends on JLine directly. The :terminal project and its check are gone, and CI and the root check drop it.

The ledger test, .gitignore, and the module guides follow the new paths.

Run the game every way with one ./rylween command. ./rylween, a link to deploy/rylween, replaces bin/run.sh, bin/run-server.sh, bin/run-bitmap-server.sh, bin/backup-web-data.sh, deploy/deploy-rylween.sh and the root deploy.sh:

Command What it does
./rylween Plays the ANSI game in this terminal (what bin/run.sh did). The terminal zip ships the same script as bin/rylween, where it only plays.
./rylween serve Hosts the game for browsers.
./rylween stop Stops whatever serve started.
./rylween backup Archives a data directory (--data) or a container volume (--volume).
./rylween help Lists every option.

serve takes one choice from each pair, defaulting to --bitmap --docker --http --local:

  • --bitmap or --ansi picks the game.
  • --docker or --no-docker picks where it runs: a container, or the launcher built from the checkout.
  • --http or --https picks the protocol.
  • --local, --lan or --host ADDRESS picks who can connect.

--local is the default because deploy.sh published on the LAN by default.

  • Images: deploy/docker/Dockerfile.bitmap and Dockerfile.ansi, renamed from Dockerfile.bitmap-production and Dockerfile.production. The dev-only deploy/docker/Dockerfile is removed.
  • deploy/compose.yaml also runs the ANSI game, under the ansi profile, on its own port and volume. It now sets RYLWEEN_PUBLIC_URL, so the bitmap server prints the right link.
  • Releases: release.yml builds Dockerfile.bitmap. The release's compose.yaml copy drops the ANSI service, since releases don't publish an ANSI image.
  • Docs: deploy/README.md documents the command, with a table of the defaults. The root README and the runtime and web-common guides use the new commands.

Testing

  • CI checks: all module checks pass on both commits, with 270 tests and none skipped. shellcheck deploy/rylween and actionlint are clean.
  • ./rylween (play):
    • from a checkout, under macOS's /bin/bash 3.2;
    • with --name Strong;
    • from the terminal zip, which refuses serve and --build.
  • ./rylween serve --no-docker:
    • the bitmap and ANSI games, with --name and with --lan;
    • a second serve replaces the running server, and stop stops it.
  • ./rylween serve: the bitmap and ANSI containers, built from the new layout through compose, using an isolated compose project name.
  • Other commands: backup --data and backup --volume, and invalid flag combinations.
  • Release copy: the yq rewrite of compose.yaml drops the ANSI service and volume.
  • Links: every relative link and anchor in every tracked Markdown file resolves, checked with GitHub's heading-slug rules.

Not tested here: ./rylween serve --https against a real domain. It runs the same compose.https.yaml steps as #57's ./deploy.sh --https.

The repository root keeps only what it is about: the game, its runtimes,
tools, and deployment. :web-common moves to runtimes/web-common beside the
runtimes that use it, :tools to tools/, and the Python audio synthesizers
to game/audio-tools beside the sounds they render. The ANSI terminal
primitives (AnsiTerminal, AnsiCodes, AnsiInput) move into :runtime, which
now depends on JLine itself, so the :terminal project and its check are
gone. The ledger test, CI, and the module guides follow the new paths.
./rylween, a link to deploy/rylween, replaces bin/run.sh,
bin/run-server.sh, bin/run-bitmap-server.sh, bin/backup-web-data.sh,
deploy/deploy-rylween.sh, and the root deploy.sh:

- ./rylween plays the ANSI game in this terminal, as bin/run.sh did. The
  terminal zip ships it as bin/rylween, where it only plays.
- ./rylween serve hosts the game for browsers. Its defaults are the bitmap
  game, in a container, over HTTP, on this machine only: --bitmap
  --docker --http --local. --ansi, --no-docker, --https, and --lan or
  --host pick the others; deploy.sh published on the LAN by default.
- ./rylween stop stops whatever serve started, and ./rylween backup
  archives a data directory or a container volume.

The images are deploy/docker/Dockerfile.bitmap and Dockerfile.ansi (once
Dockerfile.bitmap-production and Dockerfile.production); the dev-only
deploy/docker/Dockerfile is gone. compose.yaml runs the ANSI game too,
in its ansi profile, which the release's compose copy leaves out.
deploy/README.md documents the command and its defaults, and the other
guides use it.
@lagergren
lagergren force-pushed the lagergren/one-rylween-command branch from 0b6c186 to dd6b9ce Compare November 7, 2026 17:43
@lagergren
lagergren changed the base branch from lagergren/https-deploy to main November 7, 2026 17:43
The release has attached a compose.https.yaml pinned to its image since the
HTTPS deployment landed; the Releasing section named only the zip and
compose.yaml.
@lagergren
lagergren merged commit 90d5e3b into main Nov 7, 2026
1 check passed
@lagergren
lagergren deleted the lagergren/one-rylween-command branch November 7, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant