Skip to content

SemaphoreSelf-hosted feature flags, built for speed.

A lightweight feature flag relay proxy and embeddable Go engine with native OpenFeature OFREP support.

Semaphore logo

Quick Start ​

Build and run the relay proxy locally with a file retriever, or pull the container image from ghcr.io/blackbirdworks/semaphore:

yaml
# flags.yaml
new-checkout:
  variations:
    enabled: true
    disabled: false
  targeting:
    - name: beta users
      query: beta eq true
      variation: enabled
  defaultRule:
    variation: disabled
yaml
# semaphore-proxy.yaml
pollingInterval: 1000
retrievers:
  - kind: file
    path: ./flags.yaml
shell
./out/bin/semaphore --config semaphore-proxy.yaml

Evaluate the flag over OFREP:

shell
curl -s http://localhost:1031/ofrep/v1/evaluate/flags/new-checkout -X POST \
  -H 'Content-Type: application/json' \
  --data-raw '{"context": {"targetingKey": "user-123", "beta": true}}'
json
{
  "key": "new-checkout",
  "value": true,
  "reason": "TARGETING_MATCH",
  "variant": "enabled",
  "metadata": {
    "evaluatedRuleName": "beta users",
    "gofeatureflag_cacheable": true,
    "semaphore_cacheable": true
  }
}

Released under the MIT License.