DEV Community

Cover image for 🎮 Exploring Amazon Q CLI Building a Simple Tic-Tac-Toe Game
Mohit Bisht
Mohit Bisht

Posted on

1 1 1 1 1

🎮 Exploring Amazon Q CLI Building a Simple Tic-Tac-Toe Game

Hello everyone!

I recently participated in the #AmazonQCLIGameChallenge, an exciting opportunity to build a game using the new Amazon Q CLI – an AI-powered coding assistant from AWS. As someone who's always learning and exploring new tools, I decided to tackle a classic: a simple Tic-Tac-Toe game using Q CLI and Python.

In this blog post, I'll walk you through my experience using Amazon Q CLI to build the game, share my key learnings, and show you how you can try it out for yourself!

đź§  What is Amazon Q CLI? Your AI-Powered Coding Partner

Amazon Q CLI is a groundbreaking AI-powered command-line tool from AWS. Imagine having a knowledgeable coding partner right in your terminal, available 24/7. That's exactly what Q CLI offers!

It empowers you to write, debug, and explore code simply by chatting with it.

You can ask Amazon Q CLI to:

  • Generate code snippets
  • Explain complex functions
  • Identify and fix bugs
  • Provide architectural insights

It’s like having ChatGPT, but seamlessly integrated into your terminal workflow.

👉 Learn more on the Official Amazon Q CLI Page

⚙️ My Setup: Getting Started with Amazon Q CLI

Here’s how I set up my environment to build the game:

1. Sign Up for an AWS Builder ID

This is your gateway to accessing AWS services and tools.
👉 Get Your AWS Builder ID Here

2. Install Amazon Q CLI

🔹 For Windows:

👉 Amazon Q CLI Installation Guide for Windows

🔹 For Linux (Ubuntu):

# Update your machine and install libfuse2
sudo apt-get update
sudo apt install libfuse2

# Download and install Amazon Q CLI
curl --proto '=https' --tlsv1.2 -sSf https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb -o amazon-q.deb
sudo apt install -y ./amazon-q.deb

# Login to Q CLI
q login
Enter fullscreen mode Exit fullscreen mode

3. Install Python

Since I was building a terminal-based game, Python was a great choice due to its simplicity and clean syntax.

4. Start Amazon Q CLI Chat

Once everything was installed, I opened my terminal and ran:

amazonq chat
Enter fullscreen mode Exit fullscreen mode

🎮 Building the Tic-Tac-Toe Game with Amazon Q CLI

With the chat session open, I asked:

"Create a Tic Tac Toe game in Python that allows two players to play turn by turn."

amazonq chat

To my surprise, Amazon Q CLI instantly gave me the full Python code. It also explained each part of the logic when I asked, making it easy to understand and customize.

Code

Within minutes, I had a working version of the game, ready to play in the terminal. This helped me understand:

  • How to manage turn-based logic
  • How to store and check game state
  • Simple Python tricks for cleaner CLI output

🖼️ Game Screenshots

Game

▶️ Demo Video

Want to see it in action?

🎥 Watch the YouTube Demo

đź’» Get the Code

Feel free to check out the code and try it yourself:

🔗 GitHub – Tic Tac Toe Game Using Amazon Q CLI

My Experience with Amazon Q CLI

Amazon Q CLI turned a simple game idea into an engaging learning experience. It wasn’t just about generating code — it was about understanding the logic and building confidence as a developer.

Whether you’re just getting started or you’re looking to speed up your development process, I highly recommend giving Amazon Q CLI a try. It's like having an intelligent teammate sitting right inside your terminal.

Thanks for reading! If you enjoyed this post, give it a like, drop a comment, or share it with a fellow dev! 🚀

DevCycle image

Ship Faster, Stay Flexible.

DevCycle is the first feature flag platform with OpenFeature built-in to every open source SDK, designed to help developers ship faster while avoiding vendor-lock in.

Start shipping

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

AWS Q Developer image

Build your favorite retro game with Amazon Q Developer CLI in the Challenge & win a T-shirt!

Feeling nostalgic? Build Games Challenge is your chance to recreate your favorite retro arcade style game using Amazon Q Developer’s agentic coding experience in the command line interface, Q Developer CLI.

Participate Now

đź‘‹ Kindness is contagious

Explore this compelling article, highly praised by the collaborative DEV Community. All developers, whether just starting out or already experienced, are invited to share insights and grow our collective expertise.

A quick “thank you” can lift someone’s spirits—drop your kudos in the comments!

On DEV, sharing experiences sparks innovation and strengthens our connections. If this post resonated with you, a brief note of appreciation goes a long way.

Get Started