You're at an AWS meetup, looking for the perfect icebreaker. You rack your brain for a fun trivia question, but nothing comes to mind. I’ve been there too! So, I thought, why not create an AWS trivia game?
But then came the challenge of building it. That’s when I remembered Amazon Q—AWS’s AI-powered assistant. Instead of starting from scratch, I leveraged Amazon Q for CLI, interacting with it right from my terminal to generate Python code and bring my AWS trivia game to life.
Let me show you how I did it!
Supported Command Line Environments for autocomplete
Amazon Q's autocomplete command line feature is supported on macOS and specific Linux environments, including AppImage and Ubuntu.
The following environments are supported for both macOS and Linux:
Shells: bash, zsh, fish
CLIs: Over 500 of the most popular CLIs such as git, aws, docker, npm, and yarn
Installation
Since Amazon Q-CLI doesn’t yet have a native Windows version, I needed a workaround to run it on my device. The solution? Windows Subsystem for Linux (WSL).
This setup allowed me to seamlessly interact with Amazon Q right from my terminal.
Note that you will need to log into Amazon Qusing your AWS Builder IDto allow permissions to Amazon Q for command line. You login with this command q login
Let's Build our AWS Trivia App
So i initiated a chat with Amazon Q. I prompted it to create for me an AWS Trivia app.
And just like that, Q CLI whipped up an AWS Trivia game to save me from those awkward meetup icebreakers
But it didn’t stop there! It also walked me through the installation process and how to run the app successfully
Then… BOOM! It worked on the first try—no debugging, no errors, just pure Amazon Q magic. ✨.
I started the game and chose 5 questions and all categories to flex my muscle memory.
Feeling confident, I set the difficulty to medium—you know, just to flex. 💪
Here is how i performed.
(P.S.: I totally failed some questions on purpose... or did I?) 😏
Here is the Full Python Code for the Trivia app.
Conclusion
Building with Amazon Q-CLI was an absolute blast! . It’s truly a game-changer—fast, intuitive, and super helpful.
If I had one tiny piece of feedback, it would be this: Q-CLI should prompt you to log in first when initializing. But hey, that’s a small price to pay for such a cool tool!
And for my fellow Windows users—don’t worry! I’m pretty sure Q-CLI will have a native Windows version soon. 🤞