Today, I decided to try something different: building a game with the Amazon Q CLI. Although I’d already experimented with Amazon Q, this was my first time using its new CLI interface. I chose Pong since its simple paddle-and-ball mechanics would let me focus entirely on mastering the CLI workflow!
First, I wrote a quick prompt to generate some baseline code, and was pleasantly surprised at how quick it was! Within seconds, it had given me a full Python file with the full code for it.
Wondering if it would also be able to help me create a virtual environment to run the app, I decided to ask it to help me with it. It correctly identified that I was running macOS, and gave me the specific commands to do all that was required!
After running the commands given to me by the Amazon Q CLI, the game was working! Well, almost! There were some physics issues with the ball when it interacted with the paddle, but Amazon Q promptly fixed it.
Lastly, I wanted to make some final changes to it, so i wrote my last prompt.
looks great! can you make the game start only when i click the space bar at the start? also, add a delay or animation when a user scores a point
Amazon Q quickly made those changes, giving me a full breakdown of what was changed!
With that I was done! Surprisingly, the game felt surprisingly polished for how little effort was required to code it, even the animations were smooth!
With that, the Amazon Q CLI made getting a project up and running surprisingly simple. From the moment you open your terminal, it detected my OS and suggested all the right commands to set up a virtual environment, install dependencies, and scaffold my code. I merely started with a basic prompt and within seconds I have a working file to tweak.
In addition, the CLI autocomplete features really sped up my development, even for Git commands that I had forgotten. The CLI interface may seem strange at first, but is also something you'd quickly fall in love with!