Skip to content

Developer Overview

The main power of ConfigHub comes through building tools and platforms on top of it.

The ConfigHub SDK is available on GitHub: https://github.com/confighub/sdk

It is primarily written in Go: https://pkg.go.dev/github.com/confighub/sdk

Within the SDK, ConfigHub has several surfaces you can build on:

  1. API
  2. Go client library: generated client and non-generated helpers
  3. Javascript SDK and Typescript RTK query library
  4. Functions

The CLI source is included in the SDK also, as an example API client. The CLI reference can be found on the left and the CLI usage overview can be found among the guides.

The API and client libraries are for building tools, UI surfaces, and other external clients that call ConfigHub.

There are multiple ways to extend ConfigHub with your own code.

Tools call ConfigHub's API and perform essentially arbitrary automation tasks. CLIs are a good form factor for use by AI agents. Examples:

Functions change, validate, and extract data from configuration data in ConfigHub. They run synchronously and mostly hermetically, either built into ConfigHub or in a Worker you run. They can be invoked on demand or automatically by Triggers, and they operate on ConfigHub's converted intermediate representation, so many support multiple ToolchainTypes. Functions are the right choice for anything that reads or transforms resources and/or application configuration documents independently. Examples:

Event consumers react to things that happen. ConfigHub records actions in an append-only event log — a Release was published, a function ran — and a consumer subscribes and does something in response: trigger a deployment, post a notification, synchronize an external system. Consumers are pure readers that authenticate as a Worker. They are the right choice for anything that needs to happen after ConfigHub does something. Examples:

Deploying configuration is none of these. Configuration reaches live infrastructure by being published as a Release that a GitOps operator pulls — see integrating with GitOps operators.