{"id":26621531,"url":"https://github.com/dead-tech/argparse-cpp","last_synced_at":"2026-05-05T18:40:47.394Z","repository":{"id":42173357,"uuid":"474619981","full_name":"dead-tech/argparse-cpp","owner":"dead-tech","description":"Argument Parser in C++ inspired by python's argparse module","archived":false,"fork":false,"pushed_at":"2023-03-25T18:23:53.000Z","size":1195,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T03:31:52.001Z","etag":null,"topics":["catch2","clang-format","cmake","conan","cpp","github-actions","mdbook","pre-commit"],"latest_commit_sha":null,"homepage":"https://dead-tech.github.io/argparse-cpp","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/dead-tech.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-27T11:40:52.000Z","updated_at":"2022-08-02T09:03:15.000Z","dependencies_parsed_at":"2025-10-09T03:30:53.544Z","dependency_job_id":"cee6a3f2-4502-42b2-afba-e64f2e2e7c49","html_url":"https://github.com/dead-tech/argparse-cpp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dead-tech/argparse-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead-tech%2Fargparse-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead-tech%2Fargparse-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead-tech%2Fargparse-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead-tech%2Fargparse-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dead-tech","download_url":"https://codeload.github.com/dead-tech/argparse-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead-tech%2Fargparse-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32663435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["catch2","clang-format","cmake","conan","cpp","github-actions","mdbook","pre-commit"],"created_at":"2025-03-24T09:17:02.008Z","updated_at":"2026-05-05T18:40:47.372Z","avatar_url":"https://github.com/dead-tech.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/dead-tech/argparse-cpp/actions/workflows/linux.yml/badge.svg)\n![Deploy Status](https://github.com/dead-tech/argparse-cpp/actions/workflows/deploy.yml/badge.svg)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/dead-tech/argparse-cpp/main.svg)](https://results.pre-commit.ci/latest/github/dead-tech/argparse-cpp/main)\n# argparse-cpp\n\nArgument Parser in C++ inspired by python's argparse module.\n\n## Table of contents\n   * [Basic Example](#example)\n   * [Quickstart](#quickstart)\n      * [Conan](#using-conan-package-manager)\n      * [Source Code](#download-source-code-from-latest-release)\n      * [Header File](#downloading-the-header-file)\n      * [Clone Repo](#cloning-the-repo)\n   * [Documentation](#documentation)\n   * [Testing](#testing)\n   * [License](#license)\n\n## Example\n\nSimple example program that emulates an hypothetically compiler CLI.\n\n```cpp\n#include \u003cargparse/argparse.hpp\u003e\n#include \u003cfstream\u003e\n#include \u003ciostream\u003e\n#include \u003csstream\u003e\n\nint main(int argc, const char **argv)\n{\n    argparse::ArgumentParser parser(argc, argv);\n\n   parser.add_argument(\"files\")\n         .set_type(argparse::ArgTypes::STRING)\n         .set_default(\"test.txt\")\n         .set_help(\"Paths to the files to compile\")\n         .set_flags(argparse::ArgFlags::REQUIRED)\n         .set_metavar(\"FILE_PATH\")\n         .set_nargs('+');\n\n   parser.add_argument(\"--release\", \"-R\")\n         .set_type(argparse::ArgTypes::BOOL)\n         .set_help(\"Build in release version\");\n\n   const auto args = parser.parse_args();\n\n   const auto files = args.at(\"files\").as\u003cstd::vector\u003cstd::string\u003e\u003e();\n   const auto is_release = args.at(\"--release\").as\u003cbool\u003e();\n\n   const auto result = build_files(files, is_release);\n}\n```\n\n## Quickstart\n\n### Using conan package manager\n\n**Starting from release [v0.1.0](https://github.com/dead-tech/argparse-cpp/releases/tag/v0.1.0) it is possible to use conan to install the header only library from the artifactory remote.**\n\n- Create a simple conanfile.txt in the root of your project\n\n   ```txt\n   [requires]\n     argparse-cpp/0.1.1@dead/stable\n\n   [generators]\n     cmake\n   ```\n\n- Move into directory where you want to build your project\n\n   ```bash\n   $ cd \u003cbuild-dir\u003e\n   ```\n\n- Add the artifactory remote to your conan profile\n\n   ```bash\n   $ conan remote add argparse-cpp https://argparsecpp.jfrog.io/artifactory/api/conan/argparse-cpp-conan-local\n   ```\n\n- Run conan install\n\n   ```bash\n   $ conan install .. -r argparse-cpp\n   ```\n\n### Download source code from latest release\n\nClick on the releases header on the right side of the GitHub page or navigate [here](https://github.com/dead-tech/argparse-cpp/releases).\n\nScroll down to the assets section and download the source code (zip or tar.gz).\n### Downloading the header file\n\n- Get the file through wget\n   ```bash\n   $ wget https://raw.githubusercontent.com/dead-tech/argparse-cpp/main/include/argparse/argparse.hpp\n   ```\n\n### Cloning the repo\n\n- Clone the repo\n   ```bash\n   $ git clone https://github.com/dead-tech/argparse-cpp.git\n   $ cd argparse-cpp\n   ```\n- Move the header file\n   ```bash\n   $ mv include/argparse.hpp \u003cyour-project-include-path\u003e\n   ```\n\n## Documentation\n\nDocumentation can be found [here](dead-tech.github.io/argparse-cpp).\n\n## Testing\n\nThis project uses catch2 as a testing framework.\n\nAll the available tests can be found [here](tests/).\n\nThe following steps are what is required to run the test suite.\n\n```bash\n$ git clone https://github.com/dead-tech/argparse-cpp.git\n$ cd argparse-cpp\n$ mkdir build \u0026\u0026 cd build\n$ conan install ..\n$ cmake .. \u0026\u0026 make\n$ ./argparse-cpp_tests\n```\n\nIf these steps do not work properly for you see the [official docs](https://dead-tech.github.io/argparse-cpp/user_guide/running_tests.html).\n\n## License\n\nThe project is licensed under MIT License (see [LICENSE](LICENSE)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdead-tech%2Fargparse-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdead-tech%2Fargparse-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdead-tech%2Fargparse-cpp/lists"}