{"id":13440684,"url":"https://github.com/cofyc/argparse","last_synced_at":"2025-05-16T15:03:48.285Z","repository":{"id":2686288,"uuid":"3678971","full_name":"cofyc/argparse","owner":"cofyc","description":"Command-line arguments parsing library.","archived":false,"fork":false,"pushed_at":"2024-07-15T02:10:57.000Z","size":126,"stargazers_count":729,"open_issues_count":20,"forks_count":127,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-16T15:03:31.517Z","etag":null,"topics":["argparse","argument-parsing","c","cli"],"latest_commit_sha":null,"homepage":"","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/cofyc.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":"2012-03-10T11:05:34.000Z","updated_at":"2025-05-16T11:49:10.000Z","dependencies_parsed_at":"2024-01-14T15:24:17.508Z","dependency_job_id":"73327717-b306-4f1e-95c5-80652bc96623","html_url":"https://github.com/cofyc/argparse","commit_stats":{"total_commits":104,"total_committers":20,"mean_commits":5.2,"dds":"0.27884615384615385","last_synced_commit":"682d4520b4bc2b646cdfcf078b2fed00b3d2da30"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofyc%2Fargparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofyc%2Fargparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofyc%2Fargparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofyc%2Fargparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cofyc","download_url":"https://codeload.github.com/cofyc/argparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553937,"owners_count":22090416,"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":["argparse","argument-parsing","c","cli"],"created_at":"2024-07-31T03:01:25.141Z","updated_at":"2025-05-16T15:03:48.226Z","avatar_url":"https://github.com/cofyc.png","language":"C","readme":"# argparse\n\n[![Build Status](https://github.com/cofyc/argparse/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/cofyc/argparse/actions/workflows/ci.yaml)\n\nargparse - A command line arguments parsing library in C (compatible with C++).\n\n## Description\n\nThis module is inspired by parse-options.c (git) and python's argparse\nmodule.\n\nArguments parsing is common task in cli program, but traditional `getopt`\nlibraries are not easy to use. This library provides high-level arguments\nparsing solutions.\n\nThe program defines what arguments it requires, and `argparse` will figure\nout how to parse those out of `argc` and `argv`, it also automatically\ngenerates help and usage messages and issues errors when users give the\nprogram invalid arguments.\n\n## Features\n\n - handles both optional and positional arguments\n - produces highly informative usage messages\n - issues errors when given invalid arguments\n\nThere are basically three types of options:\n\n - boolean options\n - options with mandatory argument\n - options with optional argument\n\nThere are basically two forms of options:\n\n - short option consist of one dash (`-`) and one alphanumeric character.\n - long option begin with two dashes (`--`) and some alphanumeric characters.\n\nShort options may be bundled, e.g. `-a -b` can be specified as `-ab`.\n\nOptions are case-sensitive.\n\nOptions and non-option arguments can clearly be separated using the `--` option.\n\n## Examples\n\n- [basic](tests/basic.c)\n- [subcommands](tests/subcommands.c)\n","funding_links":[],"categories":["C","Utilities","公用事业"],"sub_categories":["YAML"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofyc%2Fargparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcofyc%2Fargparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofyc%2Fargparse/lists"}