Claude Code UI
September 18, 2025 ยท View on GitHub
A modern web interface for Claude CLI with real-time streaming support, built with AI Elements and shadcn/ui components.
๐ Features
๐ฏ Modern Chat Interface
- ChatGPT-style design with clean, focused layout
- Real-time streaming - Watch Claude think and respond live
- Session persistence - Conversations continue across interactions
- Working directory support - Set project context for Claude CLI
๐ ๏ธ Advanced Tool Visualization
- Live tool streaming - Watch Claude construct file operations in real-time
- Think โ Act โ Think flow - See Claude's thought process interwoven with tool usage
- Tool result display - Bash, Read, Write, Search tools with proper formatting
- Code highlighting - Syntax highlighting for all code blocks
๐ Multimodal Input
- Voice recording - Record voice messages (speech-to-text ready)
- File attachments - Upload images, PDFs, code files, and documents
- Rich text input - Auto-resizing textarea with keyboard shortcuts
๐จ Beautiful Components
- AI Elements integration - Showcases all AI Elements components
- shadcn/ui styling - Professional, accessible design system
- Responsive layout - Works on desktop, tablet, and mobile
- Dark mode support - Seamless theme switching
๐ Quick Start
Prerequisites
- Node.js 16+
- Claude CLI installed and configured
- Git
1. Backend Setup
# Clone the repository
git clone https://github.com/suhail-ak-2/claude-code-ui.git
cd claude-code-ui
# Install backend dependencies
npm install
# Build the project
npm run build
# Start the API server
npm run dev
The API server will run on http://localhost:3000
2. Frontend Setup
# Open a new terminal and navigate to frontend
cd frontend
# Install frontend dependencies
npm install
# Start the development server
npm run dev
The web interface will be available at http://localhost:3001
3. Start Using
- Open
http://localhost:3001in your browser - Set your working directory in the sidebar
- Start chatting with Claude CLI through the beautiful interface!
๐ก API Endpoints
Streaming Endpoint
POST http://localhost:3000/claude/stream
Content-Type: application/json
{
"prompt": "What files are in the current directory?",
"sessionId": "uuid-from-previous-response", // optional
"workingDirectory": "/path/to/project" // optional
}
Execute Endpoint
POST http://localhost:3000/claude/execute
Content-Type: application/json
{
"prompt": "Help me understand this code",
"sessionId": "session-uuid", // optional
"options": {
"model": "sonnet",
"dangerouslySkipPermissions": true
}
}
๐จ UI Components Showcase
The frontend demonstrates all AI Elements components:
- Conversation - Chat layout and message flow
- Message - User and assistant message cards
- Response - Formatted AI responses with streaming
- Tool - Interactive tool usage display with real-time input streaming
- CodeBlock - Syntax-highlighted code with copy functionality
- PromptInput - Advanced input with attachments and voice
- Loader - Elegant loading states
- Actions - Quick action buttons
- Suggestion - Pre-filled prompt suggestions
๐ง Features in Detail
Real-time Tool Streaming
Watch Claude construct tool calls character by character:
๐ง tool-Write | Input Streaming...
{"file_path": "/path/to/file.js", "content": "import React|
Session Management
- Automatic session creation and persistence
- Conversation history in sidebar
- Working directory context maintained
Advanced Input
- Voice Recording: Click microphone to record voice messages
- File Attachments: Drag & drop or click to attach files
- Multiline Support: Auto-resizing textarea
- Keyboard Shortcuts: Enter to send, Shift+Enter for new line
Developer Tools
- TypeScript throughout - Full type safety
- Comprehensive logging - Debug and monitor API usage
- Error handling - Graceful error states
- Performance optimized - Efficient streaming and rendering
๐ Project Structure
claude-code-ui/
โโโ src/ # Backend API source
โ โโโ server.ts # Express server with streaming endpoints
โ โโโ claudeWrapper.ts # Claude CLI process management
โ โโโ types.ts # TypeScript definitions
โ โโโ logging/ # Logging and telemetry
โโโ frontend/ # Next.js frontend
โ โโโ src/
โ โ โโโ app/page.tsx # Main chat interface
โ โ โโโ components/
โ โ โ โโโ ai-elements/ # AI Elements components
โ โ โ โโโ ui/ # shadcn/ui components
โ โโโ package.json
โโโ examples/ # Example clients
โโโ README.md
๐ Deployment
Local Development
- Start backend:
npm run dev(port 3000) - Start frontend:
cd frontend && npm run dev(port 3001)
Production
- Build backend:
npm run build - Build frontend:
cd frontend && npm run build - Start backend:
npm start - Serve frontend:
cd frontend && npm start
๐ค Contributing
This project showcases the power of Claude CLI with a modern web interface. Contributions welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
๐ License
ISC License - feel free to use this project as a foundation for your own Claude CLI interfaces!
๐ Acknowledgments
- Built with Claude CLI
- UI powered by AI Elements
- Styled with shadcn/ui
- Icons from Lucide React
Perfect for Claude Code users who want a beautiful, modern interface for their CLI interactions! ๐