I recently built a classic Snake game you can play right in your terminal โ and Iโm excited to share the journey with you!
What I Built
Snake is one of the simplest yet most addictive games ever made. My version runs entirely in the terminal using Pythonโs curses
library for handling input and screen rendering. The result? A smooth, retro-style gameplay experience with arrow-key controls, growing snake length, and a fun challenge to avoid crashing.
You can find the full source code here on GitHub:
๐ https://github.com/Amarnath-Rao/QCLI-Snake-Game
Why a Terminal Game?
While web and graphical games are popular, terminal games have their own charm โ theyโre lightweight, easy to run anywhere, and nostalgic for many developers. Plus, building one helps sharpen your skills in handling input/output, timers, and game logic without relying on heavy frameworks.
How I Built It โ Powered by Amazon Q CLI
I developed this game using Amazon Q CLI, an AI-powered assistant that helps with writing, debugging, and iterating code straight from the terminal. It made scaffolding the gameโs structure and handling tricky parts like collision detection much faster.
If you havenโt tried Amazon Q CLI, itโs definitely worth checking out to boost your productivity!
How to Run It Yourself
Clone the repo:
git clone https://github.com/Amarnath-Rao/QCLI-Snake-Game.git
cd QCLI-Snake-Game
Run the game:
python3 snake_game.py
Windows users:
Installwindows-curses
first:pip install windows-curses
Live Demo โ Play It Online!
Thanks to Gitpodโs cloud IDE, you can even play the game live in your browser, no setup required:
๐ https://amarnathrao-qclisnakega-pqoei3nva6v.ws-us120.gitpod.io
Screenshots
Gameplay:
Screencast from 2025-06-01 17-00-35.webm
Game from gitpod (note: this is terminal based game)
Code:
Join the Conversation
I shared a social media post about the game:
Twitter / X post
๐ โJust built a classic Snake game you can play right in your terminal! Check out the code and try the live version!โ
Whatโs Next?
Iโm planning to enhance the game with new features like levels, high score tracking, and maybe a more polished UI. If you want to contribute or suggest ideas, feel free to open an issue or PR on GitHub!
Thanks for reading! If you try out the game, let me know your high score. ๐๐ฎ
Top comments (0)