Omar Hosney

Fabric Installation Cheat Sheet

How to Install Fabric

  • Download Latest Binaries (recommended, no dependencies):
    • Windows: Download EXE
    • macOS (arm64): curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-darwin-arm64 > fabric && chmod +x fabric && ./fabric --version
    • macOS (amd64): curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-darwin-amd64 > fabric && chmod +x fabric && ./fabric --version
    • Linux (amd64): curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-linux-amd64 > fabric && chmod +x fabric && ./fabric --version
    • Linux (arm64): curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-linux-arm64 > fabric && chmod +x fabric && ./fabric --version
  • Using Package Managers:
    • macOS (Homebrew): brew install fabric-ai
    • Arch Linux (AUR): yay -S fabric-ai
    • NOTE: The binary may be called fabric-ai. Add alias fabric='fabric-ai' to your shell config.
  • From Source (requires Go):
    • go install github.com/danielmiessler/fabric@latest
  • Environment Variables (add to ~/.bashrc or ~/.zshrc):
    • Intel/macOS/Linux:
      export GOROOT=/usr/local/go
      export GOPATH=$HOME/go
      export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH
    • Apple Silicon macOS:
      export GOROOT=$(brew --prefix go)/libexec
      export GOPATH=$HOME/go
      export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH
  • Setup:
    • Run fabric --setup to set up directories and keys.
For more details and troubleshooting, visit the official Fabric GitHub page.

⬆️ Upgrading

The great thing about Go is that it's super easy to upgrade Fabric. Just run the same command you used to install it and you'll always get the latest version:

go install github.com/danielmiessler/fabric@latest

🚀 Usage

Once you have Fabric set up, you can view all options with:

fabric -h

Common usage:

fabric [OPTIONS]

(Below is a partial help output. For the full list, run fabric -h on your system.)

  • -p, --pattern= Choose a pattern
  • -v, --variable= Set pattern variables
  • -C, --context= Choose a context
  • --session= Choose a session
  • -a, --attachment= Attachment path or URL
  • -S, --setup Run setup
  • -t, --temperature= Set temperature (default: 0.7)
  • -s, --stream Stream output
  • -l, --listpatterns List all patterns
  • -L, --listmodels List all models
  • -x, --listcontexts List all contexts
  • -X, --listsessions List all sessions
  • -U, --updatepatterns Update patterns
  • -m, --model= Choose model
  • -o, --output= Output to file
  • --version Print version
  • -h, --help Show help

Examples:

  • pbpaste | fabric --pattern summarize # Summarize clipboard content (macOS)
  • pbpaste | fabric --stream --pattern analyze_claims # Analyze claims with streaming output
  • fabric -y "https://youtube.com/watch?v=uXs-zPc63kM" --stream --pattern extract_wisdom # Extract wisdom from a YouTube video
  • fabric -u https://github.com/danielmiessler/fabric/ -p analyze_claims # Analyze claims on a website

For more, see the official usage docs, GitHub patterns directory, and local Fabric Patterns Cheat Sheet.