{"id":19773604,"url":"https://github.com/thus/simpleconfig","last_synced_at":"2026-06-08T18:32:44.364Z","repository":{"id":209226519,"uuid":"718625889","full_name":"thus/simpleconfig","owner":"thus","description":"A simpler approach to configuration handling in projects","archived":false,"fork":false,"pushed_at":"2024-08-19T20:30:29.000Z","size":102,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T11:45:52.475Z","etag":null,"topics":["c","config","library"],"latest_commit_sha":null,"homepage":"","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/thus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2023-11-14T13:28:29.000Z","updated_at":"2024-08-19T20:23:08.000Z","dependencies_parsed_at":"2023-12-07T21:29:07.830Z","dependency_job_id":"507db063-dbc3-43c6-b24e-0fda6dc11b0f","html_url":"https://github.com/thus/simpleconfig","commit_stats":null,"previous_names":["thus/simpleconfig"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/thus/simpleconfig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Fsimpleconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Fsimpleconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Fsimpleconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Fsimpleconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thus","download_url":"https://codeload.github.com/thus/simpleconfig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thus%2Fsimpleconfig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34075956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","config","library"],"created_at":"2024-11-12T05:10:21.227Z","updated_at":"2026-06-08T18:32:44.339Z","avatar_url":"https://github.com/thus.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple config\n\nAdd configuration handling to a project (argument parsing, config files,\nenvironment variables, and so on) without having to add lots of\nboilerplate code.\n\n## Features\n\nSimpleconfig supports the following:\n\n* Basic node types like string, integer, float and boolean.\n* Nested nodes using dictionaries and arrays.\n* \"get\" and \"set\" functions for the various types.\n* Iterators to traverse through nodes in dictionaries and arrays.\n* Config map to define command-line options, environment variables,\n  default values, validation callback functions, etc.\n* Configuration files in YAML format.\n* Automatically generate usage strings (usually used with -h/--help).\n\n## Requirements\n\nlibyaml is needed to build simpleconfig.\n\n## Build\n\n### Build using vanilla CMake\n\nSimpleconfig can be built like most other cmake projects:\n\n```\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\nmake install\n```\n\n### Build using Conan Package Manager\n\nIt's also possible to build simpleconfig using Conan:\n\n```\nconan profile detect\nconan install . --output-folder build --build=missing\ncd build\nsource conanbuild.sh\ncmake --preset conan-release ..\nmake\nmake install\nsource deactivate_conanbuild.sh\n```\n\n## Example\n\nSee `examples/minimal.c` for an example showing off the basics of simpleconfig.\n\n## API\n\nCheck out the header file (`include/sconf.h`).\n\n## Testing\n\nThe unit tests can be executed by running:\n\n```\nmake test\nmake coverage  # to get a coverage report\n```\n\n## Fuzzing with AFL++\n\nSupport for fuzzing with AFL++ is added to the project.\n\nAfter installing AFL++, fuzzers for simpleconfig could be built in the\nfollowing way:\n\n```\nAFL_HARDEN=1 CC=afl-clang-fast cmake .. -DSCONF_ENABLE_COVERAGE=ON -DSCONF_ENABLE_ASAN=ON -DSCONF_BUILD_FUZZERS=ON\nmake\n```\n\nIt is wise to enable ASAN (as above) when fuzzing. Also remember to create\na directory with input files (corpus) for the fuzzer.\n\nThe fuzzers could then be executed with afl-fuzz like this:\n\n```\nASAN_OPTIONS=verbosity=3,abort_on_error=1 afl-fuzz -m none -i in/ -o out/ fuzz/fuzz_sconf_yaml_read\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthus%2Fsimpleconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthus%2Fsimpleconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthus%2Fsimpleconfig/lists"}