Build a Mario-style platformer game while learning how to use Gemini CLI - Google's AI-powered command-line coding assistant.
You'll start with a partially working game (jumping works, but you can't move left or right!) and use Gemini CLI to add features through guided exercises.
A browser-based 2D platformer with:
- Player movement and physics
- Collectible coins with animations
- Score display
- Patrolling enemies
- Game over and win conditions
| Concept | Exercise |
|---|---|
| Installing and authenticating Gemini CLI | Exercise 00 |
Creating GEMINI.md context files |
Exercise 01 |
| Natural language prompting & file editing | Exercise 02 |
| Multi-step prompting & iteration | Exercise 03 |
| Complex feature development | Exercise 04 |
- Google Account (for Gemini CLI authentication)
- Node.js 20+ (download)
- A modern browser (Chrome, Firefox, Edge)
- A terminal (Terminal.app, iTerm2, Windows Terminal, etc.)
npm install -g @anthropic-ai/gemini-cligit clone <repo-url>
cd gemini-cli-tesOpen index.html in your browser. You should see a character that can jump but can't move left or right.
| # | Exercise | Time | What You'll Learn |
|---|---|---|---|
| 00 | Setup Gemini CLI | 5 min | Install, authenticate, first prompt |
| 01 | Create GEMINI.md | 5 min | Context files, project memory |
| 02 | Add Movement | 7 min | Prompting, file editing, iteration |
| 03 | Add Coins & Score | 7 min | Multi-step prompts, refinement |
| 04 | Add Enemy | 7 min | Complex features, full dev cycle |
Total time: ~30 minutes
| Command | Description |
|---|---|
gemini |
Start interactive session in current directory |
gemini -p "prompt" |
One-shot prompt (non-interactive) |
/memory show |
Show active GEMINI.md context |
/tools |
List available tools |
/compress |
Compress conversation to save context |
/stats |
Show token usage statistics |
Ctrl+C |
Cancel current generation |
exit or Ctrl+D |
Exit Gemini CLI |
Make sure Node.js 20+ is installed and run:
npm install -g @anthropic-ai/gemini-cliRun gemini and follow the OAuth prompts. Make sure you're signed into your Google account in the browser.
- Make sure you're opening
index.htmldirectly in the browser (File > Open) - Check the browser console (F12) for errors
Make sure you're running gemini from the project root directory (gemini-cli-tes/).
If you get stuck, reference solutions are available in the solutions/ directory. Try to use Gemini CLI first though - that's the whole point!