Nano Banana Pro
Agent skill for nano-banana-pro
A web-based interface for the `claude` command line tool that provides streaming responses in a chat interface.
Sign in to like and favorite skills
A web-based interface for the
claude command line tool that provides streaming responses in a chat interface.
Automated quality checks ensure consistent code standards:
make check before commitsmake check runs all quality checks manually# Install Lefthook brew install lefthook # macOS # Or download from https://github.com/evilmartians/lefthook/releases # Install and verify hooks lefthook install lefthook run pre-commit
backend/ | Port: 8080 (configurable)claude commands and streams JSON responsesKey Features: Runtime abstraction, modular architecture, structured logging, universal Claude CLI path detection, session continuity, single binary distribution, comprehensive testing.
API Endpoints:
GET /api/projects - List available project directoriesPOST /api/chat - Chat messages with streaming responses ({ message, sessionId?, requestId, allowedTools?, workingDirectory? })POST /api/abort/:requestId - Abort ongoing requestsGET /api/projects/:encodedProjectName/histories - Conversation historiesGET /api/projects/:encodedProjectName/histories/:sessionId - Specific conversation historyfrontend/ | Port: 3000 (configurable)Key Features: Project directory selection, routing system, conversation history, demo mode, real-time streaming, theme toggle, auto-scroll, accessibility features, modular hook architecture, request abort functionality, permission dialog handling, configurable Enter key behavior.
Location:
shared/ - TypeScript type definitions shared between backend and frontend
Key Types:
StreamResponse, ChatRequest, AbortRequest, ProjectInfo, ConversationSummary, ConversationHistory
Backend uses Claude Code SDK executing commands with:
--output-format stream-json - Streaming JSON responses--verbose - Detailed execution information-p <message> - Prompt mode with user messageMessage Types: System (initialization), Assistant (response content), Result (execution summary)
Universal detection supporting npm, pnpm, asdf, yarn installations:
claude --versionImplementation:
backend/cli/validation.ts with detectClaudeCliPath(), validateClaudeCli()
Conversation continuity using Claude Code SDK's session management:
session_id from SDK messagessession_id for contextsession_id to SDK via options.resumePlaywright MCP server integration for automated browser testing and demo verification.
{ "mcpServers": { "playwright": { "type": "stdio", "command": "npx", "args": ["@playwright/mcp@latest"] } } }
Available Tools: Navigation, interaction, screenshots, content access, file operations, tab management, dialog handling
npm install -g @dotenvx/dotenvxCreate
.env file in project root:
PORT=9000
# Backend cd backend deno task dev # Deno npm run dev # Node.js # Add --debug for debug logging # Frontend cd frontend npm run dev
Access: Frontend http://localhost:3000, Backend http://localhost:8080
├── backend/ # Server with runtime abstraction │ ├── cli/ # Entry points (deno.ts, node.ts, args.ts, validation.ts) │ ├── runtime/ # Runtime abstraction (types.ts, deno.ts, node.ts) │ ├── handlers/ # API handlers (chat.ts, projects.ts, histories.ts, etc.) │ ├── history/ # History processing utilities │ ├── middleware/ # Middleware modules │ ├── utils/ # Utility modules (logger.ts) │ └── scripts/ # Build and packaging scripts ├── frontend/ # React application │ ├── src/ │ │ ├── config/ # API configuration │ │ ├── utils/ # Utilities and constants │ │ ├── hooks/ # Custom hooks (streaming, theme, chat state, etc.) │ │ ├── components/ # UI components (chat, messages, dialogs, etc.) │ │ ├── types/ # Type definitions │ │ └── contexts/ # React contexts ├── shared/ # Shared TypeScript types └── CLAUDE.md # Technical documentation
SDK Types:
frontend/node_modules/@anthropic-ai/claude-code/sdk.d.ts
// Type extraction const systemMsg = sdkMessage as Extract<SDKMessage, { type: "system" }>; const assistantMsg = sdkMessage as Extract<SDKMessage, { type: "assistant" }>; // Content access patterns for (const item of assistantMsg.message.content) { if (item.type === "text") { const text = (item as { text: string }).text; } } // System message (direct access, no nesting) console.log(systemMsg.cwd);
Key Points: System fields directly on object, Assistant content nested under
message.content, Result has subtype field
UI-driven plan mode functionality allowing users to toggle between normal execution and plan mode.
Features: Normal/Plan mode toggle, UI integration, session persistence Implementation:
usePermissionMode hook, PlanPermissionInputPanel component
Usage: Toggle in chat input → send message → review plan → choose action
Frontend: Vitest + Testing Library (
make test-frontend)
Backend: Deno test runner (make test-backend)make test runs both, make check includes in quality validation
cd backend && deno task build # Local building
Automated: Push git tags → GitHub Actions builds for Linux/macOS (x64/ARM64)
Policy: Fixed versions (no caret
^) for consistency across frontend/backend
Update Procedure:
grep "@anthropic-ai/claude-code" frontend/package.json backend/deno.jsonnpm installrm deno.lock && deno cache cli/deno.tsnpm installmake checkmake format - Format both frontend and backendmake lint - Lint bothmake typecheck - Type check bothmake test - Test bothmake check - All quality checksmake format-files FILES="file1 file2" - Format specific filesmake dev-backend / make dev-frontendmake test-frontend / make test-backendmake build-backend / make build-frontendgit checkout -b feature/namemake check)gh pr create --title "..." --body "..." --label "bug" --label "backend"
🐛
bug, ✨ feature, 💥 breaking, 📚 documentation, ⚡ performance, 🔨 refactor, 🧪 test, 🔧 chore, 🖥️ backend, 🎨 frontend
gh issue create --title "Sub-issue" --label "feature" SUB_ISSUE_ID=$(gh api repos/sugyan/claude-code-webui/issues/NUM --jq '.id') gh api repos/sugyan/claude-code-webui/issues/PARENT/sub_issues --method POST --field sub_issue_id=$SUB_ISSUE_ID
gh api repos/sugyan/claude-code-webui/pulls/PR_NUMBER/comments
Important: Always run commands from project root. Use full paths for cd commands to avoid directory navigation issues.