{"id":20153556,"url":"https://github.com/seqan/sharg-parser","last_synced_at":"2025-08-11T06:11:19.783Z","repository":{"id":37823909,"uuid":"429408087","full_name":"seqan/sharg-parser","owner":"seqan","description":"The modern argument parser for c++ tools ","archived":false,"fork":false,"pushed_at":"2025-04-07T09:45:13.000Z","size":1710,"stargazers_count":11,"open_issues_count":19,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-07T10:32:50.944Z","etag":null,"topics":["argument-parsing","command-line-parser","cpp","cpp20","modern-cpp"],"latest_commit_sha":null,"homepage":"https://docs.seqan.de/sharg","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seqan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-11-18T11:45:20.000Z","updated_at":"2025-04-07T09:45:17.000Z","dependencies_parsed_at":"2024-08-19T16:47:34.125Z","dependency_job_id":"5effd725-8b4d-45f9-945e-784378f9bb1f","html_url":"https://github.com/seqan/sharg-parser","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"seqan/app-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seqan%2Fsharg-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seqan%2Fsharg-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seqan%2Fsharg-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seqan%2Fsharg-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seqan","download_url":"https://codeload.github.com/seqan/sharg-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114964,"owners_count":21050146,"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":["argument-parsing","command-line-parser","cpp","cpp20","modern-cpp"],"created_at":"2024-11-13T23:19:42.309Z","updated_at":"2025-08-11T06:11:19.770Z","avatar_url":"https://github.com/seqan.png","language":"C++","readme":"# [![sharg_logo][sharg_logo_link]][sharg_link] Sharg -- hungrily eating away your arguments\n[![build status][ci_badge]][github_actions]\n[![codecov][codecov_badge]][codecov_link]\n[![license][copy_badge]][copy_link]\n[![platforms][api_badge]][api_link]\n[![twitter][twitter_badge]][twitter_link]\n\n\u003c!--\n    SPDX-FileCopyrightText: 2006-2025 Knut Reinert \u0026 Freie Universität Berlin\n    SPDX-FileCopyrightText: 2016-2025 Knut Reinert \u0026 MPI für molekulare Genetik\n    SPDX-License-Identifier: CC-BY-4.0\n--\u003e\n\n\u003c!--\n    Above uses reference-style links with numbers.\n    See also https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links.\n\n    For example, `[![build status][1]][2]` evaluates to the following:\n        `[link_text][2]`\n        `[2]` is a reference to a link, i.e. `[link_text](https://...)`\n\n        `[link_text]` = `[![build status][1]]`\n        `[1]` is once again a reference to a link - this time an image, i.e. `[![build status](https://...)]\n        `![build status]` is the text that should be displayed if the linked resource (`[1]`) is not available\n\n    `[![build status][1]][2]` hence means:\n    Show the picture linked under `[1]`. In case it cannot be displayed, show the text \"build status\" instead.\n    The picture, or alternative text, should link to `[2]`.\n--\u003e\n\n\u003c!-- Use the Sharg logo within the repository. ---\u003e\n[sharg_logo_link]: ./test/documentation/sharg_logo.svg \"Open documentation\"\n\u003c!-- Link the logo to the documentation website. ---\u003e\n[sharg_link]: https://docs.seqan.de/sharg.html\n\n\u003c!--\n    This is the CI badge image:\n        `https://img.shields.io/github/workflow/status/` - we do not use GitHub's badges as they are not customisable.\n        `/seqan/sharg-parser/` - owner/repository\n        `CI%20on%20Linux` - name of the workflow as encoded URL (e.g., whitespace = %20)\n        `main` - branch to show\n        `?style=flat\u0026logo=github` - use a GitHub-style badge\n        `\u0026label=sharg-parser%20CI` - text on the badge\n        `\"Open GitHub actions page\"` - this text will be shown on hover\n--\u003e\n[ci_badge]: https://img.shields.io/github/actions/workflow/status/seqan/sharg-parser/ci_linux.yml?branch=main\u0026style=flat\u0026logo=github\u0026label=Sharg%20CI \"Open GitHub actions page\"\n\u003c!--\n    This is the CI badge link:\n        `https://github.com/seqan/sharg-parser/actions` - actions page of owner(seqan)/repository(sharg-parser)\n        `?query=branch%3Amain` - only show actions that ran on the mater branch\n--\u003e\n[github_actions]: https://github.com/seqan/sharg-parser/actions?query=branch%3Amain\n\u003c!--\n    This is the Codecov badge image:\n        Codecov offers badges: https://app.codecov.io/gh/seqan/sharg-parser/settings/badge\n        While being logged in into Codecov, navigate to Settings-\u003eBadge and copy the markdown badge.\n        Copy the image part of the markdown badge here.\n    `\"Open Codecov page\"` - this text will be shown on hover\n--\u003e\n[codecov_badge]: https://codecov.io/gh/seqan/sharg-parser/branch/main/graph/badge.svg?token=KIdo8b91jb \"Open Codecov page\"\n\u003c!--\n    This is the Codecov badge link:\n        Codecov offers badges: https://app.codecov.io/gh/seqan/sharg-parser/settings/badge\n        While being logged in into Codecov, navigate to Settings-\u003eBadge and copy the markdown badge.\n        Copy the URL part of the markdown badge here.\n--\u003e\n[codecov_link]: https://codecov.io/gh/seqan/sharg-parser\n\n[copy_badge]: https://img.shields.io/badge/license-BSD-green.svg \"Open Copyright page\"\n\u003c!--\n    This is the Copyright badge link:\n        `\"Open Copyright page\"` - this text will be shown on hover\n--\u003e\n[copy_link]: https://docs.seqan.de/sharg/main_user/about_copyright.html\n\n[api_badge]: https://img.shields.io/badge/platform-linux%20%7C%20bsd%20%7C%20osx-informational.svg \"Read more about our API\"\n\u003c!--\n    This is the API badge link:\n        Redirects to seqan's copyright page.\n        `\"Read more about our API\"` - this text will be shown on hover\n--\u003e\n[api_link]: https://docs.seqan.de/sharg/main_user/about_api.html\n\n[twitter_badge]: https://img.shields.io/twitter/follow/SeqAnLib.svg?label=follow\u0026style=social \"Follow us on Twitter\"\n\u003c!--\n    This is the API badge link:\n        Redirects to seqan's copyright page.\n        `\"Follow us on Twitter\"` - this text will be shown on hover\n--\u003e\n[twitter_link]: https://twitter.com/seqanlib\n\nThe Sharg parser offers a neat and easy-to-use header-only library for argument parsing in C++. With Sharg, your command\nline interface can be customized to your specific needs and validated in a single line. Furthermore, the library provides\nhelpful templates and makes even subcommands feel effortless. For more information, details, and a tutorial on how to\nuse our features, please see our [online documentation](https://docs.seqan.de/sharg/main_user/index.html).\n\nIf you are working in the field of sequence analysis, we recommend using the\n[SeqAn3 library](https://github.com/seqan/seqan3), which offers a wide range of bioinformatics-related C++ features.\n\n## Sneak Peek:\n\nAn application with one option parsing an integer from the command line can be written in only 5 lines of code:\n\n\u003c!-- MARKDOWN-AUTO-DOCS:START (CODE:src=./test/snippet/readme_sneak_peek.cpp\u0026lines=7-19) --\u003e\n\u003c!-- The below code snippet is automatically added from ./test/snippet/readme_sneak_peek.cpp --\u003e\n```cpp\n#include \u003csharg/all.hpp\u003e\n\nint main(int argc, char ** argv)\n{\n    int val{};\n\n    sharg::parser parser{\"Eat-Me-App\", argc, argv};\n    parser.add_subsection(\"Eating Numbers\");\n    parser.add_option(val, sharg::config{.short_id = 'i', .long_id = \"int\", .description = \"Desc.\"});\n    parser.parse();\n\n    return 0;\n}\n```\n\u003c!-- MARKDOWN-AUTO-DOCS:END --\u003e\n\nDone. `val` is automatically filled with the value provided by `-i` or `--int`.\n\nYou also have a pretty help page and many more features:\n\n\u003c!-- MARKDOWN-AUTO-DOCS:START (CODE:src=./test/snippet/readme_sneak_peek.out\u0026header=user$ ./Eat-Me-App -h) --\u003e\n\u003c!-- The below code snippet is automatically added from ./test/snippet/readme_sneak_peek.out --\u003e\n```out\nuser$ ./Eat-Me-App -h\nEat-Me-App\n==========\n\nOPTIONS\n\n  Eating Numbers\n    -i, --int (signed 32 bit integer)\n          Desc. Default: 0\n\n  Common options\n    -h, --help\n          Prints the help page.\n    -hh, --advanced-help\n          Prints the help page including advanced options.\n    --version\n          Prints the version information.\n    --copyright\n          Prints the copyright/license information.\n    --export-help (std::string)\n          Export the help page information. Value must be one of [html, man,\n          ctd, cwl].\n    --version-check (bool)\n          Whether to check for the newest app version. Default: true\n\nVERSION\n    Last update:\n    Eat-Me-App version:\n    Sharg version: 1.2.0-rc.2\n```\n\u003c!-- MARKDOWN-AUTO-DOCS:END --\u003e\n\n## Dependencies\n\n|                   | requirement                                               | version  | comment                                     |\n|-------------------|-----------------------------------------------------------|----------|---------------------------------------------|\n|**compiler**       | [GCC](https://gcc.gnu.org)                                | ≥ 12     |                                             |\n|**compiler**       | [Clang](https://clang.llvm.org/)                          | ≥ 17     |                                             |\n|**build system**   | [CMake](https://cmake.org)                                | ≥ 3.16   | optional, but recommended                   |\n|**optional libs**  | [TDL](https://github.com/deNBI-cibi/tool_description_lib) | ≥ 1.0.0  | required for CWL and CTD export             |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseqan%2Fsharg-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseqan%2Fsharg-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseqan%2Fsharg-parser/lists"}