Skip to main content

Getting started with FlagTGL Cloud

Create and evaluate a production-ready feature flag in a few minutes.

1. Create your Cloud account

Open flagtgl.com/signup, create an organization, and choose a project. FlagTGL separates flag configuration by environment so development changes do not affect production.

Self-hosting is optional

If your organization must operate FlagTGL itself, review Deployment options. The rest of this guide applies to both deployment models.

2. Create a flag

  1. Open Flags in your project.
  2. Select Create flag.
  3. Use a stable key such as new-checkout-flow.
  4. Choose Boolean or a multivariate value type.

New flags start off in each environment. A flag key is an API contract; avoid renaming keys after applications use them.

3. Copy an environment SDK key

Open Project settings, choose the environment, and copy the appropriate server or client credential. Keep server SDK keys in a secret manager and never expose them in browser code.

4. Evaluate the flag

go get github.com/anchoo2kewl/flagtgl/sdks/go-server-sdk
client, err := flagtgl.NewClient(flagtgl.Config{
SDKKey: os.Getenv("FLAGTGL_SDK_KEY"),
BaseURL: "https://flagtgl.com",
})
if err != nil {
log.Fatal(err)
}
defer client.Close()

enabled := client.BoolVariation(
"new-checkout-flow",
flagtgl.User{Key: "user-123"},
false,
)

Use a safe fallback value—the last argument—so application behavior stays predictable if the flag is missing or the service is temporarily unavailable.

SDK fallback behavior

If FlagTGL is unreachable, SDKs serve the fallback value defined in your code. When a boolean evaluation supplies false, Disabled is served to all contexts until the SDK has flag data again.

enabled := client.BoolVariation("new-checkout", context, false)
// Unreachable with no cached data → false (Disabled)

This is application code—not a hidden dashboard default—so the failure behavior can be reviewed and tested with the feature. SDKs use last-known-good data first when it is available.

5. Release safely

Configure targeting in a non-production environment, verify the expected contexts receive the right variation, then promote the same intent to production. The dashboard shows evaluation activity and context kinds after SDK traffic begins.

Next steps