gitquest 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: gitquest
3
+ Version: 0.1.0
4
+ Summary: Turn your git commit history into a playable ASCII dungeon roguelike.
5
+ Author-email: jithin-jz <jithinjzx@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/jithin-jz/gitquest
8
+ Project-URL: Repository, https://github.com/jithin-jz/gitquest
9
+ Project-URL: Issues, https://github.com/jithin-jz/gitquest/issues
10
+ Keywords: git,game,roguelike,cli,ascii,terminal,rich
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Games/Entertainment
19
+ Classifier: Topic :: Software Development :: Version Control :: Git
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: rich>=13.0.0
24
+ Requires-Dist: GitPython>=3.1.30
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ # gitquest 🗡️
30
+
31
+ > **Your commits. Your dungeon. Your legend.**
32
+ > Turn any git repository's history into a procedurally generated, playable
33
+ > ASCII dungeon roguelike — right in your terminal.
34
+
35
+ `gitquest` reads your repo's real commit history and deterministically builds a
36
+ dungeon from it. Each commit becomes a room. Bug-fix commits spawn bugs. Merge
37
+ commits become mini-bosses. The languages you've coded fill your skill tree.
38
+ Clear every room from the repo's first commit to `HEAD`, then flex your career
39
+ on a shareable stats card.
40
+
41
+ **Same repo + same seed = the same dungeon, every time.** Reproducible and
42
+ shareable.
43
+
44
+ ---
45
+
46
+ ## ✨ Demo
47
+
48
+ <!--
49
+ 📽️ ANIMATED GIF PLACEHOLDER
50
+ Drop a terminal recording here (e.g. via `asciinema` + `agg`, or a screen GIF).
51
+ Recommended: a ~20s clip of a fight + the final flex card.
52
+ ![gitquest demo](docs/demo.gif)
53
+ -->
54
+
55
+ ```text
56
+ ____ _ _ ___ _
57
+ / ___(_) |_ / _ \ _ _ ___ ___| |_
58
+ | | _| | __| | | | | | |/ _ \/ __| __|
59
+ | |_| | | |_| |_| | |_| | __/\__ \ |_
60
+ \____|_|\__|\__\_\\__,_|\___||___/\__|
61
+
62
+ Your commits. Your dungeon. Your legend.
63
+
64
+ ┌───────────────────────────────── Room 2/5 ──────────────────────────────────┐
65
+ │ fix: bug in output handling │
66
+ │ 33b27d3 · +2/-0 · a tight crawlspace of tangled diffs │
67
+ │ 🧙 You meet Ada Lovelace, an ally from this commit. │
68
+ └──────────────────────────────────────────────────────────────────────────────┘
69
+ 🧠 Skill XP: +1 Python, +1 JavaScript
70
+ ┌────────────────────────────── A Bug appears! ───────────────────────────────┐
71
+ │ (>_<) │
72
+ │ Off-by-One │
73
+ │ HP 11 · ATK 4 · DEF 0 │
74
+ └──────────────────────────────────────────────────────────────────────────────┘
75
+ Attack Defend Item(0) Run
76
+ Your move (a): » Hero hits Off-by-One for 6 damage.
77
+ ✔ Off-by-One defeated! (+10 XP, +6 gold)
78
+ ```
79
+
80
+ And the grand finale — the shareable **flex card**:
81
+
82
+ ```text
83
+ ┌───────────────────────────────── flex card ─────────────────────────────────┐
84
+ │ ⚔ GITQUEST CAREER CARD ⚔ │
85
+ │ my-repo seed 17391773614721965407 │
86
+ │ │
87
+ │ RANK: Senior Crusader │
88
+ │ SCORE: 2310 │
89
+ │ STATUS: VICTORIOUS │
90
+ │ │
91
+ │ CAREER STATS │
92
+ │ Level 11 Gold 642 │
93
+ │ Kills 148 Bosses 12 │
94
+ │ SKILL TREE │
95
+ │ Python ██████████████████ 220 │
96
+ │ TypeScript ███████████░░░░░░░ 130 │
97
+ │ Specialization: Python · 6 skill paths explored │
98
+ └──────────────────────────────────────────────────────────────────────────────┘
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 🚀 Install
104
+
105
+ The zero-friction way (isolated, recommended):
106
+
107
+ ```bash
108
+ pipx install gitquest
109
+ ```
110
+
111
+ Or with pip:
112
+
113
+ ```bash
114
+ pip install gitquest
115
+ ```
116
+
117
+ From source:
118
+
119
+ ```bash
120
+ git clone https://github.com/jithin-jz/gitquest
121
+ cd gitquest
122
+ pip install .
123
+ ```
124
+
125
+ ---
126
+
127
+ ## 🎮 Play
128
+
129
+ Run it inside any git repository — no arguments needed:
130
+
131
+ ```bash
132
+ gitquest
133
+ ```
134
+
135
+ `python -m gitquest` works too.
136
+
137
+ ### Flags
138
+
139
+ | Flag | Description |
140
+ | ---------------- | --------------------------------------------------------- |
141
+ | `--path <repo>` | Play on another repository (default: current directory). |
142
+ | `--seed <n>` | Force a specific dungeon seed (default: derived from repo).|
143
+ | `--fast` | Skip animations and "press Enter" pauses. |
144
+ | `--stats-only` | Skip gameplay and print just the flex card. |
145
+ | `--max-commits` | Cap/sample commits for huge repos (default: 300). |
146
+ | `--version` | Print the version. |
147
+
148
+ Examples:
149
+
150
+ ```bash
151
+ gitquest --path ../some-other-repo
152
+ gitquest --seed 42 --fast
153
+ gitquest --stats-only # instant career card, no fighting
154
+ ```
155
+
156
+ ---
157
+
158
+ ## 🧠 How it works
159
+
160
+ `gitquest` maps real repository data onto game mechanics:
161
+
162
+ | Git data | Becomes… |
163
+ | ------------------------------------- | ----------------------------------------------- |
164
+ | **Commit** | A room in the dungeon |
165
+ | **Lines added/removed** | Room size + monster difficulty |
166
+ | **Merge commit** | A mini-boss room |
167
+ | **Files changed** | Loot/items in the room |
168
+ | **Commit author** | An ally/NPC you meet |
169
+ | **Languages (by file extension)** | Your skill tree / XP categories |
170
+ | **Message keywords** | Enemy types (`fix` → Bug, `feat` → Feature…) |
171
+ | **Total repo stats** | Your final rank (e.g. *Senior Crusader*) |
172
+
173
+ ### Determinism
174
+
175
+ The dungeon seed is derived from the SHA of the repository's **first commit**
176
+ (unless you pass `--seed`). All procedural generation — monster names, stats,
177
+ loot rolls, room sizes — flows from that single seed via a `random.Random`
178
+ instance with a fixed call order. The result: identical, reproducible dungeons
179
+ that you and a teammate can compare.
180
+
181
+ ### Architecture
182
+
183
+ ```
184
+ gitquest/
185
+ cli.py # entry point + argument parsing (argparse)
186
+ git_parser.py # extract & normalize commit data (GitPython + git CLI fallback)
187
+ generator.py # commit data -> dungeon/rooms/monsters (seeded)
188
+ engine.py # game loop, state, turn handling
189
+ combat.py # combat math (pure, rng-driven, testable)
190
+ entities.py # Player, Monster, Room, Item, Dungeon dataclasses
191
+ renderer.py # all rich-based rendering
192
+ flexcard.py # final shareable stats card + ranking
193
+ data/ # monster/item name lists, ranks, ascii art
194
+ tests/ # pytest: parser, generator determinism, combat
195
+ ```
196
+
197
+ Everything runs **locally and offline** — no network calls, ever.
198
+
199
+ ---
200
+
201
+ ## 🛠️ Development
202
+
203
+ ```bash
204
+ pip install -e ".[dev]"
205
+ pytest
206
+ ```
207
+
208
+ Tests cover history parsing, generator **determinism**, and combat logic.
209
+
210
+ ### Edge cases handled
211
+
212
+ - Not a git repository → friendly error, no traceback.
213
+ - Empty history / no commits → friendly nudge to commit first.
214
+ - Huge repos → evenly down-sampled to `--max-commits` (still deterministic).
215
+ - Missing `GitPython` → automatic fallback to the `git` CLI.
216
+
217
+ ---
218
+
219
+ ## 🤝 Contributing
220
+
221
+ Issues and PRs welcome! Ideas: more monster archetypes, a `textual` dungeon map,
222
+ achievements, or exporting the flex card as an image.
223
+
224
+ ## 📄 License
225
+
226
+ MIT — see [`LICENSE`](LICENSE).
@@ -0,0 +1,19 @@
1
+ gitquest/__init__.py,sha256=clMG0kbamTTDQLF9hGq_8_aQSgHSW4GDHIEggyBNCYw,315
2
+ gitquest/__main__.py,sha256=eeuN0_VUK6MlzGZunY9HbQhSTY6GZC5HyjVsTZUYFS4,140
3
+ gitquest/cli.py,sha256=--jPAjy5g1tFT357FvPEDTSZ7lzc97oFkAfRAQqtk44,4788
4
+ gitquest/combat.py,sha256=_hkkSGN43AfFKi3obCySGSppKMQpTbU-AwyOAuPvGTg,2853
5
+ gitquest/engine.py,sha256=3ZFo--16Bta8EwWTDg5NKhLDRkJH5ocnOZu2wUgRtkQ,8270
6
+ gitquest/entities.py,sha256=_YYsdE1iSgFjXqSSvCRmDxQxTN58pgZ4Z6qvNmF-csQ,4643
7
+ gitquest/flexcard.py,sha256=ABBoacmtpZiFHjbPQDgskOlmFnwFPDXiYLvQgzQWLxE,5258
8
+ gitquest/generator.py,sha256=ZfpUi9ukM_EKU2bhBHp0lW2cFrcSUQS6TMUrhIAv41A,9202
9
+ gitquest/git_parser.py,sha256=TmCxHdC-kaWk18I_rm2jhSr6jc1SkDXG-zKWFnWtrUY,12836
10
+ gitquest/renderer.py,sha256=XGaO9TvT-rSTutUIA39cc8a_TyMGtbsMofXStFKHQSo,9559
11
+ gitquest/data/items.json,sha256=_zZB9Tyz0uy3RZwV5_4oGbu2-eTS10gFinyZHfKOERk,744
12
+ gitquest/data/monsters.json,sha256=UbTIgrzQwSqG0CABloTuyWwagmpaDqLmD5bk7FQsBbE,2444
13
+ gitquest/data/ranks.json,sha256=2WBDWUEaaQeFVFfcWzqz24ubXHDikNGSqnrJQ7SiJes,604
14
+ gitquest-0.1.0.dist-info/licenses/LICENSE,sha256=Dg1zSXslpweSLcPvAFqroM40X88VA64LdECOKEM21ws,1078
15
+ gitquest-0.1.0.dist-info/METADATA,sha256=abkgrngDClfZPlLi60ezfG4ILdKezo0lxuGxuSIjKJA,9584
16
+ gitquest-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
17
+ gitquest-0.1.0.dist-info/entry_points.txt,sha256=yjI6sHhzldT128rINKPDQumwT-9S1ldEA8-rqsDa6ME,47
18
+ gitquest-0.1.0.dist-info/top_level.txt,sha256=8WoSRcRgSm7BcqdduX1xpMPI8kRoJxcqlj65ElCTCUI,9
19
+ gitquest-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ gitquest = gitquest.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 gitquest contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ gitquest