Lightweight feature flags
for developers.
featuresd is a tiny dæmon that helps you decouple your code releases from your feature releases.
Developers define features and segments, then your app uses the featuresd API at runtime to find out which features are available in any context.
You can run featuresd locally in about 30 seconds.
# Download and run featuresd (no sudo required!)
curl https://featuresd.io/get.sh | bash
./featuresd -p 15555 --insecure &
# Create a feature
curl -XPOST localhost:15555/api/features \
-d id=new_interface_alpha
# Create a "context" and enable the feature we just created
curl -XPOST localhost:15555/api/contexts \
-d id=user1 \
-d features[new_interface_alpha]=true
# Check which contexts match the feature
curl localhost:15555/api/contexts/?matches=new_interface_alpha
# That's all, folks
kill featuresd
featuresd is a focused project which may not suit everyone. To stay sustainable we have to say “no” to some features.
Simple capabilities can have broad reach, allowing you to manage your apps the way you want.
featuresd doesn't prescribe a structure for your data. A context can have one or more prototypes which it inherits features from.
# User inherits features from their team, and
# from a beta-testing segment they have opted in to
curl -XPOST localhost:15555/api/contexts \
-d id=user1 \
-d prototype[]=team1 \
-d prototype[]=beta_testers
# Enable a beta feature for all beta testers
curl -XPOST localhost:15555/api/contexts \
-d id=beta_testers \
-d features[new_interface_beta]=true
Instead of inventing our own boolean language for feature matching, featuresd uses Lisp.
# Define a feature enabled for a complex set of users
curl -XPOST localhost:15555/api/features \
-d id=tricky_situation \
-d match='(or \
(= "US" (ctx "country")) \
(> 10 (ctx "team-size")))'
Instead of managing your features and segments through the web UI, you can deploy code from a repository. This is great for keeping feature definitions in sync between dev, pre-release, and production environments.
# Sync feature definitions from a manifest
curl -XPOST localhost:15555/api \
-d manifest=@/path/to/manifest.toml
For more information about progressive delivery and feature flagging, check out the original post by Flickr, or this detailed guide from LaunchDarkly.
Right now, featuresd is handling production workloads at Pylon.
See the docs for more comparisons between featuresd and alternatives.