A powerful web-based interface for Claude Code CLI with rich features for development workflows.
- Real-time streaming responses via WebSocket
- Multi-session management with history
- Image attachments and Gemini image generation
- LaTeX/Math rendering with KaTeX
- Interactive choice prompts
- Token usage and cost tracking
- Todo tracking from Claude's TodoWrite tool
- File Tree Browser with lazy loading and git status
- Monaco Code Editor with syntax highlighting
- Create, edit, delete, and rename files
- Three view modes: Simple, Compact, Detailed
- Full Git Panel (staging, commits, diffs, history)
- Visual branch management (create, publish, delete)
- Commit history with diff viewer
- AI-powered commit message generation
- Pull/Fetch with remote status (ahead/behind)
- Create new repositories
- Clone repositories (with repo browser)
- Push to GitHub with remote management
- Token-authenticated operations
- Built-in commands:
/help,/clear,/model,/status,/cost,/compact - User commands from
~/.claude/commands/*.md - Project commands from
{project}/.claude/commands/*.md - Autocomplete dropdown when typing
/
- Project Auto-Discovery from
~/.claude/projects - Working directory navigation
- Session starring and filtering
- PTY Reconnect with 30-minute buffer
- Progressive Web App (PWA)
- Bottom tab navigation
- Swipe gestures for panel navigation
- Responsive design
- Tabbed settings interface
- Theme configuration
- API key management (Gemini, GitHub)
- MCP Server management with connection testing
- Express.js - HTTP server
- Socket.IO - Real-time communication
- SQLite (better-sqlite3) - Database
- node-pty - Claude CLI process management
- simple-git - Git operations
- @octokit/rest - GitHub API
- React 18 - UI framework
- Vite - Build tool with code splitting
- Radix UI - Accessible components
- Tailwind CSS - Styling
- Zustand - State management
- TanStack Query - Data fetching
- Monaco Editor - Code editing
- KaTeX - Math rendering
- TypeScript - Type safety across packages
The easiest way to run Claude Code WebUI is using the pre-built Docker image:
# Create a directory for docker-compose
mkdir claude-code-webui && cd claude-code-webui
# Download docker-compose file
curl -O https://raw.githubusercontent.com/zwaetschge/claude-code-webui/main/docker-compose.hub.yml
# Create .env file with your secrets
cat > .env << 'EOF'
SESSION_SECRET=your-session-secret-at-least-32-characters-long
JWT_SECRET=your-jwt-secret-at-least-32-characters-long
EOF
# Start the container
docker-compose -f docker-compose.hub.yml up -dAccess the WebUI at http://localhost:5174
Requirements:
- Docker and Docker Compose
- Claude Code CLI configured on your host (
~/.claudedirectory)
- Node.js 20+
- pnpm 9+
- Claude Code CLI installed and configured
# Clone the repository
git clone https://github.com/zwaetschge/claude-code-webui.git
cd claude-code-webui
# Install dependencies
pnpm install
# Start development servers
pnpm dev
# Or use the helper script (generates temporary secrets)
./scripts/start-webui.sh- Backend: http://localhost:3006
- Frontend: http://localhost:5173
# Build all packages
pnpm build
# Start production server
pnpm start# Option 1: Pull from Docker Hub (recommended)
docker-compose -f docker-compose.hub.yml up -d
# Option 2: Build locally
docker-compose up -d --build| Variable | Description | Required |
|---|---|---|
SESSION_SECRET |
Express session secret | Yes |
JWT_SECRET |
JWT signing key | Yes |
FRONTEND_URL |
CORS origin (default: http://localhost:5173) | No |
PORT |
Backend port (default: 3006) | No |
The backend communicates with Claude CLI in stream-json mode:
claude --print --verbose --output-format stream-json --input-format stream-json \
--include-partial-messages --dangerously-skip-permissionspackages/
├── backend/ # Express + Socket.IO server
│ ├── src/
│ │ ├── routes/ # REST API endpoints
│ │ ├── services/ # Business logic
│ │ ├── websocket/# Socket.IO handlers
│ │ └── db/ # SQLite database
├── frontend/ # React + Vite application
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── stores/ # Zustand stores
│ │ ├── services/ # API & Socket clients
│ │ └── hooks/ # Custom React hooks
└── shared/ # Shared TypeScript types
GET /api/sessions- List all sessionsPOST /api/sessions- Create new sessionGET /api/sessions/:id- Get session detailsPATCH /api/sessions/:id/star- Toggle star
GET /api/files?path=- List directory contentsGET /api/files/content?path=- Read file contentPOST /api/files- Create filePUT /api/files- Update fileDELETE /api/files?path=- Delete file
GET /api/git/status?path=- Get git statusPOST /api/git/stage- Stage filesPOST /api/git/commit- Create commitPOST /api/git/pull- Pull from remotePOST /api/git/push- Push to remotePOST /api/git/branch/create- Create branchPOST /api/git/generate-commit-message- AI commit message
GET /api/github/repos- List user reposPOST /api/github/repos- Create repoPOST /api/github/clone- Clone repoPOST /api/github/push- Push to GitHub
GET /api/commands- List available commandsPOST /api/commands/execute- Execute command
session:send- Send message to Claudesession:subscribe- Subscribe to session updatessession:interrupt- Interrupt Claude (Ctrl+C)session:reconnect- Reconnect with buffer replay
session:output- Streaming textsession:message- Complete messagesession:thinking- Thinking indicatorsession:tool_use- Tool usage eventssession:todos- Todo list updatessession:usage- Token usage data
- Fork the repository
- Create a feature branch
- Make your changes
- Run
pnpm typecheckandpnpm lint - Submit a pull request
MIT License - see LICENSE for details.
- Anthropic for Claude
- Claude Code CLI for the underlying tool