Feature flags in one line of code.
Wrap new code in isEnabled, ship it off, turn it on from the console. No redeploy. Read configs and parameters the same way in TypeScript and Swift; it caches, works offline and never throws.
How it works
- 1
Get a workspace
Request access. Your team gets a workspace, or joins one. Add people one by one or as teams.
- 2
Add a project and SDK keys
A project is your product. Add the channels it runs on, like Web and Mac, and copy a key for each.
- 3
Create a gate
One gate for the whole product. Pick the segments that get it and the percent of them. Save with a comment.
- 4
Read it in code
Every channel reads the same gate, config or parameter. Flagship answers for that person.
What you get
Product- new-homeKill switch
- v12 hz: 10% to 20%current
- v11 jk: off to 10%Restore
Gates
A gate is on or off for each person. The kill switch turns it off at once, rollouts go by percent with stable SHA-256 bucketing, every version is kept, and Restore brings an old one back.
- max-itemsnumber20
- welcome-texttextWelcome back
- themeJSON{ "color": "black", "size": 14 }
Configs
Serve a number, text or JSON instead of on or off. Each config has a type, and JSON values are checked against a shape you set.
- button-testShip green
- Lift
- +4.2%
- Interval
- +1.1% to +7.3%
- p-value
- 0.008
- Sample ratio
- ok
- People still needed
- 0
ShipDon't shipKeep runningExperiments
Split people into groups and read the lift, its confidence interval, the p-value and a sample ratio check. The page says how many people are still needed, then offers Ship, Don't ship or Keep running.
- segmentinmac-developers
- hz
- al
- jk
- mr
- tn
- pw
ruleplan in proSegments
Group people into a list or a rule, like plan in pro. Give a gate to a segment, not to a list of names.
One key. A few lines.
Quickstartsimport { createClient } from '@amzn/flagship-sdk'
const flagship = createClient({ key: FLAGSHIP_CLIENT_KEY })
flagship.identify({ id: user.alias })
await flagship.ready()
if (await flagship.isEnabled('whats-new-preview')) {
showWhatsNewPreview()
}
const color = flagship.get('checkout.buttonColor', 'blue')
const theme = flagship.peek('ui.theme', { color: 'black' })
flagship.track('whats-new-opened', { source: 'menu' })import Flagship
Flagship.configure(key: flagshipKey)
await Flagship.shared.identify(id: alias)
if Flagship.shared.isEnabled("whats-new-preview") {
showWhatsNewPreview()
}
let color = Flagship.shared.param("checkout.buttonColor", default: "blue")
let limit = Flagship.shared.param("limits.maxItems", default: 5)
Flagship.shared.track("whats-new-opened", ["source": "menu"])Request access
Open a ticket and your workspace owner adds you.