A web-based interface for Amazon Q CLI that provides streaming token display, ASCII formatting preservation, and interactive textarea prompts for multiline input.
ScreenRecording_06-27-2025.00-20-35_1.mov
- Not everyone could install it - e.g. Windows is not supported / Installing WSL is a bit hard for some of us / Not allowed to install
- You are not always beside your main computer/server - you might want some Amazon Q CLI features in your e.g. mobile phone when needed
- Streaming Display: Tokens are displayed with a typing effect to simulate real-time streaming
- ASCII Formatting: Preserves all ANSI color codes and formatting from Q chat
- Interactive Prompts: Prompts starting with "> " are converted to textarea inputs for multiline support
- Real-time Communication: Uses WebSockets for real-time bidirectional communication
- Terminal-like Interface: Dark theme with monospace font for authentic terminal experience
- Q CLI Commands: Use Q CLI Chat commands like
/helpor/model
-
Install Amazon Q Developer CLI and and authenticate with your AWS Builder ID / IAM Identity Center.
-
Clone this repository
git clone --depth 1 https://github.com/gabrielkoo/amazon-q-developer-cli-webui
cd amazon-q-developer-cli-webui- Install dependencies:
npm install- Start the server:
npm start # --host 0.0.0.0 if you want to expose to your network- Open your browser and navigate to
http://localhost:3000
- Click "Start Q Chat" to initialize the Q chat session
- The terminal will display Q's responses with streaming animation
- When Q prompts for input (indicated by "> "), a textarea will appear
- Type your multiline response and press Ctrl+Enter or click "Send"
- Use "Stop Q Chat" to terminate the session
- Start Q Chat: Initializes a new Q chat session
- Stop Q Chat: Sends
/quitcommand to terminate the session - Clear Terminal: Clears the terminal display
- Send: Sends the input to Q chat (also Ctrl+Enter)
- Clear Input: Clears the current input textarea
- Express: Web server framework
- Socket.IO: Real-time WebSocket communication
- node-pty: Spawns and manages Q chat process with PTY support
- Vanilla JavaScript: No framework dependencies
- WebSocket: Real-time communication with server
- ANSI Processing: Converts ANSI escape codes to HTML/CSS
- Streaming Animation: Character-by-character display with typing cursor
├── server.js # Node.js server with Socket.IO
├── package.json # Dependencies and scripts
├── public/
│ ├── index.html # Main HTML interface
│ ├── style.css # Styling and ANSI color definitions
│ └── script.js # Frontend JavaScript logic
└── README.md # This file
For development with auto-restart:
npm run devA few options to make your Q Developer CLI Web UI available when you are not running it directly from your primary computer/server:
- CloudFlare Tunnel
- TailScale
- Open the
3000port of your server and set up IP whitelisting
- Node.js (v14 or higher)
- Amazon Q CLI installed and configured
- Modern web browser with WebSocket support
Adjust the streaming speed by modifying the interval in script.js:
}, 10); // Change this value (milliseconds per character)Modify ANSI color mappings in style.css under the .terminal section.
Adjust the PTY size in server.js:
cols: 120, // Terminal width
rows: 30, // Terminal height
