DEV Community

Ricardo Sueiras for AWS

Posted on

3 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.

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

If this article connected with you, consider tapping ❤️ or leaving a brief comment to share your thoughts!

Okay