{"id":28839495,"url":"https://github.com/coldbox-modules/unleashsdk","last_synced_at":"2026-01-31T13:11:28.338Z","repository":{"id":44534912,"uuid":"391180706","full_name":"coldbox-modules/unleashsdk","owner":"coldbox-modules","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-31T17:34:40.000Z","size":793,"stargazers_count":6,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-19T14:53:05.611Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"ColdFusion","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coldbox-modules.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-07-30T20:24:05.000Z","updated_at":"2025-03-05T18:54:49.000Z","dependencies_parsed_at":"2024-03-19T19:26:55.459Z","dependency_job_id":"003f31cc-6998-45cc-b7f1-8bca644b6c16","html_url":"https://github.com/coldbox-modules/unleashsdk","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/coldbox-modules/unleashsdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbox-modules%2Funleashsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbox-modules%2Funleashsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbox-modules%2Funleashsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbox-modules%2Funleashsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coldbox-modules","download_url":"https://codeload.github.com/coldbox-modules/unleashsdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldbox-modules%2Funleashsdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28944084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T13:02:32.153Z","status":"ssl_error","status_checked_at":"2026-01-31T13:00:07.528Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["hacktoberfest"],"created_at":"2025-06-19T14:41:35.386Z","updated_at":"2026-01-31T13:11:28.333Z","avatar_url":"https://github.com/coldbox-modules.png","language":"ColdFusion","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unleash SDK\n\n## Library for interacting with [Unleash](https://www.getunleash.io/) feature flags\n\n### Requirements\n\n- Adobe ColdFusion 2018+\n- Lucee 5+\n- ColdBox 6+\n\nThis module takes heavy advantage of ColdBox's async scheduling. There are no plans to make this module work outside of ColdBox.\n\n### Configuration\n\nThe UnleashSDK needs some jars to be available on the classpath.  Add this to your `Application.cfc`: (Adjust the paths as necessary.)\n\n```cfc\nthis.javaSettings = {\n    loadPaths = [\n        expandPath( \"/modules/unleashsdk/lib\" )\n    ],\n    loadColdFusionClassPath = true,\n    reloadOnChange = false\n};\n```\n\nHere are the settings for the UnleashSDK:\n\n```cfc\nsettings = {\n    \"appName\": getApplicationName(), // Defaults to `this.name` in `Application.cfc`.\n    \"instanceId\": resolveHostname(), // Attempts to resolve the hostname. \"unknown\", otherwise.\n    \"environment\": variables.controller.getSetting( \"environment\" ),\n    \"contextProvider\": \"DefaultContextProvider@unleashsdk\",\n    \"apiURL\": getSystemSetting( \"UNLEASH_API_URL\" ),\n    \"apiToken\": getSystemSetting( \"UNLEASH_API_TOKEN\" ),\n    \"refreshInterval\": 10,\n    \"metricsInterval\": 60\n}\n```\n\nAny of these settings can be overridden inside your `config/ColdBox.cfc`.\nIf you don't need to modify the default settings, you can supply your Unleash\nconfiguration directly through environment variables via `UNLEASH_API_URL` and `UNLEASH_API_TOKEN`.\n\n### Usage\n\nThe main usage of the UnleashSDK is checking if a feature flag is enabled. This is done using the `isEnabled` method.\n(There is also a helper `isDisabled` method for your convenience.)\n\n#### `isEnabled`\n\nEvaluates the feature with the current and provided context to determine if it is enabled for the current request.\n\nReturns: `boolean`\n\n| Name              | Type    | Required | Default | Description                                                                                                                          |\n| ----------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| name              | string  | true     |         | The name of the feature flag to evaluate                                                                                             |\n| additionalContext | struct  | false    | `{}`    | Any additional context items for this check. This struct will override any duplicate keys in the context from the `ContextProvider`. |\n| defaultValue      | boolean | false    | `false` | The default value to use if the feature does not exist.                                                                              |\n\n### Context and ContextProviders\n\nContext refers to information about the current request that Unleash will use when\nevaluating feature toggles. Context includes the following fields:\n\n```cfc\ncontext = {\n    \"appName\"       : getApplicationName(), // Defaults to `this.name` in `Application.cfc`\n    \"environment\"   : variables.environment, // `controller.getSetting( \"environment\" )`\n    \"userId\"        : \"\",\n    \"sessionId\"     : getSessionId(), // `session.sessionid`\n    \"remoteAddress\" : CGI.REMOTE_ADDR,\n    \"hostname\"      : resolveHostname() // Attempts to resolve the hostname. \"unknown\", otherwise.\n};\n```\n\nContext is generated using a `ContextProvider` and/or the `context` arguments to `isEnabled`.\nThe `context` provided to `isEnabled` will overwrite any duplicate keys in the context\ngenerated by the `ContextProvider`.\n\nA `ContextProvider` is a component with `getContext()` method. That method should return\nthe context fields shown above.\n\nYou can register a custom `ContextProvider` by the setting `contextProvider` in your `config/ColdBox.cfc`.\nA custom `ContextProvider` can enabled you to always provide specific user or session information\nfor your application without having to pass it in manually each time you call `isEnabled`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldbox-modules%2Funleashsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldbox-modules%2Funleashsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldbox-modules%2Funleashsdk/lists"}