DevHub is a development environment orchestrator that manages all your development services from a single, beautiful terminal interface. It provides an intuitive TUI (Terminal User Interface) to start, stop, monitor, and debug your development stack including databases, web servers, build processes, and more.
- π Service Orchestration: Manage multiple development services with dependency resolution
- π Real-time Monitoring: Live CPU, memory usage, and health status tracking
- π Integrated Logging: View, search, and follow logs from all services in one place
- π MCP Integration: Expose services to Claude Code and other AI tools via Model Context Protocol
- π― Dependency Management: Automatic service startup ordering based on dependencies
- π» Cross-platform: Works on macOS, Linux, and Windows
- β‘ Fast & Lightweight: Built with Go for optimal performance
go install github.com/iota-uz/devhub/cmd/devhub@latest- Create a
devhub.ymlconfiguration file in your project root:
postgres:
desc: Database container
port: 5432
run: docker compose -f compose.dev.yml up db
health:
tcp: 5432
wait: 20s
server:
desc: Hot-reload Go app
port: 3200
run: air -c .air.toml
needs: [postgres]
health:
http: http://localhost:3200/health
wait: 10s
templ:
desc: Auto-compile templates
run: templ generate --watch
css:
desc: Build Tailwind CSS
run: tailwindcss -i input.css -o output.css --watch- Start DevHub:
devhub- Use the TUI interface:
β/β: Navigate between servicesSpace: Toggle service on/offr: Restart serviceEnter: View logsq: Quit
DevHub uses a YAML configuration file (default: devhub.yml) to define your services. Each service can specify:
desc: Human-readable descriptionport: Port number the service runs onrun: Command to executeneeds: Array of service dependencies
DevHub supports multiple health check types:
# TCP health check
health:
tcp: 5432
timeout: 3s
interval: 5s
wait: 20s
# HTTP health check
health:
http: http://localhost:3200/health
timeout: 3s
interval: 5s
wait: 10s
# Command health check
health:
cmd: "pg_isready -h localhost -p 5432"
timeout: 3s
interval: 5s
wait: 20sservice:
desc: Cross-platform service
run: my-command --flag
os:
windows: my-command.exe --flag
darwin: my-command-mac --flagDevHub includes a built-in Model Context Protocol (MCP) server that exposes service management tools to AI assistants like Claude Code.
list_services: Get status of all servicesget_logs: Retrieve logs from a specific service (with offset support)service_control: Start, stop, or restart serviceshealth_check: Get detailed health statussearch_logs: Search for patterns in service logs
When DevHub is running, it displays the MCP connection command in the interface:
claude mcp add --transport http devhub http://localhost:8765/mcpdevhub [options]
Options:
-config string
Path to the devhub.yml config file (default "devhub.yml")
-mcp-port int
Port for MCP server (default 8765)
-version
Show version informationServices can depend on other services using the needs field:
api:
desc: API Server
run: go run ./cmd/api
needs: [postgres, redis]
postgres:
desc: Database
run: docker compose up postgres
redis:
desc: Cache
run: docker compose up redisDevHub automatically:
- Starts dependencies before dependent services
- Waits for health checks to pass
- Stops dependents before stopping dependencies
Health checks ensure services are ready before marking them as healthy:
- Starting Period: Grace period after startup before health checks begin
- Interval: How often to check health
- Timeout: Maximum time to wait for health check response
- Retries: Number of failed checks before marking unhealthy
- Real-time Following: Automatically scroll to new log entries
- Search: Find specific patterns in logs
- Context: View surrounding lines for search matches
- Clearing: Clear logs for a fresh start
- Timestamping: All log entries include timestamps
git clone https://github.com/iota-uz/devhub.git
cd devhub
go build -o devhub ./cmd/devhubgo test ./...Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Bubble Tea for the TUI framework
- Uses Lip Gloss for terminal styling
- MCP integration via mcp-go
- System monitoring with gopsutil
