AWS Logo
Menu
Amazon Q CLI help me get better at chess!

Amazon Q CLI help me get better at chess!

I used Amazon Q for command line (CLI) to generate Python code to build a Chess Tutor application.

Veliswa Boya
Amazon Employee
Published Mar 29, 2025
Last Modified Apr 3, 2025
My son has been trying without much success to teach me how to play chess. I'm completely hopeless, I think I don't have the patience for it :).
I want to get better so I used Amazon Q for command line (CLI) to generate Python code by interacting with Amazon Q from within my terminal to build a Chess Tutor. The tutor explains all the rules to me as I go along.
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.
Installing Amazon Q for command line
I'm on Windows and Amazon Q CLI doesn't have a native Windows version, so I could use Amazon Q CLI on Windows through the Windows Subsystem for Linux (WSL).
First I installed WSL by following the Microsoft WSL installation guide and in my case, I opted for the Ubuntu distribution.
Next I installed Amazon Q for command line in WSL following the steps in the Amazon Q Developer User Guide.
I then initiated a conversation with Amazon Q using the q chat command in my terminal then entered my prompt.
Note that you will need to log into Amazon Q using your AWS Builder ID to allow permissions to Amazon Q for command line.
Initiate a conversation with Amazon Q in the command line
Initiate a conversation with Amazon Q in the command line
Q CLI created a chess tutor application in Python that helps me learn chess by playing against the computer.
Details of the generated chess tutor application
Details of the generated chess tutor application
Q CLI guided me regarding all libraries to install before running the tutor application successfully.
Install required libraries for the tutor application
Install required libraries for the tutor application
I encountered some errors once I started running the chess tutor application, and I used Q CLI for troubleshooting.
Troubleshoot with Q CLI
Troubleshoot with Q CLI
Here's the complete Python code, this is the code generated by Q CLI including the snippets that I inserted guided by Q. I enjoyed the fact that I could still be part of the loop by fixing the errors myself, although Q CLI was happy to provide me the complete updated file had I not been comfortable with making the fixes myself.
Here's the Chess Tutor application that I enjoyed playing at the end of the process. I want to use this to practice so that I can surprise my son the next time we play.
Chess Tutor application
Chess Tutor application
Your move!
I'd love to hear what you build. I provide references below for you to get started with Q CLI and bring your own ideas to life.
References

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.

2 Comments