{"id":42298307,"url":"https://github.com/jurgen-kluft/ccmdline","last_synced_at":"2026-01-27T10:17:05.254Z","repository":{"id":57541335,"uuid":"52664420","full_name":"jurgen-kluft/ccmdline","owner":"jurgen-kluft","description":"cmdline library, parser","archived":false,"fork":false,"pushed_at":"2025-12-20T06:19:00.000Z","size":430,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T15:45:11.972Z","etag":null,"topics":["args","cmdline","options","parser","va-list"],"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/jurgen-kluft.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-02-27T11:52:40.000Z","updated_at":"2025-12-20T06:19:03.000Z","dependencies_parsed_at":"2025-05-19T12:26:23.260Z","dependency_job_id":"6b239d14-f389-4ce1-a3cd-64901209b982","html_url":"https://github.com/jurgen-kluft/ccmdline","commit_stats":{"total_commits":60,"total_committers":7,"mean_commits":8.571428571428571,"dds":0.6666666666666667,"last_synced_commit":"a2e13d125d8a00d69db19fb93026f5922812faad"},"previous_names":["jurgen-kluft/xcmdline"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jurgen-kluft/ccmdline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fccmdline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fccmdline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fccmdline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fccmdline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jurgen-kluft","download_url":"https://codeload.github.com/jurgen-kluft/ccmdline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fccmdline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28811584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"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":["args","cmdline","options","parser","va-list"],"created_at":"2026-01-27T10:17:04.563Z","updated_at":"2026-01-27T10:17:05.248Z","avatar_url":"https://github.com/jurgen-kluft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Command Line\n\nA library to parse the command line.\n\n## ccmdline, a cmdline library\n\nA hand-written cmdline arguments parser using va_list_t from cbase library.\n\nNote: Currently can only handle command-line in ASCII/UTF-8 encoding.\n\n## Example\n\n```c++\ns32 prop_month = 0;\ns32 prop_day = 0;\ns32 prop_year = 0;\nncore::cli::argv argv[] = {\n    ncore::cli::argv(\"m\", \"month\", \"Month\", ncore::cli::Required, va_t(\u0026prop_month)),\n    ncore::cli::argv(\"d\", \"day\", \"Day\", ncore::cli::Required, va_t(\u0026prop_day)),\n    ncore::cli::argv(\"y\", \"year\", \"Year\", ncore::cli::Required, va_t(\u0026prop_year)),\n    ncore::cli::argv::nil\n};\n\nncore::cli::cmdline c;\nc.parse(argv, \"--month 8 --day 12 -y 2020\");\n```\n\n## Command based\n\nWe want another indirection which is identical to git, e.g.:\n\n* git add\n* git commit\n* git push\n\nIntroducing commands where every command has a list of arguments:\n\n```c++\nconst char* prop_commit_msg = nullptr;\nncore::cli::cmd cmds[] = {\n    {\n        \"add\",\n        {\n            ncore::cli::argv(\"m\", \"month\", \"Month\", ncore::cli::Required, va_t(\u0026prop_month)),\n            ncore::cli::argv(\"d\", \"day\", \"Day\", ncore::cli::Required, va_t(\u0026prop_day)),\n            ncore::cli::argv(\"y\", \"year\", \"Year\", ncore::cli::Required, va_t(\u0026prop_year)),\n            ncore::cli::argv::nil\n        }\n    },\n    {\n        \"commit\",\n        {\n            ncore::cli::argv(\"m\", \"message\", \"Message\", ncore::cli::Required, va_t(\u0026prop_commit_msg)),\n            ncore::cli::argv::nil\n        }\n    }\n};\n\nncore::cli::cmdline c;\nncore::cli::cmd* cmd = c.parse(cmds, \"commit -m `this is our first commit`\");\n\n```\n\nCommands are searched, so this means that if you only have the 2 above commands you can differentiate between them\njust by a 'a' and a 'c', so this would work:\n\n* git a\n* git c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fccmdline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjurgen-kluft%2Fccmdline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fccmdline/lists"}