terminal-escape-room — a tiny CLI escape room game (Python + Typer)
Source: Dev.to
Overview
This is a submission for the GitHub Copilot CLI Challenge.
terminal-escape-room is a cross‑platform CLI text escape‑room game. You progress through rooms defined in JSON, can request up to two hints per room, submit answers, earn points (with hint penalties), and your progress is persisted locally to a .escape_state.json save file.
Tech Stack
- Python 3.11+
- Typer – CLI framework
- Rich – formatted output
- Pytest – test suite
Repository
https://github.com/aisamposhen/terminal-escape-room
Installation & Quick Run
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[test]
# Commands
escape start
escape status
escape hint
escape answer "kernel"
escape reset
90‑Second Demo Outline
escape start
escape status
escape hint
escape answer "kernel"
escape answer "^"
escape answer "git switch -c feature"
Development Process
I used GitHub Copilot CLI as a terminal‑first pair programmer to iterate quickly on:
- Typer command structure (
start,status,hint,answer,reset) - A small engine layer (room progression + hint limits)
- A stable JSON persistence schema (
started_at,finished_at) - Scoring rules and tests
What worked well:
Keeping prompts very specific (inputs/outputs, edge cases, and file boundaries), then immediately locking changes in with pytest.
Example workflow:
- Ask Copilot CLI for a first‑pass implementation (focused on one module at a time).
- Run tests.
- Ask Copilot CLI to generate/adjust tests to cover an edge case.
- Refactor once the behavior is pinned.
Local Usage
The project is self‑contained and requires no external services. Simply follow the installation steps above to try it locally.