https://github.com/configcat/openfeature-kotlin
ConfigCat OpenFeature Provider for Kotlin.
https://github.com/configcat/openfeature-kotlin
configcat feature-flagging feature-flags feature-toggles kotlin kotlin-android open-feature openfeature
Last synced: 11 months ago
JSON representation
ConfigCat OpenFeature Provider for Kotlin.
- Host: GitHub
- URL: https://github.com/configcat/openfeature-kotlin
- Owner: configcat
- License: mit
- Created: 2025-05-29T12:57:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-15T12:26:34.000Z (about 1 year ago)
- Last Synced: 2025-06-26T19:07:48.628Z (12 months ago)
- Topics: configcat, feature-flagging, feature-flags, feature-toggles, kotlin, kotlin-android, open-feature, openfeature
- Language: Kotlin
- Homepage: https://configcat.com/docs/sdk-reference/openfeature/kotlin
- Size: 96.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ConfigCat OpenFeature Provider for Kotlin
[](https://github.com/configcat/openfeature-kotlin/actions/workflows/ci.yml)
[](https://central.sonatype.com/artifact/com.configcat/configcat-openfeature-provider)
This repository contains an OpenFeature provider that allows [ConfigCat](https://configcat.com) to be used with
the [OpenFeature Kotlin SDK](https://github.com/open-feature/kotlin-sdk).
## Installation
```kotlin
dependencies {
implementation("com.configcat:configcat-openfeature-provider:$providerVersion")
}
```
## Usage
The `ConfigCatProvider` function takes the SDK key and an optional `ConfigCatOptions`
argument containing the additional configuration options for
the [ConfigCat Kotlin SDK](https://github.com/configcat/kotlin-sdk):
```kotlin
import com.configcat.*
import dev.openfeature.sdk.*
coroutineScope.launch(Dispatchers.IO) {
// Configure the provider.
val provider = ConfigCatProvider("") {
pollingMode = autoPoll { pollingInterval = 60.seconds }
}
// Configure the OpenFeature API with the ConfigCat provider.
OpenFeatureAPI.setProviderAndWait(provider)
// Create a client.
val client = OpenFeatureAPI.getClient()
// Evaluate feature flag.
val isAwesomeFeatureEnabled = client.getBooleanValue("isAwesomeFeatureEnabled", false)
}
```
For more information about all the configuration options, see
the [Kotlin SDK documentation](https://configcat.com/docs/sdk-reference/kotlin/#setting-up-the-configcat-client).
## Need help?
https://configcat.com/support
## Contributing
Contributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).
## About ConfigCat
ConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You
can turn your features ON/OFF using ConfigCat Dashboard even
after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom
user attribute.
ConfigCat is a hosted feature flag service. Manage feature toggles
across frontend, backend, mobile, desktop apps. Alternative to
LaunchDarkly. Management app + feature flag SDKs.
- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)
- [Documentation](https://configcat.com/docs)
- [Blog](https://configcat.com/blog)