danielmiessler/Fabric

AI Engineering

A CLI and prompt library that organizes reusable AI prompts by task and routes them to many model providers.

44,416
4,319
Go
MIT
2 years old

Fabric is an open-source framework for working with AI prompts rather than building chat UIs. Its premise is that AI has an integration problem: useful prompts are scattered and hard to manage. Fabric collects them as "Patterns" organized by real-world task, and provides a Go-based command-line tool that runs a Pattern against piped input through a configured model provider What and why.

What it does in practice

The core workflow is short: pipe text into the CLI, name a Pattern, and read (or stream) the result. For example, fabric --pattern summarize takes clipboard or file content from stdin Examples. Patterns cover extraction, summarization, writing, code explanation, and similar tasks; the README notes the prompt files can also be copied into any other chat tool if you do not want the CLI Just use the Patterns.

Two mechanisms distinguish it. First, model routing: one setup step configures providers such as OpenAI, Anthropic, Gemini, Ollama, Azure, Bedrock, and many OpenAI-compatible services, so the same Pattern can run against a cloud or local model Supported AI Providers. Second, composition controls: --strategy applies a reasoning style (for example chain-of-thought or least-to-most) on top of a Pattern, and --dry-run or --print-prompt shows exactly what would be sent before any model call, which is useful for testing prompt construction without spending API credits Usage.

The tool also exposes a REST API server and an Ollama-compatible mode, so applications expecting an Ollama endpoint can point at Fabric and use its configured providers, with Patterns appearing as selectable models REST API Server. Custom Patterns live in a separate directory, take precedence over built-in ones with the same name, and survive pattern updates Custom Patterns.

Requirements and limits

Fabric is distributed as prebuilt binaries, via package managers (Homebrew and AUR install it as fabric-ai), Go install, and Docker Installation. You must run fabric --setup and configure at least one model provider with credentials or a local endpoint before a Pattern can produce output. The examples use macOS pbpaste; Windows and Linux users need their own clipboard command. Some helper apps, such as to_pdf, require additional software (a LaTeX distribution) and are separate installs. The README warns that rerunning setup after an upgrade may require reconfiguring settings or keys when configuration changes between versions. Fabric is MIT-licensed.

Because the project evolves quickly and its release notes add providers and model support frequently, exact provider behavior is worth checking against the current setup documentation rather than assuming a fixed list.

HotRepo's take

At the time of the supplied snapshot, Fabric has a large star count and a deep provider integration list; the two recorded daily-board entries (2026-10-24 and 2026-10-25, +13 stars each) are too thin to establish a trend. Evaluate it on whether a structured, pipe-first prompt library fits your workflow.

Written by AI from the project's README, updated October 28, 2026. The project's own docs are the source of truth.

Hacker News

Fabric is an open-source framework for augmenting humans using AI
▲ 137 · 99 comments · July 6, 2024
Fabric: Pipe LLM Prompts Together
▲ 2 · 1 comment · July 1, 2024