Docs / CONTRIBUTING
Contributing to Kitty
Source: CONTRIBUTING.md
Thanks for helping. This page covers setup, the tests to run before a pull request, and the house rules.
Ground rules
- Only contribute content you may redistribute. Kitty does not bundle or link commercial ROMs, BIOS files or firmware; you can load any game file from your own computer, and the registry lists only games whose licence allows redistribution. Do not add, link, mirror or describe how to obtain commercial ROMs, proprietary keys or console firmware. That includes test fixtures, screenshots and issue comments. Pull requests that do will be closed. New consoles must use a BIOS-free core.
- Every remote asset is pinned by HTTPS URL and SHA-256. A game is only re-hosted when its licence clearly allows redistribution; otherwise link the upstream release by URL and digest.
- Linux is the target host and macOS the development host. Windows and SteamOS hosts are out of scope for now, so please open an issue before starting work there.
- Be kind. This project follows the Code of Conduct.
Setup
You need Python 3.10+, Node.js 18+ (CI uses 22) and, to actually launch games, the Kiri CLI on PATH as kiri. The unit tests do not need Kiri. For the published desktop, CLI and SDK channels, see docs/INSTALL.md.
git clone https://github.com/EnzoVezzaro/game-composer.git
cd game-composer
python3 -m venv .venv
.venv/bin/python -m pip install -e . pytest
npm --prefix sdk ci && npm --prefix sdk run build # required before the desktop tests
npm --prefix desktop ci
npm --prefix desktop start # optional: run the app
Install and build sdk/ before you run the desktop tests. The desktop bridge imports the SDK, and without the SDK's own node_modules the lifecycle and bridge tests fail with Cannot find package 'yaml'.
Tests
Run the suite for every area you touched. CI runs them on ubuntu-latest (.github/workflows/tests.yml).
| Area | Command |
|---|---|
| Python core and CLI | .venv/bin/python -m pytest -q tests --ignore=tests/url-source/test_url_source.py --ignore=tests/url-swarm |
| SDK | npm --prefix sdk test (build, typecheck, node:test) |
| Desktop app | npm --prefix desktop run check && npm --prefix desktop test (after the SDK build above) |
| npm CLI launcher | npm --prefix cli-npm test (node:test, no install step) |
| Whitespace | git diff --check |
tests/url-source/ and tests/url-swarm/ are standalone scripts that exit at import time, which is why pytest skips them.
UI changes: attach before/after screenshots at desktop width, and check both light and dark themes. Colour contrast is measured, not eyeballed; see docs/CONTRAST-AUDIT.md.
Runtime changes: say whether you ran a real kitty up on Kiri, on which host, and what you observed. If you did not, say so. "Not run" is a fine answer; a guess is not.
Building the CLI packages
The kitty CLI ships on two channels. Build both locally to check them; publishing is done by a maintainer.
PyPI, kitty-game-composer (the Python CLI, from pyproject.toml). The PyPI page text is docs/pypi/README.md, which uses absolute links because PyPI cannot resolve repo-relative ones.
python3 -m venv /tmp/kitty-build && /tmp/kitty-build/bin/pip install build twine
/tmp/kitty-build/bin/python -m build # writes dist/*.whl and dist/*.tar.gz
/tmp/kitty-build/bin/twine check --strict dist/*
python3 -m venv /tmp/kitty-try && /tmp/kitty-try/bin/pip install dist/*.whl
/tmp/kitty-try/bin/kitty --version
The wheel holds only gamecomposer/ and its JSON schema. Tests, docs, desktop/ and registry-staging/ stay out.
npm, @kitty-game-composer/cli (a launcher in cli-npm/). It has no build step and no dependencies.
npm --prefix cli-npm test
cd cli-npm && npm pack --dry-run # lists the five files that ship
Keep both versions in step with each other when you bump one.
Branches and commits
- Branch from
main. Name the branch after the change, for examplefix/player-resizeorfeat/registry-gb. - Commits use Conventional Commits with a scope when it helps:
feat(player): ...,fix(landing): ...,docs(readme): ...,chore(sdk): ...,test(registry): ....
Types in use:feat,fix,refactor,docs,test,chore,perf,ci. - Keep pull requests focused. Fill in the pull request template, including which tests you ran.
- Do not commit secrets,
.envfiles, local data folders ornode_modules.
Adding a console, game or controller
Consoles, games and controllers live in their own repo, game-composer-registry. Open registry pull requests there: add the entry and its files, rebuild index.json with tools/build_index.py, run tools/validate.py, and include the licence notice for each game under licenses/. A new console needs a real Kiri session as evidence. In this repo, a registry release only changes the pin in gamecomposer/registry.py; see docs/REGISTRY.md.
Security issues
Do not open a public issue for a vulnerability. Follow SECURITY.md.

