Install
Binary Packages
Binary packages are available from our Release Page. Most users should start here; if no binary release fits your platform, build from source below.
Build from Source
If no binary release fits your platform, build Mr.Docs from source with the bootstrap script. The script provisions every dependency Mr.Docs needs (LLVM, Clang, and the other third-party libraries) into the install prefix you choose, configures the project, and runs the build. See the bootstrap walkthrough on the C++ Alliance site for the design rationale.
|
Already installed Mr.Docs from a binary package? Skip the rest of this section and go straight to Verification. |
Prerequisites
You need Python, a recent C++ toolchain (Clang or a recent GCC), CMake, and Git on the machine. If any of those are missing, pass --install-system-deps to the bootstrap script below and it will use your system package manager to install them.
Running the script
git clone https://www.github.com/cppalliance/mrdocs.git
cd mrdocs
python bootstrap.py
The script prompts for the install directory and other settings interactively. Every prompt has an equivalent CLI flag; the --help output lists them all.
Usage patterns
Non-interactive (CI or scripted installs): --yes accepts every default without prompting.
python bootstrap.py --yes --build-type Release
Dry-run: --dry-run prints every command the script would run, fully resolved. The output is copy-paste-ready shell, useful when you want to follow the build manually:
python bootstrap.py --yes --dry-run --build-type Release
Continuous integration: point --cache-dir at a CI-cached directory of dependency installs; the script checks stamp files and skips up-to-date recipes. Pair with --skip-build if you only need the dependencies.
python bootstrap.py --yes --plain \
--build-type Release --sanitizer address \
--cache-dir ../third-party --skip-build
For more options and details, see the Bootstrap Options Reference section at the end of this page.
Verification
After install, confirm the binary is on PATH and reports the expected version:
mrdocs --version
|
If the shell reports "command not found" (or "is not recognized as an internal or external command" on Windows), Mr.Docs is installed but its
Append the install prefix’s
Replace Append the install prefix’s
Replace If |
Package layout
A Mr.Docs install follows the conventional Unix layout. After install, the prefix contains:
-
bin/— themrdocsexecutable. -
share/mrdocs/— bundled resources Mr.Docs reads at runtime -
lib/andinclude/— the Mr.Docs core library and its public headers, for embedding Mr.Docs in another program.
Appendix: Bootstrap Options Reference
Build Configuration
| Name | Description |
|---|---|
--build-type(enum) | Selects the CMake build configuration. Release maximizes optimization; Debug disables it and enables assertions; RelWithDebInfo produces optimized binaries with debug info; MinSizeRel optimizes for size; DebugFast trades some debuggability for build speed. Choices: Default: |
--preset(string) | Name of the CMake preset to use. The default template expands to a value derived from build type, OS, compiler, and sanitizer; override only when you have a custom preset. Default: a name like |
--sanitizer(enum) | Builds Mr.Docs with a Clang/GCC sanitizer enabled. Choices: |
--no-build-tests(flag) | Skip building the test suite (golden, unit, lint, schema, self-doc). Tests are built by default; pass |
Compiler Options
| Name | Description |
|---|---|
--cc(string) | Path to the C compiler. Defaults to the compiler CMake discovers on the system; set this when you need to pin a specific version or pick between Clang and GCC. |
--cxx(string) | Path to the C++ compiler. Defaults to the compiler CMake discovers on the system; set this to pin a specific version or to use a different toolchain from CC. |
--cflags(string) | Extra flags appended to every C compile command, both for third-party recipes and for Mr.Docs itself. Useful for linker-friendly debug info ( |
--cxxflags(string) | Extra flags appended to every C++ compile command, both for third-party recipes and for Mr.Docs itself. |
--ldflags(string) | Extra flags appended to every link command, both for third-party recipes and for Mr.Docs itself. |
Tool Paths
| Name | Description |
|---|---|
--cmake-path(string) | Path to the CMake executable. Bootstrap discovers CMake on |
--ninja-path(string) | Path to the Ninja executable. Ninja is the preferred CMake generator because it produces a |
--git-path(string) | Path to Git. Required for cloning recipes and for the compilation-database CMake integration. Bootstrap discovers Git on |
--python-path(string) | Path to the Python interpreter recipes should use for any Python steps. Defaults to the interpreter currently running bootstrap. |
--java-path(string) | Path to a Java runtime. Required for the xml-lint test step when |
Directories
| Name | Description |
|---|---|
--source-dir(string) | Root of the cloned Mr.Docs source tree. Bootstrap auto-detects this from the working directory, so you usually do not need to set it explicitly. Default: the directory containing the cloned source |
--build-dir(string) | Where CMake places intermediate build artefacts. The default template expands per build type, OS, compiler, and sanitizer so different combinations do not clobber each other. Default: |
--install-dir(string) | Where the final binaries and resources are installed. The default template expands per build type, OS, compiler, and sanitizer so different combinations install side-by-side. Default: |
Behavior Options
| Name | Description |
|---|---|
-y(flag) | Accept every default prompt without asking. Use this for CI, containers, and scripted installs where there is no human at the keyboard. |
--dry-run(flag) | Print every command bootstrap would run, fully resolved with absolute paths, without executing anything. Useful when you want to inspect the build steps or reproduce them manually. |
--verbose(flag) | Show extra log lines about each step bootstrap takes. |
--debug(flag) | Show full Python tracebacks on errors. Implies verbose. |
--plain(flag) | Disable colors and emoji in the output. Use for CI logs and any environment that does not render terminal escape codes. |
--install-system-deps(flag) | If a required system tool (CMake, a compiler, Git, etc.) is missing, attempt to install it via |
Dependency Options
| Name | Description |
|---|---|
--clean(flag) | Wipe every cached third-party dependency build and start over. The Mr.Docs build itself is also cleared. |
--force(flag) | Rebuild a recipe even when its stamp file says it is up to date. Use this after an out-of-band change to a recipe's source tree. |
--recipe-filter(string) | Comma-separated list of recipe names to build (for example, |
--skip-build(flag) | Install dependencies but skip the CMake configure and build of Mr.Docs itself. Useful when you only need the dependency tree populated for CI cache restoration. |
--list-recipes(flag) | Print every dependency recipe bootstrap knows about and exit. |
--cache-dir(string) | Use a shared directory of cached dependency installs. Each recipe installs to |
--cache-key(string) | Print the cache key for one recipe and exit (for example, |
--os-key(string) | OS or container identifier baked into cache keys (for example, |
--env-file(string) | Path where bootstrap writes computed |
--refresh-all(flag) | Re-run the bootstrap configuration step for every existing IDE configuration in the source tree, regenerating run configs from current options without rebuilding. |
Run Configuration Options
| Name | Description |
|---|---|
--no-run-configs(flag) | Skip generating IDE run/debug configurations for CLion, VS Code, and Visual Studio. Bootstrap generates configs by default so common Mr.Docs targets are one click away; pass |