A CLI that enables developers to run their code locally within the context of a Dev/Staging K8s environment.
curl -fsSL https://raw.githubusercontent.com/vercel/bridge/main/install-edge.sh | shThis downloads the latest edge binary for your platform (macOS/Linux, amd64/arm64) and installs it to /usr/local/bin.
The API is defined using protocol buffers. Currently, all messages are sent/received via websocket/HTTP but the payloads themselves are housed within the protos directory.
To generate, install buf and run:
make
k3d cluster create bridge --registry-create bridge-registry:0.0.0.0:5111This creates a lightweight k3s cluster with a local container registry at k3d-bridge-registry.localhost:5111. Your
kubeconfig context is automatically switched to k3d-bridge.
Build images, push to the registry, and apply the Kubernetes manifests:
go run deploy/main.goThis deploys the bridge administrator (namespace bridge) and a test HTTP server (namespace test-workloads). Re-run
to pick up code changes — images are pushed and deployments are restarted automatically.
go build -o bridge ./cmd/bridgeTo test the devcontainer feature locally, also build a Linux binary:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dist/bridge-linux ./cmd/bridgeCreate a bridge to the test server:
./bridge create test-api-server -n test-workloads --connectTo test local changes to the devcontainer feature (intercept, DNS, etc.), first set up hardlinks to the feature files:
mkdir -p .devcontainer/local-features/bridge
ln features/bridge/install.sh .devcontainer/local-features/bridge/install.sh
ln features/bridge/devcontainer-feature.json .devcontainer/local-features/bridge/devcontainer-feature.jsonThen run with the local feature ref:
./bridge create test-api-server -n test-workloads --feature-ref ../local-features/bridge -f .devcontainer/devcontainer.json --force --connectOr start just the administrator port-forward to verify connectivity:
kubectl port-forward -n bridge svc/administrator 9090:9090k3d cluster delete bridge --registry-delete k3d-bridge-registrySee here for more info.
