A modern, responsive web-based user interface for Qwen Code CLI, providing an intuitive chat interface with file management, session history, and code editing capabilities.
- 🤖 Interactive Chat Interface - Seamless communication with Qwen AI assistant
- 📁 File Explorer - Browse, view, and edit project files with syntax highlighting
- 🔄 Session Management - Save, resume, and manage multiple chat sessions
- 🎨 Dark/Light Theme - Customizable appearance with automatic theme detection
- 🛠️ Integrated Terminal - Built-in shell access for direct command execution
- 📝 Code Editor - Monaco-based editor with syntax highlighting and IntelliSense
- 🔒 Secure Authentication - JWT-based authentication system
- 📱 Fully Responsive - Optimized for desktop, tablet, and mobile devices
- Node.js 18+ and npm
- Qwen CLI installed and accessible in PATH
- Unix-like environment (Linux, macOS, WSL)
git clone https://github.com/cruzyjapan/Qwen-CLI-UI.git
cd qwen-cli-uinpm installCreate a .env file in the root directory:
# Server Configuration
PORT=5008
VITE_PORT=5009
# Qwen CLI Configuration
AGENT_BIN=qwen
AGENT_MODEL_FLAG=--model
AGENT_SKIP_PERMISSIONS_FLAG=--yolo
# Authentication (change in production)
JWT_SECRET=your-secret-key-here
# Environment
NODE_ENV=developmentnpm run devAccess the application at:
- Frontend: http://localhost:5009
- API Server: http://localhost:5008
- Open the application in your browser
- Create an admin account on first launch
- Select or create a project directory
- Start chatting with Qwen!
- Type messages and press Enter to send
- Use
@to reference project files - Drag and drop images for visual context
- View tool usage in expandable sections
- Auto-scroll and manual scroll modes
- Browse files in the Files tab
- Click to open in the integrated editor
- Save changes with Ctrl/Cmd + S
- Syntax highlighting for all major languages
- Sessions auto-save during conversations
- Resume previous sessions from the sidebar
- Search through session history
- Delete old sessions to free up space
qwen-cli-ui/
├── src/ # React frontend
│ ├── components/ # UI components
│ ├── contexts/ # React contexts
│ ├── hooks/ # Custom hooks
│ └── utils/ # Utilities
├── server/ # Express backend
│ ├── index.js # Main server
│ ├── agent-cli.js # Qwen integration
│ └── sessionManager.js # Session handling
├── public/ # Static assets
└── dist/ # Production build
# Build the frontend
npm run build
# Start production server
NODE_ENV=production npm start# Build Docker image
docker build -t qwen-cli-ui .
# Run container
docker run -p 5008:5008 -p 5009:5009 \
-e JWT_SECRET=your-secret-key \
-v ~/.qwen:/root/.qwen \
qwen-cli-ui- Change default JWT secret - Use a strong, random secret in production
- Enable HTTPS - Use reverse proxy (nginx/caddy) with SSL certificates
- Configure CORS - Restrict origins in production
- Regular updates - Keep dependencies updated for security patches
- Access control - Implement proper user authentication and authorization
WebSocket Connection Failed
- Check if the server is running on the correct port
- Verify firewall settings allow WebSocket connections
- Ensure authentication token is valid
Qwen CLI Not Responding
- Verify Qwen CLI installation:
which qwen - Test Qwen directly:
qwen --help - Check server logs for detailed errors
- Ensure proper permissions for Qwen executable
Sessions Not Saving
- Check write permissions:
~/.qwen/sessions/ - Verify sufficient disk space
- Review server logs for file system errors
Authentication Issues
- Clear browser localStorage
- Regenerate JWT token
- Check server authentication logs
npm testnpm run lint
npm run format- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
The server exposes RESTful APIs and WebSocket endpoints:
GET /api/projects- List all projectsGET /api/projects/:name/sessions- Get project sessionsPOST /api/projects/:name/upload-images- Upload imagesDELETE /api/sessions/:id- Delete a session
qwen-command- Send command to Qwenqwen-output- Receive Qwen outputsession-created- New session notificationqwen-complete- Command completion
MIT License - see LICENSE file for details
- Built for Qwen Code CLI
- Powered by React, Vite, and Tailwind CSS
- Monaco Editor for code editing
- Terminal emulation with node-pty
- Icons from Heroicons
For issues and feature requests:
- Open an issue on GitHub Issues
- Check existing issues for solutions
- Include detailed logs when reporting bugs

