{"id":19046408,"url":"https://github.com/wallix/program_options","last_synced_at":"2026-06-13T20:05:42.019Z","repository":{"id":36304339,"uuid":"40608947","full_name":"wallix/program_options","owner":"wallix","description":"Parse command-line options","archived":false,"fork":false,"pushed_at":"2017-03-23T14:52:14.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-21T23:48:01.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wallix.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}},"created_at":"2015-08-12T15:36:55.000Z","updated_at":"2016-02-10T14:09:41.000Z","dependencies_parsed_at":"2022-09-04T20:00:39.037Z","dependency_job_id":null,"html_url":"https://github.com/wallix/program_options","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wallix/program_options","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fprogram_options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fprogram_options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fprogram_options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fprogram_options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wallix","download_url":"https://codeload.github.com/wallix/program_options/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fprogram_options/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34298269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-08T22:54:41.235Z","updated_at":"2026-06-13T20:05:41.992Z","avatar_url":"https://github.com/wallix.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Parse command-line options (C++11).\n\n\n# Examples\n\n```c++\nint main(int ac, char ** av) {\n    namespace po = program_options;\n\n    std::string in;\n\n    po::options_description desc({\n        {'v', \"verbose\", \"For more verbose basic debugging\"},\n        {\"no-message\", \"Suppress error\"},\n        {'a', \"Build all targets\"},\n        {'x', \"xxx\", \"\"/*no desciption*/},\n        {\"in\", \u0026in, \"input file\"},\n    });\n\n    auto map = po::parse_command_line(ac, av, desc);\n\n    if (!map.count(\"in\")) {\n        std::cerr \u003c\u003c \"blah blah\\n\\n\" \u003c\u003c desc;\n        return 1;\n    }\n\n    std::cout \u003c\u003c \"in: \" \u003c\u003c in \u003c\u003c \"\\n\";\n\n    ...\n\n    return 0;\n}\n\n```\n\n\n# Exceptions\n\n- `program_options::unknown_option`\n- `program_options::invalid_option_value`\n- `program_options::invalid_command_line_syntax`\n\n\n# Tests\n\n`$ bjam test_program_options`\n\n\n# Install libraries\n\n`$ bjam install`\n\nor\n\n`$ bjam install link=static`\n\n\nThis command make two directories: `lib` and `include/program_options`.\n\nPaths configurable with `LIB_PREFIX` and `INCLUDE_PREFIX` variables environment.\n\n`$ LIB_PREFIX=/usr/local/lib INCLUDE_PREFIX=/usr/local/include/program_options bjam install`\n\n\n# Package\n\nWith Wallix packager (https://github.com/wallix/packager).\n\n`$ $PACKAGER_PROJECT/packager.py --version 1.0 --no-entry-changelog`\n\n`$ dpkg-buildpackage -I.git -Ibin -uc -us`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallix%2Fprogram_options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwallix%2Fprogram_options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallix%2Fprogram_options/lists"}