Fabric README

The project's README from github.com/danielmiessler/Fabric. As one markdown file: README.md.

Special thanks to:
Warp sponsorship
Warp, built for coding with multiple AI agents
Available for macOS, Linux and Windows

fabriclogo

fabric

Static Badge
GitHub top language GitHub last commit License: MIT Ask DeepWiki

fabric is an open-source framework for augmenting humans using AI.

English · 中文

Screenshot of fabric

Updates • What and Why • Philosophy • Installation • Usage • REST API • Examples • Just Use the Patterns • Custom Patterns • Helper Apps • Meta

What and why

Since the start of modern AI in late 2022 we've seen an extraordinary number of AI applications for accomplishing tasks. There are thousands of websites, chat-bots, mobile apps, and other interfaces for using all the different AI out there.

It's all really exciting and powerful, but it's not easy to integrate this functionality into our lives.

In other words, AI doesn't have a capabilities problem—it has an integration problem.

Fabric was created to address this by creating and organizing the fundamental units of AI—the prompts themselves!

Fabric organizes prompts by real-world task, allowing people to create, collect, and organize their most important AI solutions in a single place for use in their favorite tools. And if you're command-line focused, you can use Fabric itself as the interface!

Updates

For a deep dive into Fabric and its internals, read the documentation in the docs folder. There is also the extremely useful and regularly updated DeepWiki for Fabric.

Click to view recent updates

Dear Users,

We've been doing so many exciting things here at Fabric, I wanted to give a quick summary here to give you a sense of our development velocity!

Below are the new features and capabilities we've added (newest first):

Recent Major Features

  • v1.4.447 (April 16, 2026) — Claude Opus 4.7: Updates the Anthropic SDK to v1.37.0 and adds the new Claude Opus 4.7 to the available models, including 1M-token context window support.
  • v1.4.437 (March 16, 2026) — OpenAI Codex PLugin: Fabric now supports using OpenAI Codex (with your OpenAI subscription) as a backend!
  • v1.4.417 (Feb 21, 2026) — Azure AI Gateway Plugin: Added Azure AI Gateway plugin supporting multiple backends (AWS Bedrock, Azure OpenAI, Google Vertex AI) through a unified Azure APIM Gateway with shared subscription key authentication.
  • v1.4.416 (Feb 21, 2026) — Azure Entra ID Authentication: Added Azure Entra ID authentication plugin with shared Azure utilities, Entra ID/MSAL support, and extracted common Azure logic into a reusable azurecommon package.
  • v1.4.380 (Jan 15, 2026) — Microsoft 365 Copilot Integration: Added support for corporate Microsoft 365 Copilot, enabling enterprise users to leverage AI grounded in their organization's Microsoft 365 data (emails, documents, meetings.
  • v1.4.378 (Jan 14, 2026) — Digital Ocean GenAI Support: Added support for Digital Ocean GenAI, along with a guide for how to use it.
  • v1.4.356 (Dec 22, 2025) — Complete Internationalization: Full i18n support for setup prompts across all 10 languages with intelligent environment variable handling—making Fabric truly accessible worldwide while maintaining configuration consistency.
  • v1.4.350 (Dec 18, 2025) — Interactive API Documentation: Adds Swagger/OpenAPI UI at /swagger/index.html with comprehensive REST API documentation, enhanced developer guides, and improved endpoint discoverability for easier integration.
  • v1.4.338 (Dec 4, 2025) — Add Abacus vendor support for Chat-LLM models (see RouteLLM APIs).
  • v1.4.337 (Dec 4, 2025) — Add "Z AI" vendor support. See the Z AI overview page for more details.
  • v1.4.334 (Nov 26, 2025) — Claude Opus 4.5: Updates the Anthropic SDK to the latest and adds the new Claude Opus 4.5 to the available models.
  • v1.4.331 (Nov 23, 2025) — Support for GitHub Models: Adds support for using GitHub Models.
  • v1.4.322 (Nov 5, 2025) — Interactive HTML Concept Maps and Claude Sonnet 4.5: Adds create_conceptmap pattern for visual knowledge representation using Vis.js, introduces WELLNESS category with psychological analysis patterns, and upgrades to Claude Sonnet 4.5
  • v1.4.317 (Sep 21, 2025) — Portuguese Language Variants: Adds BCP 47 locale normalization with support for Brazilian Portuguese (pt-BR) and European Portuguese (pt-PT) with intelligent fallback chains
  • v1.4.314 (Sep 17, 2025) — Azure OpenAI Migration: Migrates to official openai-go/azure SDK with improved authentication and default API version support
  • v1.4.311 (Sep 13, 2025) — More internationalization support: Adds de (German), fa (Persian / Farsi), fr (French), it (Italian), ja (Japanese), pt (Portuguese), zh (Chinese)
  • v1.4.309 (Sep 9, 2025) — Comprehensive internationalization support: Includes English and Spanish locale files.
  • v1.4.303 (Aug 29, 2025) — New Binary Releases: Linux ARM and Windows ARM targets. You can run Fabric on the Raspberry PI and on your Windows Surface!
  • v1.4.294 (Aug 20, 2025) — Venice AI Support: Added the Venice AI provider. Venice is a Privacy-First, Open-Source AI provider. See their "About Venice" page for details.
  • v1.4.291 (Aug 18, 2025) — Speech To Text: Add OpenAI speech-to-text support with --transcribe-file, --transcribe-model, and --split-media-file flags.

These features represent our commitment to making Fabric the most powerful and flexible AI augmentation framework available!

Intro videos

Keep in mind that many of these were recorded when Fabric was Python-based, so remember to use the current install instructions below.

Navigation


Changelog

Fabric is evolving rapidly.

Stay current with the latest features by reviewing the CHANGELOG for all recent changes.

Philosophy

AI isn't a thing; it's a magnifier of a thing. And that thing is human creativity.

We believe the purpose of technology is to help humans flourish, so when we talk about AI we start with the human problems we want to solve.

Breaking problems into components

Our approach is to break problems into individual pieces (see below) and then apply AI to them one at a time. See below for some examples.

augmented_challenges

Too many prompts

Prompts are good for this, but the biggest challenge I faced in 2023——which still exists today—is the sheer number of AI prompts out there. We all have prompts that are useful, but it's hard to discover new ones, know if they are good or not, and manage different versions of the ones we like.

One of fabric's primary features is helping people collect and integrate prompts, which we call Patterns, into various parts of their lives.

Fabric has Patterns for all sorts of life and work activities, including:

Installation

Unix/Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.sh | bash

Windows PowerShell:

iwr -useb https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.ps1 | iex

See scripts/installer/README.md for custom installation options and troubleshooting.

Manual Binary Downloads

The latest release binary archives and their expected SHA256 hashes can be found at https://github.com/danielmiessler/fabric/releases/latest

Using package managers

NOTE: using Homebrew or the Arch Linux package managers makes fabric available as fabric-ai, so add the following alias to your shell startup files to account for this:

alias fabric='fabric-ai'

macOS (Homebrew)

brew install fabric-ai

Arch Linux (AUR)

yay -S fabric-ai

Windows

Use the official Microsoft supported Winget tool:

winget install danielmiessler.Fabric

Windows (Scoop)

scoop install fabric-ai

From Source

To install Fabric, make sure Go is installed, and then run the following command.

# Install Fabric directly from the repo
go install github.com/danielmiessler/fabric/cmd/fabric@latest

Docker

Run Fabric using pre-built Docker images:

# Use latest image from Docker Hub
docker run --rm -it kayvan/fabric:latest --version

# Use specific version from GHCR
docker run --rm -it ghcr.io/ksylvan/fabric:v1.4.305 --version

# Run setup (first time)
mkdir -p $HOME/.fabric-config
docker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric kayvan/fabric:latest --setup

# Use Fabric with your patterns
docker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric kayvan/fabric:latest -p summarize

# Run the REST API server (see REST API Server section)
docker run --rm -it -p 8080:8080 -v $HOME/.fabric-config:/home/appuser/.config/fabric kayvan/fabric:latest --serve

Images available at:

See scripts/docker/README.md for building custom images and advanced configuration.

Environment Variables

You may need to set some environment variables in your ~/.bashrc on linux or ~/.zshrc file on mac to be able to run the fabric command. Here is an example of what you can add:

For Intel based macs or linux

# Golang environment variables
export GOROOT=/usr/local/go
export GOPATH=$HOME/go

# Update PATH to include GOPATH and GOROOT binaries
export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH

for Apple Silicon based macs

# Golang environment variables
export GOROOT=$(brew --prefix go)/libexec
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH

Setup

Now run the following command

# Run the setup to set up your directories and keys
fabric --setup

If everything works you are good to go.

Supported AI Providers

Fabric supports a wide range of AI providers:

Native Integrations:

OpenAI-Compatible Providers:

Run fabric --setup to configure your preferred provider(s), or use fabric --listvendors to see all available vendors.

Per-Pattern Model Mapping

You can configure specific models for individual patterns using environment variables like FABRIC_MODEL_PATTERN_NAME=vendor|model

This makes it easy to maintain these per-pattern model mappings in your shell startup files.

Add aliases for all patterns

In order to add aliases for all your patterns and use them directly as commands, for example, summarize instead of fabric --pattern summarize You can add the following to your .zshrc or .bashrc file. You can also optionally set the FABRIC_ALIAS_PREFIX environment variable before, if you'd prefer all the fabric aliases to start with the same prefix.

# Loop through all files in the ~/.config/fabric/patterns directory
for pattern_file in $HOME/.config/fabric/patterns/*; do
    # Get the base name of the file (i.e., remove the directory path)
    pattern_name="$(basename "$pattern_file")"
    alias_name="${FABRIC_ALIAS_PREFIX:-}${pattern_name}"

    # Create an alias in the form: alias pattern_name="fabric --pattern pattern_name"
    alias_command="alias $alias_name='fabric --pattern $pattern_name'"

    # Evaluate the alias command to add it to the current shell
    eval "$alias_command"
done

yt() {
    if [ "$#" -eq 0 ] || [ "$#" -gt 2 ]; then
        echo "Usage: yt [-t | --timestamps] youtube-link"
        echo "Use the '-t' flag to get the transcript with timestamps."
        return 1
    fi

    transcript_flag="--transcript"
    if [ "$1" = "-t" ] || [ "$1" = "--timestamps" ]; then
        transcript_flag="--transcript-with-timestamps"
        shift
    fi
    local video_link="$1"
    fabric -y "$video_link" $transcript_flag
}

You can add the below code for the equivalent aliases inside PowerShell by running notepad $PROFILE inside a PowerShell window:

# Path to the patterns directory
$patternsPath = Join-Path $HOME ".config/fabric/patterns"
foreach ($patternDir in Get-ChildItem -Path $patternsPath -Directory) {
    # Prepend FABRIC_ALIAS_PREFIX if set; otherwise use empty string
    $prefix = $env:FABRIC_ALIAS_PREFIX ?? ''
    $patternName = "$($patternDir.Name)"
    $aliasName = "$prefix$patternName"
    # Dynamically define a function for each pattern
    $functionDefinition = @"
function $aliasName {
    [CmdletBinding()]
    param(
        [Parameter(ValueFromPipeline = `$true)]
        [string] `$InputObject,

        [Parameter(ValueFromRemainingArguments = `$true)]
        [String[]] `$patternArgs
    )

    begin {
        # Initialize an array to collect 

Fabric (danielmiessler/Fabric)

Searching Database…

44.3K ·GitHub
这是什么?Fabric 是一个开源框架,它把 AI 提示词(称为 Pattern,即提示词模板)按实际任务分类整理,让你可以通过命令行或 REST API,把 AI 用在具体问题上。
这是聊天机器人应用,还是命令行框架?它是一个用 Go 编写的命令行框架:你可以运行 fabric --pattern summarize 之类的命令。它附带一个众包收集的可复用提示词库,还可以选择启用 REST API 服务器和网页应用。
我该怎么安装和设置?使用一行命令的安装脚本,或通过包管理器安装(brew install fabric-ai、winget install danielmiessler.Fabric、scoop install fabric-ai、yay -S fabric-ai),也可以用 Go 从源码编译;然后运行 fabric --setup 来配置服务商。
用它之前,我需要 AI 服务商的 API 密钥吗?需要。在运行 Pattern 之前,你必须通过 fabric --setup 至少配置一个服务商,例如 OpenAI、Anthropic、Gemini、Azure、Bedrock、Ollama、LM Studio,以及许多兼容 OpenAI 接口的供应商。
安装时有哪些需要注意的坑吗?如果通过 Homebrew 或 Arch Linux AUR 安装,可执行文件名为 fabric-ai 而不是 fabric,所以需要为它添加一个 shell 别名,才能按预期工作。
它能在哪些平台和设备上运行?预编译的可执行文件支持 macOS、Linux 和 Windows,包括 Linux ARM 和 Windows ARM,因此也能在树莓派等设备上运行。
我能用本地模型代替云端 API 来运行它吗?可以。Fabric 原生支持 Ollama 和 LM Studio,用来运行本地模型,同时也支持众多云服务商。
Fabric 里的“Pattern”到底是什么?Pattern 是一种经过整理、可复用的 AI 提示词,存放在 ~/.config/fabric/patterns 中,并按任务分类(例如 summarize、extract_wisdom)。你可以通过 --pattern 参数或别名来调用它。
作者为什么要做 Fabric,而不是直接用 ChatGPT?作者认为,AI 的真正问题不在于能力,而在于如何融入日常工作流程。因此 Fabric 把最好的提示词打包成可组合、可复用的单元,你可以把它们通过管道接入任何工具。
REST API 服务器是干什么用的?以服务器模式运行 Fabric 时,它会通过 HTTP 暴露其 Pattern,并提供可交互的 Swagger/OpenAPI 文档,让其他应用或扩展能够以编程方式调用 Fabric 的 AI 功能。
随附的 topdf、pbpaste 等辅助工具有什么用?这些是随 Fabric 附带的小型配套命令行工具:topdf 可将输出转换为 PDF,code2context 提取代码库上下文,generatechangelog 生成变更日志,pbpaste 读取剪贴板内容,以便通过管道传入 Pattern。
Size
148.7 MB
Stars
44.3K
Age
2y
Commits · 90 Days