Build
Quickstart (mise)
mise pins the exact Go and Node toolchains and installs them if missing:
mise run build # npm run build in ui/, then go build -o guardbee .
mise run check # build + go vet + go test
mise run clean # rm -f guardbee
mise run ui-dev # frontend dev server, hot reload (proxies /api to
# a separately-running "guardbee ui" on :4747)
mise run buildalways rebuilds the frontend first — the Go binary embeds whatever is currently inui/distviago:embed(seeembed.go), so a staleui/distwould silently ship an outdated UI otherwise.
Plain Go
Build the frontend yourself once — go:embed requires ui/dist to
exist — then a plain go build works:
cd ui && npm install && npm run build
cd .. && go build -o guardbee .
Built against
github.com/cilium/cilium@v1.20.2as a plain Go dependency — including the internalpkg/policyengine, not just the generated clientset and Hubble’sobservergRPC stubs. No eBPF/CGO/ privileged build step required.
Shell completions
Generated from globals.go’s binName by scripts/gen-completions.sh
(mise run completions to regenerate after a rename or a flag/subcommand
change):
# bash, in ~/.bashrc
source completions/guardbee.bash
# fish: or copy to ~/.config/fish/completions/
source completions/guardbee.fish
# zsh: anywhere on your $fpath, then `compinit`
cp completions/_guardbee ~/.zsh/completions/
mise run install-completionsdoes all three at once — regenerates, then copies each one into its shell’s standard user completions directory (~/.local/share/bash-completion/completions,~/.config/fish/completions,~/.zsh/completions). Skips the manualsource/cpabove entirely; just open a new shell afterward.