Installing the new Go-based Fabric LLM cli

Fabric’s installation instructions from its website make it appear that installing this new version rewritten in the Go language should be easier than it was with the original Python implementation.

Although pipx made things relatively easy before, I ran into trouble when my installed version of Go did not meet the requirements of the newer Fabric package.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Old Python-based implementation
# git clone https://github.com/danielmiessler/fabric.git && # Clone Fabric to your computer
# 	pushd fabric &&
# 	pipx install . &&
# 	exec zsh && fabric --help

# New go version
# Install Fabric directly from the repo

go install github.com/daniel/miessler/fabric@latest

My solution was to try out PKGX which was something that I had been looking for an excuse to try.

Install “pkgx” #

1
2
curl -Ssf https://pkgx.sh | sh
pkgx integrate

Install with appropriate version of go #

1
pkgx go@1.23 install github.com/daniel/miessler/fabric@latest

Add appropriate ENV vars #

1
2
3
4
5
6
# ~/.zshrc or ~/.bashrc 

export GOROOT=$HOME'/.pkgx/go.dev/v1.23.1'
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH
export DEFAULT_MODEL=mistral

Configure fabric #

1
2
3
4
which fabric
# /home/alex/go/bin/fabric

fabric --setup