Federation
One Query, All Repos
Multi-repo federation for unified visibility. Search, analyze impact, and track changes across your entire codebase ecosystem.
Key Features
Unified visibility across multiple repositories
Cross-repo symbol search and impact analysis
API contract compatibility checking
Remote index serving with authentication
Dependency graph across repo boundaries
Centralized change hotspot analysis
Federation Architecture
┌─────────────────┐
│ CKB Federation │
│ Server │
└────────┬────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ api-svc │ │ web-app │ │ mobile │
│ index │ │ index │ │ index │
└─────────┘ └─────────┘ └─────────┘
$ ckb federation search "PaymentService"
Searching 3 repositories...
api-svc/internal/payment/service.go
PaymentService (class) - 12 methods
web-app/src/services/payment.ts
PaymentService (class) - API client wrapper
mobile/lib/services/payment.dart
PaymentService (class) - Mobile API client
Cross-repo dependencies found:
web-app → api-svc (HTTP API)
mobile → api-svc (HTTP API)Cross-Repo Impact Analysis
Changing an API? See which other repositories depend on it before you deploy.
$ ckb federation impact api-svc/PaymentService.charge
Analyzing cross-repo impact...
Direct consumers (same repo):
api-svc/internal/checkout/handler.go
api-svc/internal/subscription/renew.go
Cross-repo consumers:
web-app (2 call sites)
src/pages/checkout.tsx:45
src/components/PaymentForm.tsx:89
mobile (1 call site)
lib/screens/checkout_screen.dart:123
API contract analysis:
✓ Method signature unchanged
⚠ New required field: "currency"
Breaking change for: web-app, mobile
Recommendation:
1. Make "currency" optional with default
2. Or coordinate release with web-app and mobile teamsQuick Setup
1. Start federation server
# On your central server ckb serve --federation --port=8080 # Or use the hosted version ckb federation connect \ --server=https://ckb.yourcompany.com
2. Connect repositories
# In each repository ckb federation join \ --server=https://ckb.yourcompany.com \ --name=api-svc # Verify connection ckb federation list
MCP Tools
listFederationsList all connected repositories in the federation
ckb federation listfederationSearchModulesSearch for modules across all federated repos
ckb federation search "UserService"federationGetHotspotsGet change hotspots across all repositories
ckb federation hotspots --days=30See the whole picture
Unified code intelligence across all your repositories.