Turn your git commit history into a playable ASCII dungeon roguelike.
Project description
gitquest ๐ก๏ธ
Your commits. Your dungeon. Your legend. Turn any git repository's history into a procedurally generated, playable ASCII dungeon roguelike โ right in your terminal.
gitquest reads your repo's real commit history and deterministically builds a
dungeon from it. Each commit becomes a room. Bug-fix commits spawn bugs. Merge
commits become mini-bosses. The languages you've coded fill your skill tree.
Clear every room from the repo's first commit to HEAD, then flex your career
on a shareable stats card.
Same repo + same seed = the same dungeon, every time. Reproducible and shareable.
โจ Demo
____ _ _ ___ _
/ ___(_) |_ / _ \ _ _ ___ ___| |_
| | _| | __| | | | | | |/ _ \/ __| __|
| |_| | | |_| |_| | |_| | __/\__ \ |_
\____|_|\__|\__\_\\__,_|\___||___/\__|
Your commits. Your dungeon. Your legend.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Room 2/5 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ fix: bug in output handling โ
โ 33b27d3 ยท +2/-0 ยท a tight crawlspace of tangled diffs โ
โ ๐ง You meet Ada Lovelace, an ally from this commit. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ง Skill XP: +1 Python, +1 JavaScript
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ A Bug appears! โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ (>_<) โ
โ Off-by-One โ
โ HP 11 ยท ATK 4 ยท DEF 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Attack Defend Item(0) Run
Your move (a): ยป Hero hits Off-by-One for 6 damage.
โ Off-by-One defeated! (+10 XP, +6 gold)
And the grand finale โ the shareable flex card:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ flex card โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ GITQUEST CAREER CARD โ โ
โ my-repo seed 17391773614721965407 โ
โ โ
โ RANK: Senior Crusader โ
โ SCORE: 2310 โ
โ STATUS: VICTORIOUS โ
โ โ
โ CAREER STATS โ
โ Level 11 Gold 642 โ
โ Kills 148 Bosses 12 โ
โ SKILL TREE โ
โ Python โโโโโโโโโโโโโโโโโโ 220 โ
โ TypeScript โโโโโโโโโโโโโโโโโโ 130 โ
โ Specialization: Python ยท 6 skill paths explored โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Install
The zero-friction way (isolated, recommended):
pipx install gitquest
Or with pip:
pip install gitquest
From source:
git clone https://github.com/jithin-jz/gitquest
cd gitquest
pip install .
๐ฎ Play
Run it inside any git repository โ no arguments needed:
gitquest
python -m gitquest works too.
Flags
| Flag | Description |
|---|---|
--path <repo> |
Play on another repository (default: current directory). |
--seed <n> |
Force a specific dungeon seed (default: derived from repo). |
--fast |
Skip animations and "press Enter" pauses. |
--stats-only |
Skip gameplay and print just the flex card. |
--max-commits |
Cap/sample commits for huge repos (default: 300). |
--version |
Print the version. |
Examples:
gitquest --path ../some-other-repo
gitquest --seed 42 --fast
gitquest --stats-only # instant career card, no fighting
๐ง How it works
gitquest maps real repository data onto game mechanics:
| Git data | Becomesโฆ |
|---|---|
| Commit | A room in the dungeon |
| Lines added/removed | Room size + monster difficulty |
| Merge commit | A mini-boss room |
| Files changed | Loot/items in the room |
| Commit author | An ally/NPC you meet |
| Languages (by file extension) | Your skill tree / XP categories |
| Message keywords | Enemy types (fix โ Bug, feat โ Featureโฆ) |
| Total repo stats | Your final rank (e.g. Senior Crusader) |
Determinism
The dungeon seed is derived from the SHA of the repository's first commit
(unless you pass --seed). All procedural generation โ monster names, stats,
loot rolls, room sizes โ flows from that single seed via a random.Random
instance with a fixed call order. The result: identical, reproducible dungeons
that you and a teammate can compare.
Architecture
gitquest/
cli.py # entry point + argument parsing (argparse)
git_parser.py # extract & normalize commit data (GitPython + git CLI fallback)
generator.py # commit data -> dungeon/rooms/monsters (seeded)
engine.py # game loop, state, turn handling
combat.py # combat math (pure, rng-driven, testable)
entities.py # Player, Monster, Room, Item, Dungeon dataclasses
renderer.py # all rich-based rendering
flexcard.py # final shareable stats card + ranking
data/ # monster/item name lists, ranks, ascii art
tests/ # pytest: parser, generator determinism, combat
Everything runs locally and offline โ no network calls, ever.
๐ ๏ธ Development
pip install -e ".[dev]"
pytest
Tests cover history parsing, generator determinism, and combat logic.
Edge cases handled
- Not a git repository โ friendly error, no traceback.
- Empty history / no commits โ friendly nudge to commit first.
- Huge repos โ evenly down-sampled to
--max-commits(still deterministic). - Missing
GitPythonโ automatic fallback to thegitCLI.
๐ค Contributing
Issues and PRs welcome! Ideas: more monster archetypes, a textual dungeon map,
achievements, or exporting the flex card as an image.
๐ License
MIT โ see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitquest-0.1.0.tar.gz.
File metadata
- Download URL: gitquest-0.1.0.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5998c7b1c561e43a34b227e8adaffee96893966dd34b202d2c7f04ab910b9344
|
|
| MD5 |
e994171cf943a05166a5ebdc971cda8f
|
|
| BLAKE2b-256 |
24cafb0b39f3ca754ad7cc0201269ba7841ecd6d3c054aa6a0847e046bfbddf2
|
Provenance
The following attestation bundles were made for gitquest-0.1.0.tar.gz:
Publisher:
publish.yml on jithin-jz/gitquest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitquest-0.1.0.tar.gz -
Subject digest:
5998c7b1c561e43a34b227e8adaffee96893966dd34b202d2c7f04ab910b9344 - Sigstore transparency entry: 1948093651
- Sigstore integration time:
-
Permalink:
jithin-jz/gitquest@6ebd70f0b758ca75356df252d17e1a68445d6cfa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jithin-jz
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6ebd70f0b758ca75356df252d17e1a68445d6cfa -
Trigger Event:
push
-
Statement type:
File details
Details for the file gitquest-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gitquest-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2077b957ef4d2b0db691556e26e86e10a9587501bd033291fe7fe9c70eb97e0
|
|
| MD5 |
73e491b04080fba967b1b006bffb98d6
|
|
| BLAKE2b-256 |
356cc08894e5a89ffc617e708f0ad7d0576cd54acd8535a544df196d23330c55
|
Provenance
The following attestation bundles were made for gitquest-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jithin-jz/gitquest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitquest-0.1.0-py3-none-any.whl -
Subject digest:
e2077b957ef4d2b0db691556e26e86e10a9587501bd033291fe7fe9c70eb97e0 - Sigstore transparency entry: 1948093777
- Sigstore integration time:
-
Permalink:
jithin-jz/gitquest@6ebd70f0b758ca75356df252d17e1a68445d6cfa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jithin-jz
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6ebd70f0b758ca75356df252d17e1a68445d6cfa -
Trigger Event:
push
-
Statement type: