This repo demonstrates CoreLink's remote build cache with a minimal Bazel 7+
workspace: 3 Go libraries, 1 binary, 1 test. Clone it, wire up your token, and
watch the second bazel build //... finish in under a second.
1. Install Bazel 7+
# macOS
brew install bazelisk
# Linux
curl -Lo bazelisk https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
chmod +x bazelisk && sudo mv bazelisk /usr/local/bin/bazel2. Sign up and get your PAT
Go to corelink.humangr.com, create an account,
and copy your Personal Access Token (format: ct_xxxx…).
3. Install the CoreLink CLI and authenticate
curl -fsSL https://corelink-get.humangr.com | sh -s -- \
--token=ct_xxx --region=ordThe CLI writes your token to ~/.config/corelink/credentials and sets
CORELINK_TOKEN for your shell session.
4. This repo is already configured — just export your token
export CORELINK_TOKEN=ct_xxx # or: source ~/.config/corelink/env
git clone https://github.com/humangr-labs/corelink-bazel-example
cd corelink-bazel-example5. Build twice — the second run should be near-instant
# First build — compiles everything, populates the remote cache.
bazel build //... --config=corelink
# Second build — retrieves all outputs from CoreLink; should be sub-second.
bazel build //... --config=corelinkFirst build (cold):
INFO: Analyzed 5 targets (30 packages loaded, 150 targets configured).
INFO: Found 5 targets...
INFO: 8 processes: 8 local.
INFO: Build completed successfully, 8 total actions
Second build (warm — all cache hits):
INFO: Analyzed 5 targets (0 packages loaded, 0 targets configured).
INFO: Found 5 targets...
INFO: Build completed successfully, 8 total actions, 8 remote cache hit
The key line: 8 remote cache hit — every action was served from CoreLink.
MODULE.bazel # Bazel 7 bzlmod: rules_go 0.50.1
.bazelrc # cache config; --config=corelink enables remote cache
lib/a/ # go_library: greeting helper
lib/b/ # go_library: version/banner
lib/c/ # go_library (deps a+b) + go_test
cmd/demo/ # go_binary (deps c)
.github/workflows/ # smoke.yml: build twice, assert cache hits
bazel test //... --config=corelink.github/workflows/smoke.yml builds twice and asserts all-cache-hit.
Set CORELINK_TEST_TOKEN_CI secret in repo settings to enable it.
License: Apache-2.0 — © 2026 HuGR Labs