Installing the new Go-based Fabric LLM cli
Installing the new Go-based Fabric LLM cli
September 19, 2024
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.
# 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@latestMy solution was to try out PKGX which was something that I had been looking for an excuse to try.
Install “pkgx”
curl -Ssf https://pkgx.sh | sh
pkgx integrateInstall with appropriate version of go
pkgx go@1.23 install github.com/daniel/miessler/fabric@latestAdd appropriate ENV vars
# ~/.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=mistralConfigure fabric
which fabric
# /home/alex/go/bin/fabric
fabric --setup