{"id":16164732,"url":"https://github.com/aperezdc/cflag","last_synced_at":"2025-07-05T08:36:24.918Z","repository":{"id":142776942,"uuid":"268373920","full_name":"aperezdc/cflag","owner":"aperezdc","description":"Non-allocating command line flag parser","archived":false,"fork":false,"pushed_at":"2025-04-27T22:02:09.000Z","size":33,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-27T23:18:34.128Z","etag":null,"topics":["cli","command-line","options","parser"],"latest_commit_sha":null,"homepage":null,"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/aperezdc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-31T22:20:06.000Z","updated_at":"2025-04-27T22:02:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"f259ea1f-3639-4358-98b7-6a97240f6962","html_url":"https://github.com/aperezdc/cflag","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"27c740088a313c97f023fad852188645d881af28"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/aperezdc/cflag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Fcflag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Fcflag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Fcflag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Fcflag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aperezdc","download_url":"https://codeload.github.com/aperezdc/cflag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Fcflag/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263711207,"owners_count":23499837,"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":["cli","command-line","options","parser"],"created_at":"2024-10-10T02:47:33.469Z","updated_at":"2025-07-05T08:36:24.902Z","avatar_url":"https://github.com/aperezdc.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"cflag\n=====\n\nInstallation\n------------\n\nWith [clib](https://github.com/clibs/clib):\n\n```sh\nclib install aperezdc/cflag\n```\n\nExample\n-------\n\n```c\n#include \"cflag.h\"\n\nint\nmain(int argc, char **argv)\n{\n    int requests = 5000;\n    int concurrency = 10;\n    bool verbose = false;\n    const char *url = \"https://perezdecastro.org\";\n\n    const struct cflag options[] = {\n        CFLAG(int, \"requests\", 'r', \u0026requests,\n            \"Number of total requests\"),\n        CFLAG(int, \"concurrency\", 0 /* no short option */, \u0026concurrency,\n            \"Number of concurrent requests\"),\n        CFLAG(bool, NULL /* no long option */, 'v', \u0026verbose,\n            \"Verbosely show progress\"),\n        CFLAG(string, \"url\", 'U', \u0026url,\n            \"Target URL\"),\n        CFLAG_HELP,\n        CFLAG_END\n    };\n\n    cflag_apply(options, \"[options] --url URL\", \u0026argc, \u0026argv);\n\n    return EXIT_SUCCESS;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faperezdc%2Fcflag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faperezdc%2Fcflag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faperezdc%2Fcflag/lists"}