Getting Started
Set up your first feature flag in FlagTGL in under 5 minutes.
1. Create an Account
Sign up at flagtgl.com/signup or self-host using Docker:
git clone https://github.com/anchoo2kewl/flagtgl.git
cd flagtgl
docker compose up -d
The dashboard will be available at http://localhost:8080.
2. Create an Organization & Project
After signing in, create an organization and your first project. Each project comes with default environments: Production, Staging, and Development.
3. Create a Feature Flag
- Navigate to your project
- Click Create Flag
- Enter a key (e.g.,
new-checkout-flow) and choose Boolean type - The flag is created off by default in all environments
4. Install an SDK
Go Server SDK
go get github.com/anchoo2kewl/flagtgl/sdks/go-server-sdk
package main
import (
"fmt"
flagtgl "github.com/anchoo2kewl/flagtgl/sdks/go-server-sdk"
)
func main() {
client, err := flagtgl.NewClient(flagtgl.Config{
SDKKey: "your-sdk-key",
BaseURL: "https://flagtgl.com",
})
if err != nil {
panic(err)
}
defer client.Close()
enabled := client.BoolVariation("new-checkout-flow", flagtgl.User{Key: "user-123"}, false)
fmt.Println("Feature enabled:", enabled)
}
JavaScript Client SDK
npm install @flagtgl/js-client-sdk
import { FlagTGLClient } from '@flagtgl/js-client-sdk';
const client = new FlagTGLClient({
sdkKey: 'your-client-sdk-key',
baseUrl: 'https://flagtgl.com',
});
await client.waitForInitialization();
const enabled = client.variation('new-checkout-flow', false);
console.log('Feature enabled:', enabled);
5. Toggle Your Flag
Go back to the dashboard, navigate to your flag, select the Production environment, and toggle it on. Your application will receive the update in real-time via SSE.
Next Steps
- Feature Flag Concepts - Learn about flag types and targeting
- Targeting Rules - Roll out to specific users or percentages
- API Reference - Integrate directly with the REST API