{"id":27135491,"url":"https://github.com/tommed/ducto-featureflags","last_synced_at":"2026-04-29T01:33:21.383Z","repository":{"id":286624154,"uuid":"961987993","full_name":"tommed/ducto-featureflags","owner":"tommed","description":"A lightweight, embeddable, and pluggable feature flag engine for Go. Reusable anywhere.","archived":false,"fork":false,"pushed_at":"2025-04-16T14:44:16.000Z","size":58147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T17:16:24.048Z","etag":null,"topics":["configuration","declarative","ducto","event-processing","feature-flags","flag-engine","go","golang-library","json","launchdarkly-alternative","microservices","open-source","pipeline-automation","sdk","serverless"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tommed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-07T13:31:52.000Z","updated_at":"2025-04-16T14:42:29.000Z","dependencies_parsed_at":"2025-04-10T00:04:01.671Z","dependency_job_id":null,"html_url":"https://github.com/tommed/ducto-featureflags","commit_stats":null,"previous_names":["tommed/ducto-featureflags"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tommed/ducto-featureflags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommed%2Fducto-featureflags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommed%2Fducto-featureflags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommed%2Fducto-featureflags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommed%2Fducto-featureflags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tommed","download_url":"https://codeload.github.com/tommed/ducto-featureflags/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommed%2Fducto-featureflags/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32407164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration","declarative","ducto","event-processing","feature-flags","flag-engine","go","golang-library","json","launchdarkly-alternative","microservices","open-source","pipeline-automation","sdk","serverless"],"created_at":"2025-04-08T01:48:17.835Z","updated_at":"2026-04-29T01:33:21.376Z","avatar_url":"https://github.com/tommed.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\u003cp align=\"right\"\u003e\n    \u003ca href=\"https://github.com/tommed\" title=\"See Project Ducto\"\u003e\n        \u003cimg src=\"./assets/ducto-logo-small.png\" alt=\"A part of Project Ducto\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# Ducto Feature Flags\n\n[![CI](https://github.com/tommed/ducto-featureflags/actions/workflows/ci.yml/badge.svg)](https://github.com/tommed/ducto-featureflags/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/tommed/ducto-featureflags/branch/main/graph/badge.svg)](https://codecov.io/gh/tommed/ducto-featureflags)\n\n\u003e Lightweight, embeddable, and pluggable **[OpenFeature](https://openfeature.dev/) compatible** feature flag engine for \n\u003e Go. Designed for pipelines, microservices, and event-driven systems.\n\n---\n## ✨ What is Ducto Feature Flags?\n\n`ducto-featureflags` is a minimalist feature flag manager built in Go. It was designed as a reusable component for:\n- Data transformation pipelines (like [Ducto](https://github.com/tommed))\n- Serverless functions\n- Microservices and APIs\n- CLI tools and test harnesses\n\nIt supports both static file-based flags and dynamic backends, and can be used as:\n- A **Go SDK** (directly, or as an [OpenFeature Provider](https://github.com/open-feature/go-sdk))\n- A **CLI for testing**\n- A **preprocessor plugin** in the [ducto-orchestrator](https://github.com/tommed/ducto-orchestrator)\n\nPlease note that whilst Ducto Feature Flags is compatible with OpenFeature, \nit is **not** compliant with [flagd](https://flagd.dev/) because we support nested conditional\nstatements, which _cannot_ be reduced to flagd's simpler conditional system.\nOnce flagd can support nested conditionals like 'and' and 'or', we will provide support. \n\n---\n## ✅ Features\n\n- 🔍 Evaluate flags at runtime\n- 🧩 Simple JSON/YAML flag format\n- ♻️ Optional hot-reloading (fsnotify)\n- 🤝 OpenFeature compatible\n- 🌐 Future: HTTP / Redis / Consul backends\n- 🔓 MIT licensed and reusable in other OSS projects\n\n[View the Specifications here](./docs/specs.md).\n\n---\n## 🔧 Example Flag File\n\nThe simplest possible flag file is static like so:\n```json\n{\n  \"ui\": {\n    \"variants\": {\n      \"beta\": true,\n      \"stable\": false\n    },\n    \"defaultVariant\": \"stable\"\n  }\n}\n```\n\nTo make this more dynamic, you can add rules based on an `EvalContext`:\n```json\n{\n    \"new_ui\": {\n      \"variants\": {\n        \"beta\": true,\n        \"stable\": false\n      },\n      \"defaultVariant\": \"stable\",\n      \"rules\": [\n        { \"if\": { \"env\": \"prod\", \"group\": \"beta\" }, \"variant\": \"beta\" },\n        { \"if\": { \"env\": \"prod\" }, \"variant\": \"stable\" }\n      ]\n    }\n}\n```\n\nYou can also make use of YAML files, like this [example here](./examples/04-with_rules.yaml).\n\n---\n## 🧑‍💻 Usage (SDK)\n\n```golang\nstore, err := featureflags.NewStoreFromFile(\"flags.json\")\n// assert no error\n\nif store.IsEnabled(\"new_ui\", featureflags.EvalContext{}) {\n    // Enable experimental flow\n}\n```\n\n---\n## 📦 Use as an OpenFeature Provider\n\n```bash\ngo get -u github.com/tommed/ducto-featureflags\n```\n\n[Check our OpenFeature example here](./openfeature/example_provider_test.go)\n\n---\n## 📦 Install CLI\n\n```bash\ngo install github.com/tommed/ducto-featureflags/cmd/ducto-flags@latest\n```\n\n### CLI Usage\n\n```bash\n# Check if a single flag is enabled\nducto-flags -file flags.json -key new_ui -ctx env=prod -ctx region=EU\n\n# Print all flags\nducto-flags -file flags.json -list\n\n# Host a flags server (optional auth token)\nducto-flags serve -file flags.json [-token secret-123]\n```\n\n---\n## 🛠️ Planned Backends\n- [x] JSON file\n- [x] YAML file\n- [x] HTTP endpoint\n- [x] OpenFeature compatibility\n- [x] OpenFeature provider\n- [ ] Redis\n- [ ] Google Firestore\n- [ ] Env var overrides\n- [ ] Versioned flag API with auditing\n\n---\n## 🤖 Part of the Ducto Ecosystem\n- [ducto-dsl](https://github.com/tommed/ducto-dsl) – declarative data transformation engine\n- [ducto-orchestrator](https://github.com/tommed/ducto-orchestrator) – pluggable streaming runtime\n- `ducto-featureflags` – this repo\n\n---\n## 🧰 License\n- Code licensed under [MIT](./LICENSE)\n- Logos and illustrations (and their likeness) are (c) Copyright 2025 Tom Medhurst, all rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommed%2Fducto-featureflags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommed%2Fducto-featureflags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommed%2Fducto-featureflags/lists"}