Overview

metis is a fast, C++20-powered pre-commit hook and CI generator. It ensures code quality before every push with zero runtime dependencies — a single static binary that replaces Python- and Node-based pre-commit frameworks.

Subcommands

CommandAction
initGenerate .metis.toml, .clang-format (plus .clang-tidy / CMakeLists.txt with --enable-* flags)
installInstall pre-commit hook + optional CI workflows
syncRefresh hooks/workflows, generate missing tool configs, validate all checks
runExecute checks on files (staged by default, --all-files for tracked)
install-compilerInstall a C++ compiler/toolchain
generate-ghaWrite GitHub Actions workflow to .github/workflows/metis.yml
generate-gitlabWrite GitLab CI workflow to .gitlab-ci.yml
testRun ctest and optional coverage checks
sanitizerRun sanitizer checks (ASan, UBSan, TSan, LSan)
depsCheck project dependencies (Conan, vcpkg, CMake FetchContent)
buildConfigure and build the project with CMake
perfPerformance checks (build time, binary size, benchmarks); --level quick = size only, default full
-h, --help / -v, --versionHelp / version

Global flag: -c, --config <path> (default .metis.toml). Every subcommand accepts --help for its own detailed usage.

Dependencies

DependencyPurposeVersion
tomlplusplusHeader-only TOML config file parser and serializerv3.4.0
fmtModern formatting libraryv11.0.2

Both are fetched automatically at configure time via CMake's FetchContent. No system installation required.

Build

# Release build (recommended)
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel

# Verify
./build/bin/metis --version

# Quick smoke test
./build/bin/metis init --style google --enable-clang-tidy
./build/bin/metis run --dry-run --all-files
./build/bin/metis install
OptionDefaultDescription
METIS_BUILD_TESTSONBuild GoogleTest suite
METIS_ENABLE_SANITIZERSOFFAddressSanitizer + UBSan (Debug only)
METIS_USE_SYSTEM_FMTOFFUse system libfmt instead of FetchContent
METIS_USE_SYSTEM_TOMLPLUSPLUSOFFUse system tomlplusplus instead of FetchContent

Compiler Requirements

Install (from build): sudo cmake --install build