How gitbot-hq/gitbot works
GitBot is a local web workspace for running Claude Code, Codex, or OpenCode through reusable bots and persistent threads. The main workflow is to configure a bot, choose a repository, send a task, and follow the agent’s streamed conversation and permission requests. The product also supports repository browsing, setup runs, bot sharing, and Marketplace discovery and publishing. Several UI and route implementations are unsampled; those areas are represented at their known module paths, and uncertain connections are omitted.
Main entry points: bot-routes.ts Bot and thread routes · server.ts HTTP server · start-claude-code.ts Claude Code runner · start-codex.ts Codex runner
Components 21
Local runtime
- HTTP server
src/server.ts - Server services
src/server-common.ts - Repository workspace
src/workspace.ts - UI file serving
src/static-ui.ts
Bots and work
- Bot and thread routes
src/bot-routes.ts - Bot and thread store
src/bot-store.ts - Prompt and setup logic
src/bot-prompt.ts - Claude Code runner
src/start-claude-code.ts - Codex runner
src/start-codex.ts - OpenCode runner
src/start-opencode.ts
Workspace UI
- GitBot workspace
ui/app/components/app-shell.tsx - Browser API client
ui/app/lib/api.ts - Bot onboarding
ui/app/components/onboarding-flow.tsx
Sharing and marketplace
- Marketplace interface
ui/app/marketplace/page.tsx - Marketplace client
ui/app/lib/marketplace.ts - Marketplace proxy
src/marketplace-proxy.ts - Bot sharing
ui/app/lib/share.ts
Other components
- User
- Browser
- Installed coding agents
- Marketplace service
Connections 27
- User → Browser: uses
README.md - Browser → HTTP server: sends requests
README.md - HTTP server → Server services: uses services
src/server.ts - HTTP server → Bot and thread routes: dispatches bot routes
src/server.ts - HTTP server → Marketplace proxy: dispatches marketplace routes
src/server.ts - Server services → Repository workspace: calls repository functions
src/server-common.ts - Server services → UI file serving: serves UI files
src/server-common.ts - Bot and thread routes → Bot and thread store: reads and updates
src/bot-routes.ts - Bot and thread routes → Claude Code runner: loads transcripts
src/bot-routes.ts - Bot and thread routes → Codex runner: loads transcripts
src/bot-routes.ts - Bot and thread routes → OpenCode runner: loads history
src/bot-routes.ts - Claude Code runner → Bot and thread store: uses bot state
src/start-claude-code.ts - Codex runner → Bot and thread store: uses bot state
src/start-codex.ts - OpenCode runner → Bot and thread store: binds sessions
src/start-opencode.ts - Claude Code runner → Prompt and setup logic: uses prompt logic
src/start-claude-code.ts - Codex runner → Prompt and setup logic: uses prompt logic
src/start-codex.ts - OpenCode runner → Prompt and setup logic: uses prompt logic
src/start-opencode.ts - Claude Code runner → Installed coding agents: runs agent
- Codex runner → Installed coding agents: runs agent
- OpenCode runner → Installed coding agents: runs agent
- Browser → GitBot workspace: uses workspace
README.md - GitBot workspace → Browser API client: requests server data
- Bot onboarding → Browser API client: configures bots
- Marketplace interface → Marketplace client: uses marketplace client
ui/app/marketplace/page.tsx - Marketplace client → Marketplace proxy: requests listings
- Marketplace proxy → Marketplace service: proxies requests
- Marketplace interface → Bot sharing: offers bot sharing