#url #directory

app buckle

A lightweight launcher for buck2

3 unstable releases

0.2.1 Jul 16, 2023
0.2.0 Jul 15, 2023
0.1.0 Jun 10, 2023
Download history 3/week @ 2023-08-18 6/week @ 2023-08-25 5/week @ 2023-09-01 5/week @ 2023-09-08 19/week @ 2023-09-15 9/week @ 2023-09-22 15/week @ 2023-09-29 16/week @ 2023-10-06 18/week @ 2023-10-13 13/week @ 2023-10-20 18/week @ 2023-10-27 19/week @ 2023-11-03 13/week @ 2023-11-10 25/week @ 2023-11-17 7/week @ 2023-11-24 46/week @ 2023-12-01

91 downloads per month

MIT license

299 lines


Buckle is a launcher for Buck2. It manages Buck2 on a per-project basis. This enables a project or team to do seamless upgrades of their build system tooling.

It is designed to be minimally intrusive. Buckle only manages fetching Buck2 and enforcing the prelude is upgraded in sync.


There are multiple ways to install the buckle binary.


There are prebuilts available for Linux, Windows, and MacOS hosted on GitHub.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/benbrittain/buckle/releases/download/v0.2.0/buckle-installer.sh | sh

Building from source

cargo install buckle

How To Use

Invoke buck2

The most basic thing Buckle does is invoke the buck2 binary. Use it as follows:

buckle build //...

By default, all of the above installation methods install the binary as buckle. You may also wish to add an alias to your shell:

alias buck2='buckle'

This will prevent you from accidently using the incorrect Buck2 version.

Specifying a Buck2 version

A .buckversion file is what allows you to pin your buck2 installation for all downstream users. Put it in the root of the Buck2 project.

latest or the release date in format YYYY-MM-DDD. buck2 releases

Example .buckversion:


buckle supports an environment variable that can override the .buckversion file.

USE_BUCK2_VERSION=latest buckle //...

Prelude check

When upgraded, buck2 will likely not be syncronized with the standard prelude anymore. Buckle will notify in this scenario what prelude is expected and how to upgrade.

There are reasonable scenarios where someone actively working on the build system might be carrying a patch on the standard buck2 prelude. To disable the Buckle warnings of the mismatch:


Changing the installation directory

Buckle stores the buck2 binary in a different place dependent on the OS.

Linux: $XDG_CACHE_HOME/buckle or $HOME/.cache/buckle

MacOS: $HOME/Library/Caches/buckle

Windows %LocalAppData%/buckle

you may also specify an override with the BUCKLE_CACHE environment variable.

export BUCKLE_CACHE=/tmp


~567K SLoC