brew tap arcadia-eng/cleft https://github.com/arcadia-eng/cleft
brew install cleft
If Homebrew requires tap trust, run brew trust --formula arcadia-eng/cleft/cleft before retrying.
Install with Nix
With flakes enabled, run:
sh
nix profile install github:arcadia-eng/cleft
Download a release binary
Download the archive for your operating system and CPU and its SHA256SUMS from Cleft releases. Verify the matching checksum before unpacking. For example, on x86_64 Linux:
Set archive to the filename you downloaded. Use shasum -a 256 -c - if sha256sum is unavailable.
Build from source
Install Git, Make and a C17 compiler. The default build links only system libraries.
sh
git clone https://github.com/arcadia-eng/cleft.git
cd cleft
make && sudo make install
For a user-local install, run make install PREFIX="$HOME/.local" instead. Set DESTDIR to stage the install under a different root.
Choose build options
Set ARCH_FLAGS="-march=armv8-a+crypto" on ARM64 Linux or ARCH_FLAGS="-msha -mssse3" on x86-64 if your CPU supports those instructions. Apple Silicon Clang enables hardware SHA by default.
Run make CLEFT_USE_SYS_ZLIB=1 to link system zlib instead of the built-in decoder.
Run make asan for a build with AddressSanitizer and UndefinedBehaviorSanitizer.
Run make test with Python and Git to exercise the source build.
Create a worktree
If you installed into a user directory, put its bin directory on PATH. Check both entry points with cleft --version and git cleft --version. From an existing Git working tree, run:
sh
cleft add -b feature/work ../wt-feature
cleft list