{"owner":"CLIUtils","repo":"CLI11","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# CLI11 Agent Guide\n\nHeader-only C++11 command line parser library. CMake is the primary build\nsystem; Meson and Bazel are also supported.\n\n## Quick Build & Test\n\nUse presets. The `dev` workflow is the fastest for iteration; use `default`\nbefore a push to verify the primary header-only mode.\n\n```bash\n# Fast iteration (precompiled lib, no examples, ccache; configure + build + test)\ncmake --workflow dev\n\n# Full header-only build, matches CI (configure + build + test)\ncmake --workflow default\n\n# Or step by step\ncmake --preset dev\ncmake --build --preset dev\nctest --preset dev\n```\n\nThe `dev` preset uses `ccache`; install it (`brew install ccache`) or override\nwith `cmake --preset dev -DCMAKE_CXX_COMPILER_LAUNCHER=`.\n\n## Running a Single Test\n\nTests are individual Catch2 executables in `build-dev/tests/` (`dev` preset) or\n`build/tests/` (`default` preset).\n\n```bash\n# Run one test executable directly\n./build-dev/tests/AppTest\n\n# Or via CTest with a regex\nctest --preset dev -R AppTest\n```\n\n## Key CMake Options\n\n| Option                     | Default                 | Purpose                                 |\n| -------------------------- | ----------------------- | --------------------------------------- |\n| `CLI11_BUILD_TESTS`        | `ON` (if top-level)     | Build Catch2 test suite                 |\n| `CLI11_BUILD_EXAMPLES`     | `ON` (if top-level)     | Build `examples/`                       |\n| `CLI11_BUILD_DOCS`         | `ON` (if Doxygen found) | Build Doxygen docs                      |\n| `CLI11_SINGLE_FILE`        | `OFF`                   | Generate single `CLI11.hpp` header      |\n| `CLI11_PRECOMPILED`        | `OFF`                   | Build static lib instead of header-only |\n| `CLI11_WARNINGS_AS_ERRORS` | `OFF`                   | Turn warnings into errors               |\n| `CLI11_SANITIZERS`         | `OFF`                   | Enable ASan/TSan/UBSan                  |\n| `CLI11_BOOST`              | `OFF`                   | Enable Boost.Optional tests             |\n| `CLI11_CUDA_TESTS`         | `OFF`                   | Compile tests with NVCC                 |\n\n`CLI11_SINGLE_FILE` and `CLI11_PRECOMPILED` are mutually exclusive.\n\n## Presets\n\n- `default` — Debug, Ninja, `CLI11_WARNINGS_AS_ERRORS=ON`, export compile\n  commands.\n- `dev` — Inherits `default`, adds `CLI11_PRECOMPILED=ON`,\n  `CLI11_BUILD_EXAMPLES=OFF`, and `ccache`. An edit to `impl/*_inl.hpp` only\n  rebuilds the static library, not every test.\n- `tidy` — Inherits `default`, adds `clang-tidy` with warnings-as-errors. Uses\n  precompiled mode, so each `impl/*_inl.hpp` header is analyzed once (in\n  `src/Precompile.cpp`) instead of in every test and example.\n- `iwyu` — Inherits `default`, runs `include-what-you-use`. Also precompiled,\n  with tests and examples off, so `src/Precompile.cpp` is the only translation\n  unit and each header is reported once.\n\n```bash\ncmake --preset tidy\ncmake --build --preset tidy\n```\n\n## Include-what-you-use\n\n`brew install include-what-you-use`, then `cmake --preset iwyu` and\n`cmake --build --preset iwyu`. The build always succeeds and IWYU writes its\nadvice to stderr. Nothing enforces it, so read the report and apply what is\ncorrect, with these exceptions:\n\n- Only act on a removal that both standard libraries agree on; take an addition\n  from either. macOS asks to remove the `<iterator>` includes that Linux needs.\n- Keep both `<filesystem>` includes. `Macros.hpp` needs it before the\n  `__cpp_lib_filesystem` check, and `Validators.hpp` guards its one with\n  `#if CLI11_HAS_FILESYSTEM`.\n- Ignore the \"should add\" lines for `CLI/CLI.hpp` (an artifact of the private\n  pragma in each header), `<version>`, `<AvailabilityInternal.h>`, and `<math>`.\n\n`scripts/iwyu.imp` maps the detail headers a standard library asks for to the\nC++ header CLI11 should use; read the comment at its top before you add an\nentry. It covers both standard libraries, so check Linux after a change:\n\n```bash\ndocker run --rm -v \"$PWD:/src:ro\" debian:trixie sh -c '\n  apt-get update -qq && apt-get install -y -qq iwyu cmake ninja-build g++ &&\n  cp -r /src /work && rm -rf /work/build* && cd /work &&\n  cmake --preset iwyu >/dev/null && cmake --build --preset iwyu'\n```\n\n## Single Header Generation\n\nRequires Python. Enable with `CLI11_SINGLE_FILE=ON`:\n\n```bash\ncmake -S . -B build -DCLI11_SINGLE_FILE=ON\ncmake --build build --target CLI11-generate-single-file\n# Output: build/single-include/CLI11.hpp\n```\n\nScript: `scripts/MakeSingleHeader.py`.\n\n## Library Structure\n\n- `include/CLI/` — Public headers. The umbrella header is `CLI.hpp`.\n- `include/CLI/impl/` — `_inl.hpp` implementation headers included by the main\n  headers.\n- `src/` — `.cpp` files used **only** when `CLI11_PRECOMPILED=ON`.\n- `single-include/` — CMake rules for the single-header build.\n- `tests/` — Catch2 tests. `main.cpp` + `catch.hpp` provide the test runner.\n- `tests/data/` — Test data files copied to the build dir automatically.\n- `examples/` — Standalone example programs.\n- `book/` — Extra documentation/examples built only when top-level.\n\n## Testing Notes\n\n- Catch2 is auto-downloaded (v2.13.10 header) if not found on the system. Both\n  Catch2 v2 and v3 are supported.\n- Some tests launch helper applications (`ensure_utf8`, `ensure_utf8_twice`)\n  built from `tests/applications/`.\n- `FuzzFailTest` requires C++17.\n- `WindowsTest` is only built on Windows.\n- `DeprecatedTest` compiles with `-Wno-deprecated-declarations`.\n- `TimerTest` is in `CLI11_MULTIONLY_TESTS` (exercises multi-threading).\n\n## Code Style & Linting\n\nPre-commit hooks are configured in `.pre-commit-config.yaml`:\n\n- `clang-format` for C++/C/CUDA\n- `cmake-format` for CMake\n- `black` for Python\n- `prettier` for YAML/Markdown/JSON/etc.\n- `codespell` for typos\n- `markdownlint-cli2`\n- Custom checks: disallow a few common mistakes Run locally:\n\n```bash\nprek -a\n```\n\n## Version Source of Truth\n\nThe version string is read from `include/CLI/Version.hpp` at configure time. Do\nnot edit project version in `CMakeLists.txt`.\n"},"files":{"AGENTS.md":"# CLI11 Agent Guide\n\nHeader-only C++11 command line parser library. CMake is the primary build\nsystem; Meson and Bazel are also supported.\n\n## Quick Build & Test\n\nUse presets. The `dev` workflow is the fastest for iteration; use `default`\nbefore a push to verify the primary header-only mode.\n\n```bash\n# Fast iteration (precompiled lib, no examples, ccache; configure + build + test)\ncmake --workflow dev\n\n# Full header-only build, matches CI (configure + build + test)\ncmake --workflow default\n\n# Or step by step\ncmake --preset dev\ncmake --build --preset dev\nctest --preset dev\n```\n\nThe `dev` preset uses `ccache`; install it (`brew install ccache`) or override\nwith `cmake --preset dev -DCMAKE_CXX_COMPILER_LAUNCHER=`.\n\n## Running a Single Test\n\nTests are individual Catch2 executables in `build-dev/tests/` (`dev` preset) or\n`build/tests/` (`default` preset).\n\n```bash\n# Run one test executable directly\n./build-dev/tests/AppTest\n\n# Or via CTest with a regex\nctest --preset dev -R AppTest\n```\n\n## Key CMake Options\n\n| Option                     | Default                 | Purpose                                 |\n| -------------------------- | ----------------------- | --------------------------------------- |\n| `CLI11_BUILD_TESTS`        | `ON` (if top-level)     | Build Catch2 test suite                 |\n| `CLI11_BUILD_EXAMPLES`     | `ON` (if top-level)     | Build `examples/`                       |\n| `CLI11_BUILD_DOCS`         | `ON` (if Doxygen found) | Build Doxygen docs                      |\n| `CLI11_SINGLE_FILE`        | `OFF`                   | Generate single `CLI11.hpp` header      |\n| `CLI11_PRECOMPILED`        | `OFF`                   | Build static lib instead of header-only |\n| `CLI11_WARNINGS_AS_ERRORS` | `OFF`                   | Turn warnings into errors               |\n| `CLI11_SANITIZERS`         | `OFF`                   | Enable ASan/TSan/UBSan                  |\n| `CLI11_BOOST`              | `OFF`                   | Enable Boost.Optional tests             |\n| `CLI11_CUDA_TESTS`         | `OFF`                   | Compile tests with NVCC                 |\n\n`CLI11_SINGLE_FILE` and `CLI11_PRECOMPILED` are mutually exclusive.\n\n## Presets\n\n- `default` — Debug, Ninja, `CLI11_WARNINGS_AS_ERRORS=ON`, export compile\n  commands.\n- `dev` — Inherits `default`, adds `CLI11_PRECOMPILED=ON`,\n  `CLI11_BUILD_EXAMPLES=OFF`, and `ccache`. An edit to `impl/*_inl.hpp` only\n  rebuilds the static library, not every test.\n- `tidy` — Inherits `default`, adds `clang-tidy` with warnings-as-errors. Uses\n  precompiled mode, so each `impl/*_inl.hpp` header is analyzed once (in\n  `src/Precompile.cpp`) instead of in every test and example.\n- `iwyu` — Inherits `default`, runs `include-what-you-use`. Also precompiled,\n  with tests and examples off, so `src/Precompile.cpp` is the only translation\n  unit and each header is reported once.\n\n```bash\ncmake --preset tidy\ncmake --build --preset tidy\n```\n\n## Include-what-you-use\n\n`brew install include-what-you-use`, then `cmake --preset iwyu` and\n`cmake --build --preset iwyu`. The build always succeeds and IWYU writes its\nadvice to stderr. Nothing enforces it, so read the report and apply what is\ncorrect, with these exceptions:\n\n- Only act on a removal that both standard libraries agree on; take an addition\n  from either. macOS asks to remove the `<iterator>` includes that Linux needs.\n- Keep both `<filesystem>` includes. `Macros.hpp` needs it before the\n  `__cpp_lib_filesystem` check, and `Validators.hpp` guards its one with\n  `#if CLI11_HAS_FILESYSTEM`.\n- Ignore the \"should add\" lines for `CLI/CLI.hpp` (an artifact of the private\n  pragma in each header), `<version>`, `<AvailabilityInternal.h>`, and `<math>`.\n\n`scripts/iwyu.imp` maps the detail headers a standard library asks for to the\nC++ header CLI11 should use; read the comment at its top before you add an\nentry. It covers both standard libraries, so check Linux after a change:\n\n```bash\ndocker run --rm -v \"$PWD:/src:ro\" debian:trixie sh -c '\n  apt-get update -qq && apt-get install -y -qq iwyu cmake ninja-build g++ &&\n  cp -r /src /work && rm -rf /work/build* && cd /work &&\n  cmake --preset iwyu >/dev/null && cmake --build --preset iwyu'\n```\n\n## Single Header Generation\n\nRequires Python. Enable with `CLI11_SINGLE_FILE=ON`:\n\n```bash\ncmake -S . -B build -DCLI11_SINGLE_FILE=ON\ncmake --build build --target CLI11-generate-single-file\n# Output: build/single-include/CLI11.hpp\n```\n\nScript: `scripts/MakeSingleHeader.py`.\n\n## Library Structure\n\n- `include/CLI/` — Public headers. The umbrella header is `CLI.hpp`.\n- `include/CLI/impl/` — `_inl.hpp` implementation headers included by the main\n  headers.\n- `src/` — `.cpp` files used **only** when `CLI11_PRECOMPILED=ON`.\n- `single-include/` — CMake rules for the single-header build.\n- `tests/` — Catch2 tests. `main.cpp` + `catch.hpp` provide the test runner.\n- `tests/data/` — Test data files copied to the build dir automatically.\n- `examples/` — Standalone example programs.\n- `book/` — Extra documentation/examples built only when top-level.\n\n## Testing Notes\n\n- Catch2 is auto-downloaded (v2.13.10 header) if not found on the system. Both\n  Catch2 v2 and v3 are supported.\n- Some tests launch helper applications (`ensure_utf8`, `ensure_utf8_twice`)\n  built from `tests/applications/`.\n- `FuzzFailTest` requires C++17.\n- `WindowsTest` is only built on Windows.\n- `DeprecatedTest` compiles with `-Wno-deprecated-declarations`.\n- `TimerTest` is in `CLI11_MULTIONLY_TESTS` (exercises multi-threading).\n\n## Code Style & Linting\n\nPre-commit hooks are configured in `.pre-commit-config.yaml`:\n\n- `clang-format` for C++/C/CUDA\n- `cmake-format` for CMake\n- `black` for Python\n- `prettier` for YAML/Markdown/JSON/etc.\n- `codespell` for typos\n- `markdownlint-cli2`\n- Custom checks: disallow a few common mistakes Run locally:\n\n```bash\nprek -a\n```\n\n## Version Source of Truth\n\nThe version string is read from `include/CLI/Version.hpp` at configure time. Do\nnot edit project version in `CMakeLists.txt`.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# CLI11 Agent Guide\n\nHeader-only C++11 command line parser library. CMake is the primary build\nsystem; Meson and Bazel are also supported.\n\n## Quick Build & Test\n\nUse presets. The `dev` workflow is the fastest for iteration; use `default`\nbefore a push to verify the primary header-only mode.\n\n```bash\n# Fast iteration (precompiled lib, no examples, ccache; configure + build + test)\ncmake --workflow dev\n\n# Full header-only build, matches CI (configure + build + test)\ncmake --workflow default\n\n# Or step by step\ncmake --preset dev\ncmake --build --preset dev\nctest --preset dev\n```\n\nThe `dev` preset uses `ccache`; install it (`brew install ccache`) or override\nwith `cmake --preset dev -DCMAKE_CXX_COMPILER_LAUNCHER=`.\n\n## Running a Single Test\n\nTests are individual Catch2 executables in `build-dev/tests/` (`dev` preset) or\n`build/tests/` (`default` preset).\n\n```bash\n# Run one test executable directly\n./build-dev/tests/AppTest\n\n# Or via CTest with a regex\nctest --preset dev -R AppTest\n```\n\n## Key CMake Options\n\n| Option                     | Default                 | Purpose                                 |\n| -------------------------- | ----------------------- | --------------------------------------- |\n| `CLI11_BUILD_TESTS`        | `ON` (if top-level)     | Build Catch2 test suite                 |\n| `CLI11_BUILD_EXAMPLES`     | `ON` (if top-level)     | Build `examples/`                       |\n| `CLI11_BUILD_DOCS`         | `ON` (if Doxygen found) | Build Doxygen docs                      |\n| `CLI11_SINGLE_FILE`        | `OFF`                   | Generate single `CLI11.hpp` header      |\n| `CLI11_PRECOMPILED`        | `OFF`                   | Build static lib instead of header-only |\n| `CLI11_WARNINGS_AS_ERRORS` | `OFF`                   | Turn warnings into errors               |\n| `CLI11_SANITIZERS`         | `OFF`                   | Enable ASan/TSan/UBSan                  |\n| `CLI11_BOOST`              | `OFF`                   | Enable Boost.Optional tests             |\n| `CLI11_CUDA_TESTS`         | `OFF`                   | Compile tests with NVCC                 |\n\n`CLI11_SINGLE_FILE` and `CLI11_PRECOMPILED` are mutually exclusive.\n\n## Presets\n\n- `default` — Debug, Ninja, `CLI11_WARNINGS_AS_ERRORS=ON`, export compile\n  commands.\n- `dev` — Inherits `default`, adds `CLI11_PRECOMPILED=ON`,\n  `CLI11_BUILD_EXAMPLES=OFF`, and `ccache`. An edit to `impl/*_inl.hpp` only\n  rebuilds the static library, not every test.\n- `tidy` — Inherits `default`, adds `clang-tidy` with warnings-as-errors. Uses\n  precompiled mode, so each `impl/*_inl.hpp` header is analyzed once (in\n  `src/Precompile.cpp`) instead of in every test and example.\n- `iwyu` — Inherits `default`, runs `include-what-you-use`. Also precompiled,\n  with tests and examples off, so `src/Precompile.cpp` is the only translation\n  unit and each header is reported once.\n\n```bash\ncmake --preset tidy\ncmake --build --preset tidy\n```\n\n## Include-what-you-use\n\n`brew install include-what-you-use`, then `cmake --preset iwyu` and\n`cmake --build --preset iwyu`. The build always succeeds and IWYU writes its\nadvice to stderr. Nothing enforces it, so read the report and apply what is\ncorrect, with these exceptions:\n\n- Only act on a removal that both standard libraries agree on; take an addition\n  from either. macOS asks to remove the `<iterator>` includes that Linux needs.\n- Keep both `<filesystem>` includes. `Macros.hpp` needs it before the\n  `__cpp_lib_filesystem` check, and `Validators.hpp` guards its one with\n  `#if CLI11_HAS_FILESYSTEM`.\n- Ignore the \"should add\" lines for `CLI/CLI.hpp` (an artifact of the private\n  pragma in each header), `<version>`, `<AvailabilityInternal.h>`, and `<math>`.\n\n`scripts/iwyu.imp` maps the detail headers a standard library asks for to the\nC++ header CLI11 should use; read the comment at its top before you add an\nentry. It covers both standard libraries, so check Linux after a change:\n\n```bash\ndocker run --rm -v \"$PWD:/src:ro\" debian:trixie sh -c '\n  apt-get update -qq && apt-get install -y -qq iwyu cmake ninja-build g++ &&\n  cp -r /src /work && rm -rf /work/build* && cd /work &&\n  cmake --preset iwyu >/dev/null && cmake --build --preset iwyu'\n```\n\n## Single Header Generation\n\nRequires Python. Enable with `CLI11_SINGLE_FILE=ON`:\n\n```bash\ncmake -S . -B build -DCLI11_SINGLE_FILE=ON\ncmake --build build --target CLI11-generate-single-file\n# Output: build/single-include/CLI11.hpp\n```\n\nScript: `scripts/MakeSingleHeader.py`.\n\n## Library Structure\n\n- `include/CLI/` — Public headers. The umbrella header is `CLI.hpp`.\n- `include/CLI/impl/` — `_inl.hpp` implementation headers included by the main\n  headers.\n- `src/` — `.cpp` files used **only** when `CLI11_PRECOMPILED=ON`.\n- `single-include/` — CMake rules for the single-header build.\n- `tests/` — Catch2 tests. `main.cpp` + `catch.hpp` provide the test runner.\n- `tests/data/` — Test data files copied to the build dir automatically.\n- `examples/` — Standalone example programs.\n- `book/` — Extra documentation/examples built only when top-level.\n\n## Testing Notes\n\n- Catch2 is auto-downloaded (v2.13.10 header) if not found on the system. Both\n  Catch2 v2 and v3 are supported.\n- Some tests launch helper applications (`ensure_utf8`, `ensure_utf8_twice`)\n  built from `tests/applications/`.\n- `FuzzFailTest` requires C++17.\n- `WindowsTest` is only built on Windows.\n- `DeprecatedTest` compiles with `-Wno-deprecated-declarations`.\n- `TimerTest` is in `CLI11_MULTIONLY_TESTS` (exercises multi-threading).\n\n## Code Style & Linting\n\nPre-commit hooks are configured in `.pre-commit-config.yaml`:\n\n- `clang-format` for C++/C/CUDA\n- `cmake-format` for CMake\n- `black` for Python\n- `prettier` for YAML/Markdown/JSON/etc.\n- `codespell` for typos\n- `markdownlint-cli2`\n- Custom checks: disallow a few common mistakes Run locally:\n\n```bash\nprek -a\n```\n\n## Version Source of Truth\n\nThe version string is read from `include/CLI/Version.hpp` at configure time. Do\nnot edit project version in `CMakeLists.txt`.\n","category":"root","tokens":1501}]}