{"id":19882895,"url":"https://github.com/santerijps/clargs","last_synced_at":"2025-08-20T18:26:21.976Z","repository":{"id":44343998,"uuid":"510032719","full_name":"santerijps/clargs","owner":"santerijps","description":"A command line argument parsing library for the C programming language.","archived":false,"fork":false,"pushed_at":"2022-07-09T17:46:04.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T18:27:38.035Z","etag":null,"topics":["args-parser","c"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santerijps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-03T13:35:34.000Z","updated_at":"2022-07-13T10:48:01.000Z","dependencies_parsed_at":"2022-09-05T03:01:39.806Z","dependency_job_id":null,"html_url":"https://github.com/santerijps/clargs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santerijps%2Fclargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santerijps%2Fclargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santerijps%2Fclargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santerijps%2Fclargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santerijps","download_url":"https://codeload.github.com/santerijps/clargs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241311348,"owners_count":19942141,"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":["args-parser","c"],"created_at":"2024-11-12T17:18:52.252Z","updated_at":"2025-03-01T03:23:45.035Z","avatar_url":"https://github.com/santerijps.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clargs\n\n`clargs` is a command line argument parsing library for the C programming language. This library was inspired by the [Go flag](https://pkg.go.dev/flag) package. The flags currently support:\n\n- Booleans (`bool`)\n- Integers (`int`)\n- Strings (`char*`)\n\nFind usage information in the `examples` directory. The most important functions are shown below.\n\n```c\n// Initialize the parser\nFLAG_PARSER clargs_parser_new(int argc, char **argv);\n\n// Create flags\nFLAG* clargs_flag_new(FLAG_PARSER *parser, FLAG_TYPE type, const char *long_name, const char short_name, const char *description);\nFLAG* clargs_flag_new_bool(FLAG_PARSER *parser, const char *long_name, const char short_name, const char *description, bool default_value);\nFLAG* clargs_flag_new_int(FLAG_PARSER *parser, const char *long_name, const char short_name, const char *description, int default_value);\nFLAG* clargs_flag_new_str(FLAG_PARSER *parser, const char *long_name, const char short_name, const char *description, const char *default_value);\n\n// Parse the argv, map to flags\nCLARGS clargs_parse_args(FLAG_PARSER *parser);\n\n// Print the usage of the flags\nvoid clargs_print_flag_usage(FLAG_PARSER *parser, size_t indent);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanterijps%2Fclargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanterijps%2Fclargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanterijps%2Fclargs/lists"}