<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rashindu Tharinda</title>
    <description>The latest articles on DEV Community by Rashindu Tharinda (@rash522).</description>
    <link>https://dev.to/rash522</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1243498%2F8f6d3924-c188-464f-b323-6ba8acc9ed61.jpeg</url>
      <title>DEV Community: Rashindu Tharinda</title>
      <link>https://dev.to/rash522</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rash522"/>
    <language>en</language>
    <item>
      <title>Getting Started with Amazon Q Developer CLI by Building a Game</title>
      <dc:creator>Rashindu Tharinda</dc:creator>
      <pubDate>Sat, 24 May 2025 20:42:15 +0000</pubDate>
      <link>https://dev.to/rash522/getting-started-with-amazon-q-developer-cli-by-building-a-game-1c8</link>
      <guid>https://dev.to/rash522/getting-started-with-amazon-q-developer-cli-by-building-a-game-1c8</guid>
      <description>&lt;h2&gt;
  
  
  &lt;u&gt;Introduction&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AWS&lt;/strong&gt;, short for &lt;strong&gt;A&lt;/strong&gt;mazon &lt;strong&gt;W&lt;/strong&gt;eb &lt;strong&gt;S&lt;/strong&gt;ervices, offers over 200 powerful cloud services. And among them, &lt;strong&gt;&lt;a href="https://aws.amazon.com/q/" rel="noopener noreferrer"&gt;Amazon Q&lt;/a&gt;&lt;/strong&gt; stands out as one of the &lt;em&gt;Best tool&lt;/em&gt; they’ve introduced recently. Why? Because it’s not just another AI, it’s your &lt;strong&gt;superpowered generative AI coding assistant&lt;/strong&gt; that actually understands how developers work.&lt;/p&gt;

&lt;p&gt;But wait, what exactly is &lt;strong&gt;Amazon Q Developer&lt;/strong&gt;? And what’s the deal with the &lt;strong&gt;CLI&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Well, &lt;strong&gt;Amazon Q&lt;/strong&gt; comes in two main flavors:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://aws.amazon.com/q/business/" rel="noopener noreferrer"&gt;Amazon Q Business&lt;/a&gt;&lt;/strong&gt; – A secure generative AI assistant built for organizations, helping teams access and analyze internal data across departments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://aws.amazon.com/q/developer/" rel="noopener noreferrer"&gt;Amazon Q Developer&lt;/a&gt;&lt;/strong&gt; – A highly capable generative AI assistant built specifically for developers, with advanced capabilities for writing code, managing data, integrating AI/ML workflows, and more.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now here’s where it gets really interesting, &lt;strong&gt;Amazon Q Developer CLI&lt;/strong&gt; brings all that AI power &lt;strong&gt;directly into your terminal&lt;/strong&gt;. It’s a &lt;strong&gt;GenAI Powered Command Line Interface&lt;/strong&gt; that helps you generate code, debug issues, create project templates, and manage your applications faster, all without leaving your terminal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Amazon Q CLI&lt;/em&gt; and &lt;em&gt;Amazon Q Developer CLI&lt;/em&gt; refer to the same tool, so don’t get confused&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And trust me, by the end of this blog, I’m pretty sure this will become your favorite AWS tool too.&lt;/p&gt;

&lt;p&gt;Let’s dive in and get started by setting up the Amazon Q Developer CLI on your environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;u&gt;Setting up the Environment&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;When it comes to installing the Amazon Q CLI, the steps may vary depending on your operating system &lt;strong&gt;Windows&lt;/strong&gt;, &lt;strong&gt;Linux&lt;/strong&gt;, or &lt;strong&gt;macOS&lt;/strong&gt;. But don’t worry,&lt;br&gt;
the &lt;a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html?b=cli&amp;amp;p=overview&amp;amp;s=tiles" rel="noopener noreferrer"&gt;Official Documentation&lt;/a&gt; has everything you need.&lt;/p&gt;

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

&lt;p&gt;First, make sure you have &lt;strong&gt;WSL&lt;/strong&gt; installed and ready. If not,&lt;br&gt;
follow this &lt;a href="https://learn.microsoft.com/en-us/windows/wsl/setup/environment?source=post_page-----9ec62fc6d67c" rel="noopener noreferrer"&gt;WSL setup guide from Microsoft&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once WSL is up and running, follow these steps to install Amazon Q CLI on your system:&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;u&gt;Quick Setup Guide for Amazon Q CLI on Windows (Using WSL)&lt;/u&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;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.)&lt;br&gt;
&lt;code&gt;wsl -d Ubuntu&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to your home directory:&lt;br&gt;
&lt;code&gt;cd&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install the unzip tool:&lt;br&gt;
&lt;code&gt;sudo apt install unzip&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download the latest Amazon Q CLI zip:&lt;br&gt;
&lt;code&gt;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&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unzip the installer:&lt;br&gt;
&lt;code&gt;unzip q.zip&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make the installer executable:&lt;br&gt;
&lt;code&gt;cd q&lt;/code&gt;&lt;br&gt;
&lt;code&gt;chmod +x install.sh&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the installer:&lt;br&gt;
&lt;code&gt;./install.sh&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’ll be asked if you want to modify your shell configuration. Choose &lt;strong&gt;&lt;em&gt;YES&lt;/em&gt;&lt;/strong&gt;, this adds the path to the Amazon Q CLI binaries.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After installation, refresh your shell with:&lt;br&gt;
&lt;code&gt;bash&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you’re ready to log in:&lt;br&gt;
&lt;code&gt;q login&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’ll be presented with two login options. Use the arrow keys to select &lt;em&gt;&lt;strong&gt;“Use for Free with Builder ID.”&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Once you've completed the login process, you’ll be successfully authenticated with Amazon Q Developer.&lt;br&gt;
To ensure your setup is functioning correctly, simply run the &lt;code&gt;q doctor&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxxp52l2ayzgyxwa4zp5j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxxp52l2ayzgyxwa4zp5j.png" alt="q doctor command" width="706" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From now on, you can start interacting with it directly from your WSL terminal using the command:&lt;br&gt;
&lt;code&gt;q chat&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will launch the interactive AI assistant experience right in your CLI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjumlx2ki3msiide6viu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjumlx2ki3msiide6viu.png" alt="q chat command" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Congratulations!&lt;/em&gt;&lt;/strong&gt; You’re all set and ready to start &lt;strong&gt;building with Amazon Q Developer CLI&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  &lt;u&gt;Build a Game&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;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 &lt;strong&gt;2D Platformer Game&lt;/strong&gt; using &lt;strong&gt;Python and the Pygame engine&lt;/strong&gt;, just by giving it a single prompt.&lt;/p&gt;

&lt;p&gt;And guess what? It did not disappoint.&lt;/p&gt;

&lt;p&gt;Here’s the actual prompt I used:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Here’s a peek at what the experience looks like after running the prompt:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpvzcylm72llgz6gh5kl9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpvzcylm72llgz6gh5kl9.png" alt="prompt" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon Q took that and instantly started scaffolding the project. It responded as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;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?

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then all I had to do was:&lt;br&gt;
&lt;code&gt;pip install pygame&lt;/code&gt; to install the pygame game engine and&lt;br&gt;
&lt;code&gt;python3 platformer_game.py&lt;/code&gt; to run the main python file.&lt;/p&gt;

&lt;p&gt;And YES! My game was up and running ;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7ma6wey8s6h3bf4uwb6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7ma6wey8s6h3bf4uwb6.png" alt="Game Start" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can check out this full code and try it yourself from this &lt;em&gt;&lt;a href="https://github.com/rash522/amazon-q-cli-game" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;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 &lt;strong&gt;Amazon Q Developer CLI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;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. &lt;em&gt;(I'll also update here my latest experiments as well)&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;So that’s a wrap! This is &lt;strong&gt;&lt;em&gt;Amazing&lt;/em&gt; Q CLI&lt;/strong&gt;!, 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 :)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I have updated my latest experimental prompts with the upgraded version of the game, so you can checkout them on my &lt;em&gt;&lt;strong&gt;&lt;a href="https://github.com/rash522/amazon-q-cli-game" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt; as I mentioned.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is me, &lt;strong&gt;&lt;u&gt;_Rash522 _&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
