Shared tip/suggestion content catalog for the bluefunda CLI (bai), the cai-iOS app, and editor
plugins. One schema, one set of tip content, rendered differently per surface.
Each client (CLI, iOS, editor) needs contextual tips, but authoring and maintaining separate copy
per surface drifts fast. tipcatalog is the single source of truth: a Tip schema with
per-surface render copy, a validator, and a signed, versioned distribution format so clients can
fetch updates without redeploying.
go get github.com/bluefunda/tipcatalogimport tipcatalog "github.com/bluefunda/tipcatalog"
// Offline fallback baked into the binary via go:embed.
tips, err := tipcatalog.Embedded()
// Or load from a directory of tip JSON files (e.g. this repo's tips/ during CI).
tips, err := tipcatalog.LoadDir("tips")
// Verify a fetched manifest before trusting it.
ok := tipcatalog.Verify(manifestBytes, sig, tipcatalog.PublicKey)Each tip is one JSON file under tips/, validated against the fields documented in
schema/tip.schema.json (used by the Swift side to codegen matching
types). See tip.go for the canonical Go definition. To add or edit tip content, see
CONTENT_GUIDE.md.
On every GitHub Release, CI compiles tips/*.json into a single catalog.json, signs it with
Ed25519, and attaches both catalog.json and catalog.json.sig to the release. Clients fetch the
latest release's assets, verify the signature against PublicKey (in pubkey.go),
and fall back to the embedded copy on any failure.
See CONTRIBUTING.md.
Apache 2.0 — see LICENSE.