LaunchFlag

v0.2.7
dev.launchflag/launchflag Checked 2 hours ago Published 2 months ago

Feature 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.

ParameterTypeDescription
projectstring

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.

ParameterTypeDescription
projectstring

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.

ParameterTypeDescription
key *stringsnake_case, e.g. checkout_v2
descriptionstring
essentialbooleanessential flags survive emergency off
failModestringthe 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…
projectstring

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.

ParameterTypeDescription
env *string
key *string
allowlistarrayExact 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…
enabledboolean
limitintegerhow many users get in, used by first_n
percentageinteger
projectstring
targetingstring

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.

ParameterTypeDescription
from *string
key *string
to *string
projectstring

delete_flag

Delete a flag. Only once the code paths behind it are gone.

ParameterTypeDescription
key *string
projectstring

emergency_off

Kill switch: disable every non-essential flag in the project at once, or lift it.

ParameterTypeDescription
off *boolean
projectstring

list_projects

List your LaunchFlag projects and their env keys.