Sign up for your FREE personalized newsletter featuring insights, trends, and news for America's Active Baby Boomers

Newsletter
New

Getting Started With Amazon Q Developer Cli By Building A Game

Card image cap

Introduction

AWS, short for Amazon Web Services, offers over 200 powerful cloud services. And among them, Amazon Q stands out as one of the best tools they’ve introduced recently. Why? Because it’s not just another AI, it’s your superpowered generative AI coding assistant that actually understands how developers work.

But wait, what exactly is Amazon Q Developer? And what’s the deal with the CLI?

Well, Amazon Q comes in two main flavors:

  1. Amazon Q Business – A secure generative AI assistant built for organizations, helping teams access and analyze internal data across departments.

  2. Amazon Q Developer – A highly capable generative AI assistant built specifically for developers, with advanced capabilities for writing code, managing data, integrating AI/ML workflows, and more.

Now here’s where it gets really interesting: Amazon Q Developer CLI brings all that AI power directly into your terminal. It’s a GenAI powered command line interface that helps you generate code, debug issues, create project templates, and manage your applications faster, all without leaving your terminal.

And trust me, by the end of this blog, there’s a good chance it’ll become one of your favorite AWS tools too.

Let’s dive in and get started by setting up the Amazon Q Developer CLI on your environment.

Setting up the Environment

When it comes to installing the Amazon Q CLI, the steps vary depending on your operating system Windows, Linux, or macOS. But don’t worry, the official documentation has everything you need.

Since I’m using Windows, I’ll walk you through the setup process using WSL (Windows Subsystem for Linux), as Amazon Q CLI currently doesn't have a direct Windows installation method.

First, make sure you have WSL installed and ready. If not, follow this WSL setup guide from Microsoft.

Once WSL is up and running, follow these steps to install Amazon Q CLI on your system:

Quick Setup Guide for Amazon Q CLI on Windows (Using WSL)

  • Open your terminal and run: (This launches Ubuntu inside your WSL. If it’s your first time, it’ll install the Ubuntu instance and ask you to create a user account with a username and password.)
    wsl -d Ubuntu

  • Go to your home directory:
    cd

  • Install the unzip tool:
    sudo apt install unzip

  • Download the latest Amazon Q CLI zip:
    curl --proto '=https' --tlsv1.2 -sSf https://desktop-release.codewhisperer.us-east-1.amazonaws.com/latest/q-x86_64-linux-musl.zip -o q.zip

  • Unzip the installer:
    unzip q.zip

  • Make the installer executable:
    cd q
    chmod +x install.sh

  • Run the installer:
    ./install.sh

You’ll be asked if you want to modify your shell configuration. Choose YES, this adds the path to the Amazon Q CLI binaries.

  • After installation, refresh your shell with:
    bash

  • Now you’re ready to log in:
    q login

You’ll be presented with two login options. Use the arrow keys to select “Use for Free with Builder ID.”

It will give you a URL, copy it and open it in a browser, and either log in with an existing AWS Builder ID or create a new one.

Once you've completed the login process, you’ll be successfully authenticated with Amazon Q Developer.
To ensure your setup is functioning correctly, simply run the q doctor command.

From now on, you can start interacting with it directly from your WSL terminal using the command:
q chat

This will launch the interactive AI assistant experience right in your CLI. Ready to help you write code, solve bugs, and much more.

Congratulations! You’re all set and ready to start building with Amazon Q Developer CLI.

Build a Game

Well, now let's explore what Amazon Q Developer CLI can really do for us. I wanted to test its limits and see how much coding power it actually packs. So I decided to build a simple 2D Platformer Game using Python and the Pygame engine, just by giving it a single prompt.

And guess what? It did not disappoint.

Here’s the actual prompt I used:

Create a clean, well-structured 2D platformer game using Python and Pygame. Include a player with gravity, jumping, and platform collision. Add coins for score, enemies that reduce lives, and show score/lives on screen. Use colorful graphics with simple sprites, smooth movement, and a full gameplay loop (start, game over, restart). Keep the visuals appealing and gameplay smooth.

And it did all of this in seconds. Honestly, it felt like having an experienced game dev sitting next to me, typing out the whole thing.

Here’s a peek at what the experience looks like after running the prompt:

Amazon Q took that and instantly started scaffolding the project. It responded as:

Now I've completed the 2D platformer game with all the requested features! Let me explain what I've 
added: 
 
1. Player Character: 
   • Blue rectangle with gravity physics 
   • Jumping ability (press Space or Up arrow) 
   • Left/right movement (arrow keys) 
   • Platform collision detection 
 
2. Platforms: 
   • Brown platforms at various heights 
   • Proper collision detection (top, sides) 
 
3. Collectibles: 
   • Gold coins that add 10 points to your score when collected 
 
4. Enemies: 
   • Red squares that move back and forth on platforms 
   • Contact with enemies reduces player lives 
   • Player respawns after enemy hit 
 
5. Game States: 
   • Menu screen (press Enter to start) 
   • Playing state 
   • Game Over screen (press Enter to restart) 
 
6. UI Elements: 
   • Score display 
   • Lives counter 
   • Game state messages 
 
7. Game Loop: 
   • Smooth movement with frame rate control 
   • Complete gameplay cycle (start → play → game over → restart) 
 
To play the game: 
1. Run the Python script 
2. Press Enter to start 
3. Use arrow keys to move left/right 
4. Press Space or Up arrow to jump 
5. Collect coins while avoiding enemies 
6. Try to get the highest score! 
 
The game uses simple colored rectangles for visuals but has all the core mechanics of a 2D 
platformer. You can easily extend this by adding more levels, power-ups, or replacing the simple 
shapes with sprite images for better visuals. 
 
Would you like me to explain any specific part of the code in more detail? 
 

Then all I had to do was:
pip install pygame
python3 /home/rash/platformer_game_mvp.py

And YES! My game was up and running ;)

You can check out this full code and try it yourself from the GitHub Repository.

Anyway, this was just an MVP version of the game. While everything might look simple, it actually works! And the coolest part? I had zero experience with game development, yet I managed to build a fully functional platformer with the help of Amazon Q Developer CLI.

The beauty of this tool is that you can keep improving your project just by describing what you want. Add new features, polish the visuals, or completely transform the game, it's all possible.

So that’s a wrap! This is what Amazon Q CLI can do, and I hope you now have a solid idea of how powerful and beginner friendly it really is. Definitely give it a try and maybe even challenge yourself to build a better game than I did :)


Recent