{"id":17753156,"url":"https://github.com/configcat/cpp-sdk","last_synced_at":"2025-07-18T10:33:52.683Z","repository":{"id":46319047,"uuid":"510404888","full_name":"configcat/cpp-sdk","owner":"configcat","description":"ConfigCat SDK for C++. 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-04-29T14:02:19.000Z","size":598,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-13T00:51:16.921Z","etag":null,"topics":["configcat","cpp","cpp-sdk","feature-flags","feature-management","feature-toggles","featureflags","remote-config","sdk"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/cpp","language":"C++","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-04T15:08:15.000Z","updated_at":"2025-04-29T09:15:30.000Z","dependencies_parsed_at":"2024-04-24T08:02:21.041Z","dependency_job_id":"0635febf-b4b0-4ea2-9907-773b94866dc8","html_url":"https://github.com/configcat/cpp-sdk","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/configcat/cpp-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fcpp-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fcpp-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fcpp-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fcpp-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/cpp-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fcpp-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265742722,"owners_count":23820898,"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","cpp","cpp-sdk","feature-flags","feature-management","feature-toggles","featureflags","remote-config","sdk"],"created_at":"2024-10-26T13:22:54.990Z","updated_at":"2025-07-18T10:33:52.642Z","avatar_url":"https://github.com/configcat.png","language":"C++","readme":"\n[![Build](https://img.shields.io/github/actions/workflow/status/configcat/cpp-sdk/cpp-ci.yml?logo=GitHub\u0026label=windows%20%2F%20macos%20%2F%20linux\u0026branch=main)](https://github.com/configcat/cpp-sdk/actions/workflows/cpp-ci.yml)\n[![codecov](https://codecov.io/gh/configcat/cpp-sdk/branch/main/graph/badge.svg?token=cvUgfof8k7)](https://codecov.io/gh/configcat/cpp-sdk)\n\n# ConfigCat SDK for C++\n\nhttps://configcat.com\n\nConfigCat SDK for C++ provides easy integration for your application to ConfigCat.\n\nC++ Standard Minimum Level: `C++17`.\n\nConfigCat 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](http://app.configcat.com) 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 [hosted feature flag service](http://configcat.com). Manage feature toggles across frontend, backend, mobile, desktop apps. [Alternative to LaunchDarkly](https://configcat.com/launchdarkly-vs-configcat). Management app + feature flag SDKs.\n\n## Getting started\n\n### 1. Install the ConfigCat SDK\nWith [Vcpkg](https://github.com/microsoft/vcpkg)\n\n- On Windows:\n  ```cmd\n  git clone https://github.com/microsoft/vcpkg\n  .\\vcpkg\\bootstrap-vcpkg.bat\n  .\\vcpkg\\vcpkg install configcat\n  ```\n\n  In order to use vcpkg with Visual Studio,\n  run the following command (may require administrator elevation):\n\n  ```cmd\n  .\\vcpkg\\vcpkg integrate install\n  ```\n\n  After this, you can create a New non-CMake Project (or open an existing one).\n  All installed libraries are immediately ready to be `#include`'d and used\n  in your project without additional configuration.\n\n\n- On Linux/Mac:\n  ```bash\n  git clone https://github.com/microsoft/vcpkg\n  ./vcpkg/bootstrap-vcpkg.sh\n  ./vcpkg/vcpkg install configcat\n  ```\n\nIn order to use vcpkg with CMake, you can use the toolchain file:\n\n```bash\ncmake -B [build directory] -S . \"-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake\"\ncmake --build [build directory]\n```\n\nWe recommend that you use the `vcpkg.json` manifest file to add the dependencies to your project.\nYou can find an example manifest file [here](example/vcpkg.json).\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/cpp-sdk/master/media/readme02-3.png \"SDK-KEY\")\n\n### 3. Include *configcat.h* header in your application code\n```cpp\n#include \u003cconfigcat/configcat.h\u003e\n\nusing namespace configcat;\n```\n\n### 4. Create a *ConfigCat* client instance\n```cpp\nauto client = ConfigCatClient::get(\"#YOUR-SDK-KEY#\");\n```\n\n### 5. Get your setting value\n```cpp\nbool isMyAwesomeFeatureEnabled = client-\u003egetValue(\"isMyAwesomeFeatureEnabled\", false);\nif (isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else {\n    doTheOldThing();\n}\n```\n### 6. Close the client on application exit\n```cpp\nConfigCatClient::closeAll();\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```cpp\nauto user = ConfigCatUser::create(\"#USER-IDENTIFIER#\");\n\nbool isMyAwesomeFeatureEnabled = client-\u003egetValue(\"isMyAwesomeFeatureEnabled\", false, user);\nif (isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else {\n    doTheOldThing();\n}\n```\n\n## Sample/Demo apps\n* [Sample Console app](https://github.com/ConfigCat/cpp-sdk/tree/main/samples/)\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 C++ Docs](https://configcat.com/docs/sdk-reference/cpp/).\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\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)\n- [Documentation](https://configcat.com/docs)\n- [Blog](https://configcat.com/blog)\n\n## External Libraries\nConfigCat C++ SDK uses these wonderful libraries: [hash-library](https://create.stephan-brumme.com/hash-library), [libcurl](https://curl.se/libcurl), [nlohmann-json](https://github.com/nlohmann/json), [z4kn4fein-semver](https://github.com/z4kn4fein/cpp-semver).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fcpp-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fcpp-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fcpp-sdk/lists"}