Tool Installation
cppx uses a host-specific provider model for tool bootstrap.
- Windows x64: managed archives for core tools, plus system MSVC detection
- macOS 14+: Homebrew for core tools, verified archive/bootstrap for
vcpkg - Ubuntu LTS profiles (22.04, 24.04):
aptfor core tools and the managed Clang/GCC compiler path, verified archive/bootstrap forvcpkg, andpipxforconan - Other Linux distributions: conservative
systemdetection only
Pinned exact versions are supported for official-host managed non-compiler tools.
- Windows: exact versions use verified archives/releases
- macOS 14+: exact pins for
cmake,ninja, andconanuse verified archives/releases - Ubuntu LTS profiles (22.04, 24.04): exact pins for
cmakeandninjause verified archives, andconanusespipx vcpkgexact versions remain catalog-curated across official hosts- non-Windows managed
cxxstays on floating defaults for now, but official macOS/Ubuntu hosts expose both managed and system compiler paths
Basic command
bash
npm --prefix packages run cppx -- install-toolsSupport matrix
| Host | Default backend | CMake / Ninja | vcpkg | conan | C++ compiler |
|---|---|---|---|---|---|
| Windows x64 | none | managed | managed | managed | managed (MinGW) or system (MSVC) |
| macOS 14+ | none | managed | managed | managed | managed (Homebrew LLVM) or system (Apple Clang / clang++) |
| Ubuntu LTS profiles (22.04, 24.04) | none | managed | managed | managed (pipx) | managed (Clang or GCC via apt) or system (PATH clang++ / g++) |
| Other Linux | none | system | system | system | system |
Provider behavior
Windows
cppxdownloads verified archives forcmake,ninja,vcpkg,conan, and the managed MinGW toolchain.- MSVC remains a detected system toolchain.
- Conan uses the official Windows release zip with checksum verification.
macOS 14+
cppx install-toolsuses Homebrew forcmake,ninja,conan, andllvm.vcpkguses the verified archive/bootstrap path.- pinned exact versions for
cmake,ninja, andconanswitch to verified archive/release assets. tools.cxx.mode = "system"keeps using the compiler already visible onPATH.- Homebrew must already be installed.
Ubuntu LTS profiles (22.04, 24.04)
cppx install-toolsusesaptfor:cmakeninja-buildclangorg++for the managed compiler, depending onpreferred_family
vcpkguses the verified archive/bootstrap path.conanusespipxin acppx-owned isolated location.- pinned exact versions for
cmakeandninjaswitch to verified archives instead ofapt. tools.cxx.mode = "managed"usesclangorg++fromapt, depending onpreferred_family.tools.cxx.mode = "system"uses the selected compiler fromPATH(clang++org++).cppxbootstrapspipxwithaptwhen the host does not already provide it.aptoperations may require root or passwordlesssudo.
Unsupported Linux distributions
cppxdoes not claim managed Linux parity outside Ubuntu LTS profiles (22.04, 24.04).install-toolsfalls back to system detection instead of pretending managed support exists.
Tool policy
Each tool is resolved in either managed or system mode.
managed- Windows: archive installs
- macOS: Homebrew or archive/bootstrap
- Ubuntu LTS profiles (22.04, 24.04):
apt, archive/bootstrap, orpipx
system- Use what is already available on
PATH - macOS official hosts can keep Apple Clang in
systemmode - Ubuntu LTS official hosts can choose
clangorgccin managed mode, or keepclang++/g++in system mode statusanddoctorstill report provider and ownership metadata when possible
- Use what is already available on
status and doctor report:
modeproviderownershiprequestedVersionresolvedVersionverifiedSha256
On Ubuntu LTS profiles (22.04, 24.04), provider ownership is split by tool:
aptforcmake,ninja, and the selected managed compiler (clang++org++)- archive/bootstrap for
vcpkg pipxforconan
Examples
Windows with managed MinGW
bash
npm --prefix packages run cppx -- install-tools --compiler mingwWindows with system MSVC
bash
npm --prefix packages run cppx -- install-tools --compiler msvc --msvc-installation-path "C:\Program Files\Microsoft Visual Studio\2022\BuildTools"macOS 14+ managed host bootstrap
bash
npm --prefix packages run cppx -- install-toolsUbuntu LTS managed host bootstrap
bash
npm --prefix packages run cppx -- install-toolsUbuntu LTS managed GCC bootstrap
bash
npm --prefix packages run cppx -- install-tools --compiler gccUnsupported Linux system detection
bash
npm --prefix packages run cppx -- install-toolsValidation
bash
npm --prefix packages run test
npm --prefix packages run smoke:nativesmoke:native verifies the current host can complete the init -> build -> run -> test -> pack flow.