Repository navigation
Building CLIF from source
Nick Kwiatkowski edited this page Nov 25, 2026
·
1 revision
This page is the short path from a checkout to a working clif. For the full development environment
(linters, docs generation, releases) see Building binaries from source.
| Requirement | Why |
|---|---|
Go, at the version pinned in go.mod
|
The toolchain version is pinned; an older Go refuses to build |
| A C compiler (gcc or clang; mingw-w64 on Windows) | CGO is required: the tree-sitter-cfml grammar is C |
make (optional) |
For the make targets below |
git clone https://github.com/cfmleditor/clif.git
cd clif
make buildmake build writes target/release/clif with CFLint embedded, as releases are built. Without make:
go build -trimpath -ldflags="-s -w" -o clif ./cmd/clif| Build | CFLint |
|---|---|
make build |
Embedded, at the version scripts/fetch-cflint.sh pins (falls back to a build without it if the fetch fails) |
go build ./cmd/clif |
Not embedded. On first lint, clif uses a cflint on PATH or downloads the pinned version from cfmleditor/CFLint releases, refusing it unless its checksum matches the one compiled in |
Check the result:
./target/release/clif --version
# clif devA build from a checkout reports dev unless a version is passed with
-ldflags "-X main.version=<v>".
| Command | Effect |
|---|---|
make install |
Build and copy the binary to $(go env GOPATH)/bin
|
make link |
Build, then symlink target/release/clif into $(go env GOPATH)/bin, so each later make build takes effect without re-linking |
make link LINK_DIR=$HOME/.local/bin |
Link somewhere else on PATH
|
make link-status |
Show what the link points at and what PATH resolves clif to |
make unlink |
Remove the link (pass the same LINK_DIR) |
make link is how editor extensions such as zed-cfml pick up a
local build: they look for a cached path, then a clif on PATH, and download a release only after that.
Restart the editor after linking or unlinking.
Install Go and a mingw-w64 gcc (for example from MSYS2), make sure gcc is on PATH, then:
$env:CGO_ENABLED = "1"
go build -trimpath -ldflags="-s -w" -o clif.exe .\cmd\clif
.\clif.exe --version