{"id":19038731,"url":"https://github.com/heavywatal/clippson","last_synced_at":"2025-04-23T19:47:33.505Z","repository":{"id":82393865,"uuid":"148187799","full_name":"heavywatal/clippson","owner":"heavywatal","description":"📎 Helper library of clipp, C++ command-line parser","archived":false,"fork":false,"pushed_at":"2024-10-28T10:31:59.000Z","size":85,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T02:51:10.934Z","etag":null,"topics":["argument-parser","cpp11","header-only","json"],"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/heavywatal.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":"2018-09-10T16:44:56.000Z","updated_at":"2024-10-28T10:26:24.000Z","dependencies_parsed_at":"2024-01-28T16:26:35.859Z","dependency_job_id":"71e459da-38de-48b0-9913-b1d7269f8b30","html_url":"https://github.com/heavywatal/clippson","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavywatal%2Fclippson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavywatal%2Fclippson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavywatal%2Fclippson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavywatal%2Fclippson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heavywatal","download_url":"https://codeload.github.com/heavywatal/clippson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249352182,"owners_count":21255856,"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-parser","cpp11","header-only","json"],"created_at":"2024-11-08T22:09:09.077Z","updated_at":"2025-04-17T15:32:05.590Z","avatar_url":"https://github.com/heavywatal.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clippson\n\n[![Build status](https://github.com/heavywatal/clippson/workflows/build/badge.svg)](https://github.com/heavywatal/clippson/actions)\n\nThis is a helper library of [muellan/clipp](https://github.com/muellan/clipp), the awesome C++ command-line parser.\n\n- Support using [nlohmann/json](https://github.com/nlohmann/json) as a `boost::program_options::variables_map`-like object, which makes it possible to print all the variables at once to console/files in a computer-readable format.\n- Create a pair of `clipp::option` and `clipp::value` (as a `clipp::group`) with a doc string including its default value.\n- Use `std::sto***()` to validate arguments and convert strings.\n  A proper function is chosen for each `clipp::value` based on the type of its target variable.\n- Support comma separated values for vector targets, e.g., `-v 1,2,3`.\n- Support limiting choices of values.\n- Accept `=` as an optional separator of a flag and its value, e.g., `--longopt=value` is treated almost equally as `--longopt value`.\n- Support `CMake` building system.\n\n\n## Installation\n\nThe easiest way is to use [Homebrew](https://brew.sh/).\nThe following command installs tumopp and all the dependencies:\n```sh\nbrew install heavywatal/tap/clippson\n```\n\nAlternatively, you can get the source code from GitHub manually:\n```sh\ngit clone https://github.com/heavywatal/clippson.git\ncd clippson/\nDESTINATION=${HOME}/local\ncmake -S . -B build -DCMAKE_INSTALL_PREFIX=$DESTINATION\ncmake --build build -j2\ncmake --install build\n```\n\n`clippson.hpp` and the required headers, `clipp.h` and `json.hpp`, are installed to `${CMAKE_INSTALL_PREFIX}/include/clippson/`.\n\n## Usage\n\nAdd `#include \u003cclippson/clippson.hpp\u003e` to your source code.\nFunctions are defined in the namespace `clippson::`.\nThe required headers `clipp.h` and `json.hpp` are included therein, hence their functions are available in the original namespaces.\n\nSee [test/example.cpp](https://github.com/heavywatal/clippson/blob/master/test/example.cpp) for more details.\n\nThis library can be imported as a CMake package:\n```cmake\nfind_package(clippson REQUIRED)\ntarget_link_libraries(your_project PRIVATE clippson::clippson)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavywatal%2Fclippson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheavywatal%2Fclippson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavywatal%2Fclippson/lists"}