DEV Community

Cover image for Why I Built a Web UI for Amazon Q Developer CLI (And How I Vibe-Coded It)
Gabriel Koo for AWS Community Builders

Posted on • Edited on

Why I Built a Web UI for Amazon Q Developer CLI (And How I Vibe-Coded It)

๐Ÿš€ Beyond the Console: Why I Built a Web UI for the Amazon Q Developer CLI

Amazon Q is a game-changer for developers, but if you've only used it inside the AWS Console, you're only seeing part of the picture. Using Q in the Console is great for general AWS questions, but when it comes to interacting with your own code and environment, it hits fundamental limits.

My project started not from a corporate need, but from a personal one familiar to many developers: the homelab. I wanted a way to make quick fixes on my server from anywhere, but was constantly frustrated by the clunky experience of mobile terminals. This is the story of why I built the Amazon Q Developer CLI WebUI.

๐Ÿ“ฑ The Real Problem: The Mobile Terminal Nightmare

Picture this: you're on the couch with your phone and have an idea for a quick change on your homelab server. You log in through a mobile web terminal and immediately hit a wall. Have you ever tried to paste a multiline command into one? Or send a Ctrl+C to stop a runaway process? It's a nightmare of awkward UIs, missed keystrokes, and immense frustration.

๐Ÿงฑ Example 1: The Multi-Line docker run Command

A common task in a homelab is running a new Docker container with specific ports and volumes:

docker run -d --name=my-app \
  -p 8080:80 \
  -v $(pwd)/data:/app/data \
  nginx
Enter fullscreen mode Exit fullscreen mode

Mobile Frustrations:

  • Line Breaks: Typing a backslash (\) then hitting Enter is clumsy and error-prone on mobile keyboards.
  • Special Characters: Juggling -, :, =, and $ requires constant switching between keyboard symbol layouts.
  • Editing: Fixing a typo in the middle of this command on a touchscreen is incredibly difficult.

๐Ÿ” Example 2: The Piped find and grep Command

You need to search for a specific configuration line within all .conf files:

find . -name "*.conf" | xargs grep "listen_port"
Enter fullscreen mode Exit fullscreen mode

Mobile Frustrations:

  • Keyboard Gymnastics: This short command is packed with hard-to-access symbols on mobile keyboards: ., *, ", and especially |.
  • The Pipe (|): Often deeply hidden, requiring multiple taps to find and type.
  • No Ctrl Key: If a command hangs, the lack of an easy Ctrl+C makes stopping it a nightmare.

This frustration becomes a major barrier when using powerful tools like the Amazon Q Developer CLI. The CLI is the perfect assistant for the jobโ€”but it's shackled to a terminal that mobile browsers just can't handle.

๐Ÿคฏ Other Reasons for Build This Project

  • You cannot install the great Amazon Q Developer CLI on Windows ๐ŸชŸ unless you setup Windows Subsystem for Linux (WSL).
  • For other AI Agent alternatives, they usually belong to one of the cases below:
    • Pure server side AI Agents - like Gemini/ChatGPT, they have access to tools/canvas and even run code for you - but they are not connected to your computer/servers
    • CLI AI Agents - like Codex CLI, requires you to use in a Bring-Your-Own-Key way. You have to be very careful with your context length as you need to worry about token usage.

๐Ÿค– Q Developer CLI: An Agent with Better Tools

Think of the Amazon Q Developer CLI as a specialized AI agent with more powerful "tools" than the AWS Console version. Its biggest advantage? File system access, giving it the context it needs to be a true coding partner.

Also look at how I vibe coded a Star Wars inspired lightsaber duel game: Building A Plasma Sword Fighter Game with Amazon Q CLI

๐Ÿ” Access Comparison

Feature Q in AWS Console Amazon Q Developer CLI Amazon Q CLI via WebUI
Primary Use Case General AWS service Q&A Deep, contextual code development Contextual development on any device
Code Awareness โŒ No File System Access โœ… Full Project Context โœ… Full Project Context
Interaction Model GUI Chat Window Command-Line Interface Browser-Based Terminal
Accessibility Requires AWS login Requires desktop terminal Access from any browser
Mobile Usability โœ… Serviceable UI โŒ Very Difficult โœ… Designed for Web/Mobile

The table shows the gap: the most powerful version (CLI) is the least accessibleโ€”unless we bridge that gap.

๐Ÿ› ๏ธ The Solution: A Self-Hosted Web Interface for the Q CLI

Image description

Seeing it in action: https://github.com/user-attachments/assets/99053791-17c5-4f09-bddb-d5b9ecd61cc0

My vibe-coded solution: Amazon Q Developer CLI WebUIโ€”a bridge to the full CLI that runs in any modern browser. It wraps around the native q command, exposing its full feature set without needing a traditional terminal.

I started with telling Amazon Q Developer CLI "I want to re-create the Amazon Q Developer CLI experience in a web UI". Q came up with the plan and the initial tech stack, I iterated a few rounds with testings - in less than an hour, my final solution came:

Tech Stack:

  • Backend: Node.js, Express
  • Real-Time Communication: socket.io
  • Terminal Emulation: node-pty for spawning a real pty

The result? A fluid, interactive CLI experience from a browserโ€”even on mobile.

๐Ÿš€ Getting Started

Make sure you have Amazon Q Developer CLI installed.

git clone --depth 1 https://github.com/gabrielkoo/amazon-q-developer-cli-webui
cd amazon-q-developer-cli-webui
npm install
q login && npm start  # โ€”-host 0.0.0.0
#
# > [email protected] start
# > node server.js
#
# Server running on http://localhost:3000
Enter fullscreen mode Exit fullscreen mode

๐ŸŒ Making Web UI Available On Your Mobile

Use any of the typical homelab methods to expose localhost:3000 online:

  • ๐ŸŒ TailScale
  • โ˜๏ธ CloudFlare Tunnel
  • ๐Ÿšช Ngrok
  • ๐Ÿ” Open port 3000 + IP Whitelisting

The first two options are preferred if you care very much about security.

๐Ÿ“ฒ Unlocking a Truly Mobile Workflow

Letโ€™s revisit the homelab scenario. Youโ€™re reviewing a Python script that needs a fix.

  • Before: Youโ€™d struggle with a mobile SSH app, fighting to type commands.
  • After: You just open a browser tab to your WebUI. Type: "Review fix_script.py, identify bugs, and suggest improvements." Copy, paste, and interactโ€”touch-friendly and frustration-free.

Image description

Image description

Image description

Live demo: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2z9oxc4bm8waeor2nriy.gif

โœจ More Than a Wrapper: An Enhanced User Experience

I focused on authenticity and comfort, solving the mobile pain points:

  • ๐Ÿ“ Proper Input: A real multiline <textarea> makes command editing natural.
  • ๐Ÿ’ฌ Streaming Token Display: Outputs appear with a "typing" effect, just like the CLI.
  • ๐ŸŽจ Full ANSI Support: Colors, bolding, and formatting are preserved for readability.
  • ๐Ÿค– Let Q Work for You: Donโ€™t sweat every keystrokeโ€”Amazon Q can fix and run code for you.

This project was born from a simple need: use my favorite tools anywhere. Itโ€™s about unlocking the full power of Amazon Q, even far from a real keyboard.

๐Ÿ”— Check it out here: https://github.com/gabrielkoo/amazon-q-developer-cli-webui

Top comments (4)

Collapse
 
094459 profile image
Ricardo Sueiras

Love this! I am going to try deploying this myself this week and will report back.

Collapse
 
gabrielkoo profile image
Gabriel Koo

Thanks for featuring my article in your newsletter @094459 !

Collapse
 
094459 profile image
Ricardo Sueiras

Your welcome! Thanks for creating this amazing project ๐Ÿ‘

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

This is extremely impressive and honestly feels like something Iโ€™ve needed forever. Love seeing how you just straight-up fixed your own workflow headaches

OSZAR »