Built for the day a release goes wrong.
Rollouts and rules
Set a percentage or target by email, country, plan or any attribute you pass, per environment. Hashing is sticky, so nobody flips between versions.
plan in [pro, enterprise] and country = DE, then 25%
A kill switch that reaches everyone
Changes go to connected SDKs over a server-sent event stream. A webhook from your APM can also roll a canary back to 0% for you.
canary_rollback: new-checkout to 0%
Two people for production
Protect an environment and changes wait for a second person to review them, like a pull request for your flags.
ramp new-checkout to 100%: awaiting review
An audit trail you can check
Each entry is hashed with the one before it. One API call verifies the whole chain, and you can export it as CSV or JSON.
GET /api/v1/audit/verify
Cleanup for finished flags
Flagura finds flags stuck at 100% and flags nobody turned back on, then tells you which ones to take out of your code.
checkout-v2: 100% in production, ready for cleanup
Evaluated where your code runs.
- store
Flags live in SQLite or PostgreSQL, on your infrastructure
- stream
A change is pushed to every connected SDK over SSE, with backoff when a connection drops
- memory
Your service holds the rules and evaluates locally. Emails and IDs never need to leave it.
package main
import (
"context"
"fmt"
flagura "github.com/dhawalhost/flagura/sdks/go"
)
func main() {
// In-memory local evaluation
client := flagura.NewClient("https://api.flagura.dev", "flg_live_secret",
flagura.WithLocalEvaluation(true),
)
defer client.Close()
res, _ := client.Evaluate(context.Background(), "ai-smart-search", flagura.Context{
UserID: "usr_alex_42",
Email: "alex@company.com",
})
fmt.Printf("Enabled: %v | Latency: %v ns\n", res.Enabled, res.EvaluationLatencyNs)
}import { FlaguraClient } from '@flagura/sdk';
// Instant local in-memory evaluation over persistent SSE stream
const client = new FlaguraClient({
endpoint: 'https://api.flagura.dev',
apiKey: 'flg_live_secret'
});
const { enabled, variant } = await client.evaluate('ai-smart-search', {
user_id: 'usr_alex_42',
email: 'alex@company.com',
});
// Evaluated result: { enabled, variant }from flagura import FlaguraClient, EvaluationContext
# Fast local in-process evaluation with zero remote HTTP calls
client = FlaguraClient("https://api.flagura.dev", api_key="flg_live_secret")
res = client.evaluate("ai-smart-search", EvaluationContext(
user_id="usr_alex_42",
email="alex@company.com"
))
print(res.enabled, res.variant)use flagura::{FlaguraClient, EvaluationContext};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = FlaguraClient::new("https://api.flagura.dev")
.with_api_key("flg_live_secret");
let ctx = EvaluationContext::new("usr_alex_42").with_email("alex@company.com");
if client.is_enabled("ai-smart-search", &ctx).await {
println!("Smart search is active");
}
Ok(())
}curl -X POST https://api.flagura.dev/api/v1/evaluate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer flg_live_secret" \
-d '{"flags":["ai-smart-search"],"context":{"user_id":"usr_alex_42","email":"alex@company.com"}}'Measured, with the method shown.
Numbers from the benchmarks in the repository. Your hardware will differ, so run them yourself.
go test ./pkg/engine -run xxx -bench . -benchmem
- Evaluation from memory store
- 137 ns
- Percentage rollout
- 144 ns
- Targeting rule match
- 102 ns
- Regex rule
- 226 ns
Per operation on Apple silicon, 200,000 iterations
FNV-1a rounds in this browser tab.