What if your GitHub repository could become the map of a roguelike dungeon? That’s exactly what one developer accomplished using GitHub Copilot CLI to merge terminal gaming with version control. The result—a terminal-based roguelike where your code structure shapes the dungeon layout—demonstrates how AI-powered development tools can bridge creative and technical workflows in unexpected ways.
The project, aptly named GitHub Dungeons, turns every commit into a potential dungeon reshuffle. Rooms, corridors, and even enemies are algorithmically generated from your repository’s file structure, with each run producing a fresh layout. Fail to escape? You restart from scratch—a core mechanic of roguelikes. The entire experience runs in the terminal, using only keyboard navigation and ASCII rendering.
From prompt to dungeon: How AI shaped a terminal game
The journey began with a simple question: Could GitHub Copilot CLI help build a game from scratch? Developer Lee Reilly issued a prompt to build a Go-based CLI extension that converts a repository into a playable roguelike dungeon, complete with procedural generation. Then, with a /yolo command—an alias for allowing all Copilot actions—he set the process in motion.
What followed was a blend of rapid prototyping and AI delegation. Instead of writing every line of code, Reilly described gameplay behaviors in plain English and used /delegate to offload implementation to Copilot’s cloud-based agent. This allowed him to focus on game design rather than syntax or boilerplate.
For example, when tasked with making levels progressively harder, Reilly wrote: /delegate Make each level progressively harder e.g. on level 2 there are extra baddies, but more health potions. Copilot generated a functional first draft, opened a pull request, and Reilly refined the balance before merging. The same approach was used to add cheat codes, documentation, and even ASCII art diagrams explaining dungeon generation.
Using Copilot, especially with /delegate, is like having an army of NPCs at my disposal. I could focus on player experience instead of wrestling with implementation details.>
— Lee Reilly, Creator of GitHub Dungeons
Procedural dungeons: How code becomes a playable world
At the core of GitHub Dungeons lies Binary Space Partitioning (BSP), a level-generation algorithm that recursively splits a space into smaller rectangular sections until it forms a network of rooms and corridors. The dungeon’s layout is seeded by your repository’s latest commit hash, ensuring consistency: the same codebase always produces the same map. But as you commit changes, the layout evolves.
This approach delivers several key benefits:
- Reproducibility: Each commit generates a predictable, yet unique, dungeon structure.
- Differentiation: Different repositories produce structurally distinct layouts, reflecting their codebase’s complexity.
- Dynamic evolution: Code changes alter the dungeon’s layout, rooms, and even enemy placement.
BSP isn’t just efficient—it’s a perfect fit for roguelikes. Unlike handcrafted levels, procedurally generated dungeons offer near-infinite replayability. Every run feels fresh, but the underlying rules guarantee coherence. As your codebase grows or shrinks, so does your dungeon: new files spawn rooms, deletions collapse corridors, and refactoring reshuffles the map.
Why terminal-based roguelikes feel modern
Roguelikes trace their origins to 1980s text-based dungeon crawlers like Rogue, where permadeath and procedural generation defined the genre. While graphics evolved, the genre retained its minimalist aesthetic and replayability.
GitHub Dungeons revives that spirit in the terminal, where input is limited to arrow keys and output relies on ASCII characters. This constraint isn’t a limitation—it’s a feature. Terminal interfaces demand clarity and immediacy, mirroring the fast-paced decision-making of roguelike gameplay.
Moreover, the project highlights how AI tools can enhance creativity by handling repetitive tasks. By automating boilerplate and scaffolding, developers can focus on innovation, whether that’s tweaking game mechanics or embedding Easter eggs for players to discover.
The future of AI-assisted game development
GitHub Dungeons isn’t just a fun experiment—it’s a glimpse into how AI can democratize game creation. With tools like Copilot CLI, developers no longer need deep expertise in a specific language or framework to prototype ideas. A well-crafted prompt can spawn entire systems, from enemy AI to level design.
As AI agents grow more capable, expect to see more projects that merge technical workflows with creative outputs. From generating documentation to crafting in-game assets, the line between coder and designer blurs. And in the case of GitHub Dungeons, your next commit might just unlock a secret level in your personal dungeon.
For now, the game remains a testament to the power of AI-assisted development—and a reminder that even the most unexpected prompts can lead to playable worlds.
AI summary
GitHub Copilot CLI kullanarak kendi kod deposunu terminalde oynanabilir bir roguelike zindanına dönüştürmek mümkün. BSP algoritması ve Go diliyle nasıl yapıldığını keşfedin.