LaunchFlag
v0.2.7Feature flags and kill switches.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_flags
List every LaunchFlag flag with its dev, staging and prod state.
| Parameter | Type | Description |
|---|---|---|
project | string |
cleanup_flags
Flags whose code can now be removed, with the reason and what to do about each. Run this when asked to tidy up feature flags, or after finishing a rollout. Two kinds: settled flags are on for everyone everywhere and still evaluated constantly, so the branch around them has one reachable side; stale flags are ones nothing evaluates any more.
| Parameter | Type | Description |
|---|---|---|
project | string |
create_flag
Create a flag, OFF in every environment, so a risky change can ship dark. Returns the code snippet to wrap the new path in.
| Parameter | Type | Description |
|---|---|---|
key * | string | snake_case, e.g. checkout_v2 |
description | string | |
essential | boolean | essential flags survive emergency off |
failMode | string | the safety default recorded for this flag, closed for money, auth and deletion. LaunchFlag does not enforce it: put the same value in the SDK's defaults option, which is what runs when we are unreacha… |
project | string |
set_flag
Turn a flag on or off, or change who it targets, in one environment. Environments are always dev, staging and prod here, whatever the project calls them on its dashboard.
| Parameter | Type | Description |
|---|---|---|
env * | string | |
key * | string | |
allowlist | array | Exact user ids or emails, or a whole domain as *@acme.com. Each entry must match what the app passes to flag(): a list of emails never matches an app that passes ids, so pass both as flag(key, { id, e… |
enabled | boolean | |
limit | integer | how many users get in, used by first_n |
percentage | integer | |
project | string | |
targeting | string |
promote_flag
Copy one environment's flag config forward: dev to staging, staging to prod, or dev straight to prod on a project that does not run staging. A project may label those environments differently, and plans with two environments have no staging slot at all.
| Parameter | Type | Description |
|---|---|---|
from * | string | |
key * | string | |
to * | string | |
project | string |
delete_flag
Delete a flag. Only once the code paths behind it are gone.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
project | string |
emergency_off
Kill switch: disable every non-essential flag in the project at once, or lift it.
| Parameter | Type | Description |
|---|---|---|
off * | boolean | |
project | string |
list_projects
List your LaunchFlag projects and their env keys.