{"id":22344063,"url":"https://github.com/jacopodl/argsx","last_synced_at":"2026-04-27T21:32:10.311Z","repository":{"id":75614295,"uuid":"12613293","full_name":"jacopodl/ArgsX","owner":"jacopodl","description":"Command line option parser","archived":false,"fork":false,"pushed_at":"2017-12-09T15:04:15.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T10:12:25.854Z","etag":null,"topics":["argsx","c","cli","console","cpp","option-parser","options"],"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/jacopodl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-05T08:45:20.000Z","updated_at":"2023-02-16T02:16:04.000Z","dependencies_parsed_at":"2023-06-07T02:45:33.147Z","dependency_job_id":null,"html_url":"https://github.com/jacopodl/ArgsX","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacopodl/ArgsX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacopodl%2FArgsX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacopodl%2FArgsX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacopodl%2FArgsX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacopodl%2FArgsX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacopodl","download_url":"https://codeload.github.com/jacopodl/ArgsX/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacopodl%2FArgsX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32356598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["argsx","c","cli","console","cpp","option-parser","options"],"created_at":"2024-12-04T09:07:54.625Z","updated_at":"2026-04-27T21:32:10.294Z","avatar_url":"https://github.com/jacopodl.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://img.shields.io/badge/Language-C-orange.svg)\n![](https://img.shields.io/badge/version-1.7.0-green.svg)\n[![GPLv3 License](https://img.shields.io/badge/license-GPL3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0.html)\n\n\n# ArgsX #\nArgsx is a easy to use command line option parser for C/C++ that support long and short option formats.\n\n# Overview #\n## Long option interface ##\n```c++\nstruct ax_lopt {\n    char *name;\t// Option\n    int args;\t// Required parameter ?\n    char opt;\t// Return value\n}\n\nstruct ax_lopt longOpt[] = {{\"one\", ARGSX_NOARG, 1},\n\t\t\t    {\"two\", ARGSX_REQ_ARG, 2},\n\t\t\t    {\"three\", ARGSX_NOARG, 't'}};\n```\n## Short option ##\nShort option required string formatted in this way:\n1. Single character like 'l' -\u003e Option that dosn't require additional parameter.\n1. Single character followed by ! like 't!' -\u003e Option that require additional parameter.\n\nFor example, if your program require options 'a','b','c' without parameter and option 't' and 'e' with parameter you can write string like this: \"abct!e!\".\n\n## ArgsX function ##\n```c++\n    int ArgsX(\n\tint argc,                   // argc parameter\n\tchar **argv,                // argv parameter\n\tchar *opt,                  // pointer to short options string\n\tax_lopt *lopt,              // pointer to long options struct\n\tunsigned short lopt_size,   // size of long options struct\n\tchar tr                     // Trigger char Eg: '-'\n\t);\n```\n## Put all together ##\n```c++\nstruct ax_lopt longOpt[] = {{\"one\", ARGSX_NOARG, 1},\n\t\t\t    {\"two\", ARGSX_REQ_ARG, 2},\n\t\t\t    {\"three\", ARGSX_NOARG, 't'}};\n    int opt;\n    while((opt = ArgsX(argc, argv, \"abct!e!\", longOpt, sizeof(longOpt), '-')) != -1)\n    {\n      switch(opt)\n      {\n      \tcase 1:\n\t// --one\n\tbreak;\n\tcase 2:\n\t// --two\n\tbreak;\n        case 'a':\n        break;\n\tcase 'b':\n        break;\n        case 't':\n        // -t or --three\n        break;\n        case ARGSX_BAD_OPT:\n        break;\n        case ARGSX_FEW_ARGS:\n        break;\n        case ARGSX_NONOPT:\n        break;\n      }\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacopodl%2Fargsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacopodl%2Fargsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacopodl%2Fargsx/lists"}