{"id":13659755,"url":"https://github.com/configcat/kotlin-sdk","last_synced_at":"2026-03-16T21:32:59.735Z","repository":{"id":49787558,"uuid":"518079622","full_name":"configcat/kotlin-sdk","owner":"configcat","description":"ConfigCat SDK for Kotlin Multiplatform. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2025-06-13T10:45:37.000Z","size":2367,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-13T11:41:57.953Z","etag":null,"topics":["configcat","configcat-sdk","feature-flag","feature-flagging","feature-flags","feature-toggle","feature-toggles","kotlin","kotlin-multiplatform"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/kotlin","language":"Kotlin","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/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-26T13:47:06.000Z","updated_at":"2025-06-13T10:45:40.000Z","dependencies_parsed_at":"2023-09-26T17:27:45.569Z","dependency_job_id":"a8d12072-a0c2-4ad2-aa3f-dd05cc434835","html_url":"https://github.com/configcat/kotlin-sdk","commit_stats":{"total_commits":98,"total_committers":5,"mean_commits":19.6,"dds":0.3163265306122449,"last_synced_commit":"fd8826bdc1df470146ab16a019cff4deb791264e"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/configcat/kotlin-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fkotlin-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fkotlin-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fkotlin-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fkotlin-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/kotlin-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fkotlin-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259949684,"owners_count":22936411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["configcat","configcat-sdk","feature-flag","feature-flagging","feature-flags","feature-toggle","feature-toggles","kotlin","kotlin-multiplatform"],"created_at":"2024-08-02T05:01:11.927Z","updated_at":"2026-03-16T21:32:59.706Z","avatar_url":"https://github.com/configcat.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":["🧩 Service SDK"],"readme":"# ConfigCat SDK for Kotlin Multiplatform\n[![Kotlin CI](https://github.com/configcat/kotlin-sdk/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/configcat/kotlin-sdk/actions/workflows/ci.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/com.configcat/configcat-kotlin-client?label=maven%20central)](https://central.sonatype.com/artifact/com.configcat/configcat-kotlin-client/)\n[![Quality Gate Status](https://img.shields.io/sonar/quality_gate/configcat_kotlin-sdk?logo=SonarCloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_kotlin-sdk)\n[![SonarCloud Coverage](https://img.shields.io/sonar/coverage/configcat_kotlin-sdk?logo=SonarCloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_kotlin-sdk)\n[![Kotlin](https://img.shields.io/badge/kotlin-2.1-blueviolet.svg?logo=kotlin)](http://kotlinlang.org)\n\nConfigCat SDK for Kotlin Multiplatform provides easy integration for your application to [ConfigCat](https://configcat.com).\n\n## Getting started\n\n### 1. Install the ConfigCat SDK\n```kotlin\nval configcatVersion: String by project\n\nkotlin {\n    sourceSets {\n        val commonMain by getting {\n            dependencies {\n                implementation(\"com.configcat:configcat-kotlin-client:$configcatVersion\")\n            }\n        }\n    }\n}\n```\n\n### 2. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/java-sdk/master/media/readme02-3.png  \"SDK-KEY\")\n\n### 3. Import *com.configcat.** in your application code\n```kotlin\nimport com.configcat.*\n```\n\n### 4. Create a *ConfigCat* client instance\n```kotlin\nimport com.configcat.*\n\nsuspend fun main() {\n    val client = ConfigCatClient(\"#YOUR-SDK-KEY#\")\n}\n```\n\n### 5. Get your setting value\n```kotlin\nimport com.configcat.*\n\nsuspend fun main() {\n    val client = ConfigCatClient(\"#YOUR-SDK-KEY#\")\n    val isMyAwesomeFeatureEnabled = client.getValue(\"isMyAwesomeFeatureEnabled\", false)\n    if (isMyAwesomeFeatureEnabled) {\n        doTheNewThing()\n    } else {\n        doTheOldThing()\n    }\n}\n```\n\n### 6. Close the client on application exit\n```kotlin\nclient.close()\n```\n\n## Getting user-specific setting values with Targeting\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `User Object` to the `getValue()` function.\n\nRead more about Targeting [here](https://configcat.com/docs/advanced/targeting/).\n\n## User Object\nPercentage and targeted rollouts are calculated by the user object passed to the configuration requests.\nThe user object must be created with a **mandatory** identifier parameter which uniquely identifies each user:\n```kotlin\nimport com.configcat.*\n\nsuspend fun main() {\n    val client = ConfigCatClient(\"#YOUR-SDK-KEY#\")\n    \n    val user = ConfigCatUser(\"#USER-IDENTIFIER#\")\n    val isMyAwesomeFeatureEnabled = client.getValue(\"isMyAwesomeFeatureEnabled\", false, user)\n    if (isMyAwesomeFeatureEnabled) {\n        doTheNewThing()\n    } else {\n        doTheOldThing()\n    }\n}\n```\n\n## Sample / Demo app\n* [Kotlin Multiplatform Mobile app](https://github.com/configcat/kotlin-sdk/tree/main/samples/kmm)\n* [Android app](https://github.com/configcat/kotlin-sdk/tree/main/samples/android)\n* [Kotlin app](https://github.com/configcat/kotlin-sdk/tree/main/samples/kotlin)\n* [React app](https://github.com/configcat/kotlin-sdk/tree/main/samples/js)\n* [Node.js app](https://github.com/configcat/kotlin-sdk/tree/main/samples/node-js)\n\n## Polling Modes\nThe ConfigCat SDK supports three different polling mechanisms to acquire the setting values from ConfigCat. After the latest setting values are downloaded, they are stored in an internal cache . After that, all requests are served from the cache. Read more about Polling Modes and how to use them at [ConfigCat Kotlin Docs](https://configcat.com/docs/sdk-reference/kotlin/).\n\n## Support\nIf you need help using this SDK, feel free to contact the ConfigCat Staff at [https://configcat.com](https://configcat.com). We're happy to help.\n\n## Contributing\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\n\n## About ConfigCat\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"https://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\n\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\n\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)\n- [Documentation](https://configcat.com/docs)\n- [Blog](https://configcat.com/blog)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fkotlin-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fkotlin-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fkotlin-sdk/lists"}