{"id":20618791,"url":"https://github.com/anthhon/proargs","last_synced_at":"2026-04-16T21:34:49.362Z","repository":{"id":239828389,"uuid":"799949101","full_name":"Anthhon/proargs","owner":"Anthhon","description":"Single header arguments parser library for C.","archived":false,"fork":false,"pushed_at":"2024-05-14T19:18:34.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T19:44:34.922Z","etag":null,"topics":[],"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/Anthhon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-05-13T12:16:55.000Z","updated_at":"2024-05-14T19:18:37.000Z","dependencies_parsed_at":"2024-05-15T17:19:43.147Z","dependency_job_id":"fa5db48a-9fb6-425f-9f30-1e2299e5be89","html_url":"https://github.com/Anthhon/proargs","commit_stats":null,"previous_names":["anthhon/proargs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Anthhon/proargs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anthhon%2Fproargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anthhon%2Fproargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anthhon%2Fproargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anthhon%2Fproargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anthhon","download_url":"https://codeload.github.com/Anthhon/proargs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anthhon%2Fproargs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31905821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-16T12:09:30.768Z","updated_at":"2026-04-16T21:34:49.339Z","avatar_url":"https://github.com/Anthhon.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProArgs\n\nProArgs is a lightweight single-header library written in C for parsing command-line arguments. It provides a simple interface for checking the presence of specific arguments in the command-line input without getting in your way.\n\n## Features\n\n- Supports parsing of long and short arguments prefixed with `-` or `--`.\n- Provides an intuitive interface for checking argument presence.\n- Easy to integrate into existing C projects.\n\n## Usage\n\nTo use ProArgs in your project, simply include the `proargs.h` header file in your project folder and link it with your source code.\n\n```c\n#include \"proargs.h\"\n```\n\n## Examples\n\n```c\n#include \u003cstdio.h\u003e\n#include \"proargs.h\"\n\nint main(int argc, char *argv[]) {\n    int verbose_flag = 0;\n\n    if (argc \u003c 2) {\n        printf(\"Usage: %s \u003cargument\u003e\\n\", argv[0]);\n        return 1;\n    }\n\n    // Check for the '--verbose' flag\n    if (pa_arg_check(argv[1], \"verbose\", PA_LONG_ARG)) {\n        verbose_flag = 1;\n        printf(\"Verbose mode enabled.\\n\");\n    }\n\n    return 0;\n}\n```\n\nIn this example, the program checks if the command-line argument is `--verbose`, indicating that verbose mode should be enabled.\n\n```c\n#include \u003cstdio.h\u003e\n#include \"proargs.h\"\n\nint main(int argc, char *argv[])\n{\n    if (argc \u003c 3) {\n        printf(\"Usage: %s [-v]\\n\", argv[0]);\n        return 1;\n    }\n\n    int value = 0;\n    int verbose = 0;\n    for (int i = 0; i \u003c argc; ++i) {\n        if (pa_arg_check(argv[i], \"value\", PA_LONG_ARG)) {\n            value = atoi(pa_arg_val(argv, i));\n            printf(\"value = %s\\n\", value);\n        }\n        if (pa_arg_check(argv[i], \"verbose\", PA_LONG_SHORT_ARG)) {\n            verbose = 1;\n        }\n    }\n\n    return 0;\n}\n```\n\nIn this case a loop is used together with the 'pa_arg_val' macro to get the '--value' argument value, which should be the next argument, and also get a verbose flag argument.\n\n## License\n\nThis library is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details. Feel free to customize it further to better fit your project's needs or to send improvements PR's!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthhon%2Fproargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthhon%2Fproargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthhon%2Fproargs/lists"}