Skip to main content

Retro gaming toolkit - ROM cleaning and asset generation

Project description

retrokit

retrokit

🎮 Retro gaming toolkit — AI-powered platform asset generation and smart ROM collection cleaning 🧰

retrokit is a Python CLI for preparing retro gaming libraries. It generates Pegasus Frontend platform artwork from reference images with Gemini, and it scans ROM folders for duplicate or low-quality variants before you remove them.

Asset generation is built around a local input folder, a Gemini API key, and a theme deployment config. ROM cleaning is local-first: scan, review the CSV report, then quarantine or delete.

Install

git clone https://github.com/tsilva/retrokit.git
cd retrokit
uv tool install .
cp .env.example .env

Set GEMINI_API_KEY in .env before running asset generation commands.

Commands

retrokit assets generate amigacd32 "Commodore Amiga CD32"  # generate device and logo assets
retrokit assets list                                       # list generated platforms
retrokit assets themes --init                              # create themes.yaml
retrokit assets deploy amigacd32 --theme colorful          # copy generated assets into a theme
retrokit assets deploy --dry-run                           # preview deployment
retrokit assets config                                     # show asset configuration

retrokit roms scan --roms-dir /path/to/roms                # scan ROMs and write scan_cache.json
retrokit roms report --roms-dir /path/to/roms              # write duplicate_report.csv
retrokit roms clean --roms-dir /path/to/roms --dry-run     # preview removals from the report
retrokit roms clean --roms-dir /path/to/roms --quarantine  # move removals into _quarantine/
retrokit roms clean --roms-dir /path/to/roms --delete      # permanently delete after confirmation

For development checks:

uv sync --extra dev
uv run ruff check .
uv run mypy src/retrokit main.py
uv run pytest

Notes

  • Asset references live in .input/<platform_id>/ as platform.jpg or platform.png plus logo.png, logo.jpg, or logo.jpeg.
  • Generated assets are written under output/assets/images/ by default: 2160x2160 device PNGs and four 1920x510 logo variants for dark and light themes.
  • Theme deployment reads themes.yaml from the current directory, the project root, or ~/.config/retrokit/themes.yaml.
  • ROM scans write scan_cache.json; reports write duplicate_report.csv; cleaning reads the report rather than rescanning.
  • ROM cleaning prefers clean dumps, verified tags, higher-priority regions, newer revisions, and preferred per-platform formats. Tune those rules in src/retrokit/roms.py.
  • main.py is the original standalone ROM dedup script. The packaged CLI path is src/retrokit/.

Architecture

retrokit architecture diagram

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

retrokit-1.0.1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

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

retrokit-1.0.1-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file retrokit-1.0.1.tar.gz.

File metadata

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

File hashes

Hashes for retrokit-1.0.1.tar.gz
Algorithm Hash digest
SHA256 614fae22fa18e26306440b3d2334abbbbf0b4b9587f7860bea77779bbd3586f9
MD5 5fcb6382697b03e53ccad36bbea53ad1
BLAKE2b-256 c707b8bcd707b361adca10810bfdc21f7cad28505575b9d03843b2cabd864ec3

See more details on using hashes here.

Provenance

The following attestation bundles were made for retrokit-1.0.1.tar.gz:

Publisher: release.yml on tsilva/retrokit

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

File details

Details for the file retrokit-1.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for retrokit-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 086060ea8b725b4e06a0a49be8f1007019ac0c21c8ccd270c26141596c996cfd
MD5 1317e32776e14c2c02cd62fc51b9e872
BLAKE2b-256 895320ad7e280390161aa6dca89b44d2f5887a41bdbd36eda308630506c297be

See more details on using hashes here.

Provenance

The following attestation bundles were made for retrokit-1.0.1-py3-none-any.whl:

Publisher: release.yml on tsilva/retrokit

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