Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nexus.westyx.cloud/llms.txt

Use this file to discover all available pages before exploring further.

What are feature flags?

Feature flags let you toggle behaviour in your application without a deployment. Nexus flags support:
  • Boolean on/off - the simplest use case
  • Scheduling - automatically enable or disable at a specified time (starts_at / ends_at)
  • A/B rollout - enable for a percentage of users with optional targeting rules
  • Live push - changes propagate to connected SDK instances within milliseconds

Reading flags

All SDKs expose a GetFlag / getFlag / get_flag method that returns a boolean with a default fallback if the flag is not found.
enabled := client.GetFlag("new.checkout", false)

A/B rollout

The AB Testing add-on (available on s tier and above) enables percentage-based rollout with optional targeting rules. Use evaluateAB to evaluate multiple flags at once for a specific user:
results, err := client.EvaluateAB(ctx, []string{"checkout-v2", "new-sidebar"}, userID, map[string]string{
    "plan": "pro",
    "country": "HU",
})
evaluateAB returns { "checkout-v2": true, "new-sidebar": false } - stable for the same userID across calls (FNV-64 bucket).
A/B Testing requires the AB Testing add-on to be active on the project. A 403 response with ab_addon_not_active indicates the add-on is not enabled.

Scheduling

Flags can be scheduled to turn on or off automatically:
  • starts_at - enable the flag at this UTC timestamp
  • ends_at - disable the flag at this UTC timestamp
The schedule is enforced server-side; the SDK always returns the current state.

Key names

Flag keys follow the same pattern as secrets and configs: ^[a-zA-Z]([a-zA-Z0-9_.:-]*[a-zA-Z0-9])?$

Targeting rules

When the AB Testing add-on is active, you can configure JSONB targeting rules on a flag. Rules are evaluated by the server during evaluateAB. Supported operators include eq, in, gt, lt, and contains.

Live updates

Flag changes pushed from the console are delivered to connected SDK clients within milliseconds via SSE. See Quickstart → Enable live updates.