Skip to content

Installation

The quickest way to install Detent on macOS is Homebrew. Everywhere else, build it from source with CMake.


Terminal window
brew install Kronuz/tap/detent

That installs detent-authority, detent-agent and detent, plus the launchd service templates under $(brew --prefix)/share/detent/. To track main instead of the pinned revision, use brew install --HEAD Kronuz/tap/detent.


  1. A C++20 compiler and standard library that provide std::jthread and stop tokens. Configuration checks this before building. libc++ 20 and newer, recent libstdc++, and Apple Clang 17 all work.
  2. CMake 3.24 or newer.
  3. Git and network access on the first configure; every dependency is fetched with CMake FetchContent.
  4. OpenSSL 3.0 or newer for the managed agent and the durable authority.
  5. For the integration tests only: Python 3, Bash, curl, and the openssl command-line tool on PATH. The running daemons don’t need them.

Detent is developed and qualified on macOS, Linux and FreeBSD.


Terminal window
git clone https://github.com/Kronuz/Detent.git
cd Detent
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

That produces, under build/src/:

BinaryWhat it is
detent-authorityThe durable authority daemon
detent-agentThe host-local agent daemon
detentThe shell reader: detent get NAME

You also get the static libraries, examples in build/examples/, benchmarks in build/benchmarks/, and the test suite.

OptionDefaultEffect
DETENT_BUILD_MANAGED_AGENTONBuild managed (authority) delivery support into detent-agent
DETENT_BUILD_AUTHORITYONBuild detent-authority, the durable authority daemon, with its HTTP, reactor and consensus dependencies
DETENT_BUILD_TESTSONBuild the test suite
DETENT_BUILD_EXAMPLESONBuild detent_demo
DETENT_BUILD_BENCHMARKSONBuild the benchmarks
DETENT_BUILD_PYTHONOFFBuild the pybind11 Python module (needs Python 3 headers)
DETENT_BUILD_RUSTOFFBuild the cxx Rust crate (needs cargo and rustc)

A library-only build, for an application that only needs detent::Client with baked defaults or a file source, can skip the network stack entirely:

Terminal window
cmake -B build -DDETENT_BUILD_AUTHORITY=OFF -DDETENT_BUILD_MANAGED_AGENT=OFF

Terminal window
ctest --test-dir build --output-on-failure

The suite covers the core client (schema validation, golden hash vectors, evaluation precedence, CLI overrides, the file source, concurrency stress), the agent’s command line, and the authority, delivery and local-image libraries.


Terminal window
cmake --install build --prefix /usr/local

This installs detent-authority, detent-agent and detent into bin/, and the service templates for systemd, launchd and rc.d into share/detent/. See System Services to run them under a service manager.


include(FetchContent)
FetchContent_Declare(detent
GIT_REPOSITORY https://github.com/Kronuz/Detent.git
GIT_TAG main)
FetchContent_MakeAvailable(detent)
target_link_libraries(my_app PRIVATE detent::detent)

add_subdirectory() of a local checkout works the same way. See Using Detent in a C++ Application for the rest.