DEV Community

Ricardo Sueiras for AWS

Posted on

2 1 1

Using Amazon Q Developer CLI to build applications from the command line

I have been writing a lot recently about AI Coding Assistants, and I have been mostly using Amazon Q Developer within VSCode. This week though, saw a very nice update to the Amazon Q Developer CLI, a separate download that provides you with Amazon Q within your command line. It is available for MacOS and various flavours of Linux (you can download it from here.

I wanted to see how good the recent update is, so I decided to try and build a quick web application from the command line. I created a new directory on my mac, and then I added two files:

  • fact-checker.yaml - a data model for a simple fact checking application
  • spec.md - a scaffold document that outlines how I like to structure my projects

When I look at the structure of my directory, it looks like this:

├── data-model
│   └── fact-checker.yaml
└── spec
    └── SPEC.md
Enter fullscreen mode Exit fullscreen mode

From the command line, I now type:

q chat
Enter fullscreen mode Exit fullscreen mode

And I enter the following prompt:

> Build a simple fact checking app
Enter fullscreen mode Exit fullscreen mode

You can see what happens in this short video - I sped up some parts (x2) to make the video shorter.

It took around 12 minutes to complete, and I was super impressed. After it generated the code you can see I ask it to create a virtual Python environment, install the dependencies, and then run the application. After an initial error, Amazon Q Developer CLI figures out what it needs to do and I have my app up and running.

For the eagle eyed out there, you will notice that when I create a new fact, there is an issue with the formatting of the buttons. So I decided to go back and get Amazon Q Developer CLI to see if it could fix it.

In less than five minutes I had a much improved UI.

Whilst I will still be using Amazon Q Developer in the IDE, this improved capability within the command line is going to be exciting to explore. Watch this space for more blog posts coming.

Try Amazon Q Developer today, and claim your free Builder ID

You can try Amazon Q Developer CLI for free today, by signing up for a Builder ID and then downloading the app from here.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay