Getting started¶
Everything lives in one repository: one pyproject.toml and one uv.lock for the Python package retrospeedlab, and one npm package in web/ for the website, the stream view and these docs.
Prerequisites¶
| Tool | Needed for |
|---|---|
| Linux or WSL | Every Python command; the .venv is Linux |
| Python 3.12 and uv | The package, its tests and every CLI |
| Node 22 | web/: the site, the stream view and the docs |
| FFmpeg | Rendering videos of runs |
| Java 21 | Only the lake's Spark tests |
| An NVIDIA GPU | Optional: the runner's video encoder and PPO |
Install¶
git clone <repository-url> retro-speedlab-suite
cd retro-speedlab-suite
uv sync --locked
npm --prefix web ci
The dev dependency group installs every extra, so one uv sync gives you the engine, the games, the search, the backend, the maintainer and the lake. The engine and the games alone need none of the extras.
| Extra | Adds |
|---|---|
search |
The search's libraries, Kafka and tracing |
vision |
PyTorch and Stable-Baselines3 |
runner |
search and vision plus pydantic |
backend |
FastAPI, SQLAlchemy, delta-rs, discord.py |
maintainer |
The Claude Agent SDK |
lake |
PySpark, Delta Lake, Airflow 3 |
Run the checks¶
Every commit passes all of them. Run the Python ones in WSL or Linux.
uv run --locked ruff check
uv run --locked ruff format --check
uv run --locked pyright
uv run --locked pytest -q
uv run --locked vulture
npm --prefix web ci
npm --prefix web run lint
npm --prefix web run format:check
npm --prefix web test
npm --prefix web run build
npm --prefix web run knip
gitleaks dir . --redact
The search keeps 95 % test coverage: uv run --locked pytest -q tests/search --cov.
Play a game¶
uv run python -m retrospeedlab.arcade.play comet_courier
The argument is a game's slug from src/retrospeedlab/games/collection.yaml. Arrows or WASD move, X, Space or K is A, Z, Y or J is B, Enter is START, Shift, C or L is SELECT, P pauses, M turns the music off and on, and R powers on again.
Build the sites¶
uv run python -m retrospeedlab.arcade.site build renders/site # the games site, every game in the browser
npm --prefix web run build # the website and the stream view, in web/dist
uv run zensical serve --config-file docs-site/mkdocs.yml # these docs, live on localhost
uv run zensical build --config-file docs-site/mkdocs.yml --clean --strict writes the docs to docs-site/site and fails on a broken link.
Next steps¶
- How it fits together shows the parts and the data flow.
- Run your own AI puts your own agent on the games.
- The code explains each part in turn.