fabric
Fabric — Reusable AI Prompt Patterns in the Terminal
Overview
Fabric turns prompts into named, versioned files called patterns and runs them from the shell. Text arrives on stdin (or from a URL or a YouTube video), Fabric wraps it with the chosen pattern's system prompt, sends it to the configured model and prints Markdown to stdout, so it composes with pipes, redirects and other CLI tools. The project ships about 260 patterns (summarize, extract_wisdom, analyze_claims, summarize_paper, create_flash_cards, summarize_git_diff, write_pull-request, ...), and users add private ones in a custom directory.
Fabric was rewritten from Python to Go in 2024. Old tutorials that use pipx install, fabric --setup screens from the Python era or the yt helper as a separate binary are out of date; the current CLI is a single fabric binary.
Instructions
Install
Use a package manager or the Go toolchain. Homebrew and the AUR install the binary as fabric-ai, so add an alias for interactive use (Scoop's fabric-ai package installs it as fabric).
# macOS / Linux with Homebrew
brew install fabric-ai
alias fabric='fabric-ai'