File: README.md
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
azurecommonpackage. - 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.htmlwith 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_conceptmappattern 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/azureSDK 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-fileflags.
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
fabric- What and why
- Updates
- Intro videos
- Navigation
- Changelog
- Philosophy
- Installation
- Usage
- REST API Server
- Our approach to prompting
- Examples
- Just use the Patterns
- Custom Patterns
- Helper Apps
- pbpaste
- Web Interface (Fabric Web App)
- Meta
- π Support This Project
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.
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:
- Extracting the most interesting parts of YouTube videos and podcasts
- Writing an essay in your own voice with just an idea as an input
- Summarizing opaque academic papers
- Creating perfectly matched AI art prompts for a piece of writing
- Rating the quality of content to see if you want to read/watch the whole thing
- Getting summaries of long, boring content
- Explaining code to you
- Turning bad documentation into usable documentation
- Creating social media posts from any content input
- And a million moreβ¦
Installation
One-Line Install (Recommended)
Unix/Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.sh | bashWindows PowerShell:
iwr -useb https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.ps1 | iexSee 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@latestDocker
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 --serveImages available at:
- Docker Hub: kayvan/fabric
- GHCR: ksylvan/fabric
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:$PATHfor 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:$PATHSetup
Now run the following command
# Run the setup to set up your directories and keys
fabric --setupIf everything works you are good to go.
Supported AI Providers
Fabric supports a wide range of AI providers:
Native Integrations:
- OpenAI
- OpenAI Codex (ChatGPT/Codex subscription OAuth via private backend)
- Anthropic (Claude)
- Google Gemini
- Ollama (local models)
- Azure OpenAI
- Amazon Bedrock
- Vertex AI
- LM Studio
- Perplexity
OpenAI-Compatible Providers:
- Abacus
- AIML
- Cerebras
- DeepSeek
- DigitalOcean
- GitHub Models
- GrokAI
- Groq
- Langdock
- LiteLLM
- MiniMax
- Mistral
- Novita AI
- OpenRouter
- SiliconCloud
- Together
- Venice AI
- Z AI
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:
/* Detailed source-code truncated for AI context efficiency. */This also creates a yt alias that allows you to use yt https://www.youtube.com/watch?v=4b0iet22VIk to get transcripts, comments, and metadata.
Save your files in markdown using aliases
If in addition to the above aliases you would like to have the option to save the output to your favorite markdown note vault like Obsidian then instead of the above add the following to your .zshrc or .bashrc file:
# Define the base directory for Obsidian notes
obsidian_base="/path/to/obsidian"
# Loop through all files in the ~/.config/fabric/patterns directory
for pattern_file in ~/.config/fabric/patterns/*; do
# Get the base name of the file (i.e., remove the directory path)
pattern_name=$(basename "$pattern_file")
# Remove any existing alias with the same name
unalias "$pattern_name" 2>/dev/null
# Define a function dynamically for each pattern
eval "
$pattern_name() {
local title=\$1
local date_stamp=\$(date +'%Y-%m-%d')
local output_path=\"\$obsidian_base/\${date_stamp}-\${title}.md\"
# Check if a title was provided
if [ -n \"\$title\" ]; then
# If a title is provided, use the output path
fabric --pattern \"$pattern_name\" -o \"\$output_path\"
else
# If no title is provided, use --stream
fabric --pattern \"$pattern_name\" --stream
fi
}
"
doneThis will allow you to use the patterns as aliases like in the above for example summarize instead of fabric --pattern summarize --stream, however if you pass in an extra argument like this summarize "my_article_title" your output will be saved in the destination that you set in obsidian_base="/path/to/obsidian" in the following format YYYY-MM-DD-my_article_title.md where the date gets autogenerated for you.
You can tweak the date format by tweaking the date_stamp format.
Migration
If you have the Legacy (Python) version installed and want to migrate to the Go version, here's how you do it. It's basically two steps: 1) uninstall the Python version, and 2) install the Go version.
# Uninstall Legacy Fabric
pipx uninstall fabric
# Clear any old Fabric aliases
(check your .bashrc, .zshrc, etc.)
# Install the Go version
go install github.com/danielmiessler/fabric/cmd/fabric@latest
# Run setup for the new version. Important because things have changed
fabric --setupThen set your environmental variables as shown above.
Upgrading
The great thing about Go is that it's super easy to upgrade. Just run the same command you used to install it in the first place and you'll always get the latest version.
go install github.com/danielmiessler/fabric/cmd/fabric@latestShell Completions
Fabric provides shell completion scripts for Zsh, Bash, and Fish
shells, making it easier to use the CLI by providing tab completion
for commands and options.
Quick install (no clone required)
You can install completions directly via a one-liner:
curl -fsSL https://raw.githubusercontent.com/danielmiessler/Fabric/refs/heads/main/completions/setup-completions.sh | shOptional variants:
# Dry-run (see actions without changing your system)
curl -fsSL https://raw.githubusercontent.com/danielmiessler/Fabric/refs/heads/main/completions/setup-completions.sh | sh -s -- --dry-run
# Override the download source (advanced)
FABRIC_COMPLETIONS_BASE_URL="https://raw.githubusercontent.com/danielmiessler/Fabric/refs/heads/main/completions" \
sh -c "$(curl -fsSL https://raw.githubusercontent.com/danielmiessler/Fabric/refs/heads/main/completions/setup-completions.sh)"Zsh Completion
To enable Zsh completion:
# Copy the completion file to a directory in your $fpath
mkdir -p ~/.zsh/completions
cp completions/_fabric ~/.zsh/completions/
# Add the directory to fpath in your .zshrc before compinit
echo 'fpath=(~/.zsh/completions $fpath)' >> ~/.zshrc
echo 'autoload -Uz compinit && compinit' >> ~/.zshrcBash Completion
To enable Bash completion:
# Source the completion script in your .bashrc
echo 'source /path/to/fabric/completions/fabric.bash' >> ~/.bashrc
# Or copy to the system-wide bash completion directory
sudo cp completions/fabric.bash /etc/bash_completion.d/Fish Completion
To enable Fish completion:
# Copy the completion file to the fish completions directory
mkdir -p ~/.config/fish/completions
cp completions/fabric.fish ~/.config/fish/completions/Usage
Once you have it all set up, here's how to use it.
fabric -h/* Detailed source-code truncated for AI context efficiency. */Debug Levels
Use the --debug flag to control runtime logging:
0: off (default)1: basic debug info2: detailed debugging3: trace level4: wire level (full request and response bodies)
Dry Run Mode
Use --dry-run to preview what would be sent to the AI model without making an API call:
echo "test input" | fabric --dry-run -p summarizeThis is useful for debugging patterns, checking prompt construction, and verifying input formatting before using API credits.
Extensions
Fabric supports extensions that can be called within patterns. See the Extension Guide for complete documentation.
Important: Extensions only work within pattern files, not via direct stdin. See the guide for details and examples.
REST API Server
Fabric includes a built-in REST API server that exposes all core functionality over HTTP. Start the server with:
fabric --serveThe server provides endpoints for:
- Chat completions with streaming responses
- Pattern management (create, read, update, delete)
- Context and session management
- Model and vendor listing
- YouTube transcript extraction
- Configuration management
For complete endpoint documentation, authentication setup, and usage examples, see REST API Documentation.
Ollama Compatibility Mode
Fabric can serve as a drop-in replacement for Ollama by exposing Ollama-compatible API endpoints. Start the server with:
fabric --serve --serveOllamaThis enables the following Ollama-compatible endpoints:
GET /api/tags- List available patterns as modelsPOST /api/chat- Chat completionsGET /api/version- Server version
Applications configured to use the Ollama API can point to your Fabric server instead, allowing you to use any of Fabric's supported AI providers through the Ollama interface. Patterns appear as models (e.g., summarize:latest).
Our approach to prompting
Fabric Patterns are different than most prompts you'll see.
- First, we use
Markdownto help ensure maximum readability and editability. This not only helps the creator make a good one, but also anyone who wants to deeply understand what it does. Importantly, this also includes the AI you're sending it to!
Here's an example of a Fabric Pattern.
https://github.com/danielmiessler/Fabric/blob/main/data/patterns/extract_wisdom/system.mdNext, we are extremely clear in our instructions, and we use the Markdown structure to emphasize what we want the AI to do, and in what order.
And finally, we tend to use the System section of the prompt almost exclusively. In over a year of being heads-down with this stuff, we've just seen more efficacy from doing that. If that changes, or we're shown data that says otherwise, we will adjust.
Examples
The following examples use the macOS
pbpasteto paste from the clipboard. See the pbpaste section below for Windows and Linux alternatives.
Now let's look at some things you can do with Fabric.
Run the
summarizePattern based on input fromstdin. In this case, the body of an article.bashpbpaste | fabric --pattern summarizeRun the
analyze_claimsPattern with the--streamoption to get immediate and streaming results.bashpbpaste | fabric --stream --pattern analyze_claimsRun the
extract_wisdomPattern with the--streamoption to get immediate and streaming results from any Youtube video (much like in the original introduction video).bashfabric -y "https://youtube.com/watch?v=uXs-zPc63kM" --stream --pattern extract_wisdomCreate patterns- you must create a .md file with the pattern and save it to
~/.config/fabric/patterns/[yourpatternname].Run a
analyze_claimspattern on a website. Fabric uses Jina AI to scrape the URL into markdown format before sending it to the model.bashfabric -u https://github.com/danielmiessler/fabric/ -p analyze_claims
Just use the Patterns
If you're not looking to do anything fancy, and you just want a lot of great prompts, you can navigate to the /patterns directory and start exploring!
We hope that if you used nothing else from Fabric, the Patterns by themselves will make the project useful.
You can use any of the Patterns you see there in any AI application that you have, whether that's ChatGPT or some other app or website. Our plan and prediction is that people will soon be sharing many more than those we've published, and they will be way better than ours.
The wisdom of crowds for the win.
Prompt Strategies
Fabric also implements prompt strategies like "Chain of Thought" or "Chain of Draft" which can
be used in addition to the basic patterns.
See the Thinking Faster by Writing Less paper and
the Thought Generation section of Learn Prompting for examples of prompt strategies.
Each strategy is available as a small json file in the /strategies directory.
The prompt modification of the strategy is applied to the system prompt and passed on to the
LLM in the chat session.
Use fabric -S and select the option to install the strategies in your ~/.config/fabric directory.
Available Strategies
Fabric includes several prompt strategies:
cot- Chain-of-Thought: Step-by-step reasoningcod- Chain-of-Draft: Iterative drafting with minimal notes (5 words max per step)tot- Tree-of-Thought: Generate multiple reasoning paths and select the best oneaot- Atom-of-Thought: Break problems into smallest independent atomic sub-problemsltm- Least-to-Most: Solve problems from easiest to hardest sub-problemsself-consistent- Self-Consistency: Multiple reasoning paths with consensusself-refine- Self-Refinement: Answer, critique, and refinereflexion- Reflexion: Answer, critique briefly, and provide refined answerstandard- Standard: Direct answer without explanation
Use the --strategy flag to apply a strategy:
echo "Analyze this code" | fabric --strategy cot -p analyze_codeList all available strategies with:
fabric --liststrategiesStrategies are stored as JSON files in ~/.config/fabric/strategies/. See the default strategies for the format specification.
Custom Patterns
You may want to use Fabric to create your own custom Patternsβbut not share them with others. No problem!
Fabric now supports a dedicated custom patterns directory that keeps your personal patterns separate from the built-in ones. This means your custom patterns won't be overwritten when you update Fabric's built-in patterns.
Setting Up Custom Patterns
Run the Fabric setup:
bashfabric --setupSelect the "Custom Patterns" option from the Tools menu and enter your desired directory path (e.g.,
~/my-custom-patterns)Fabric will automatically create the directory if it does not exist.
Using Custom Patterns
Create your custom pattern directory structure:
bashmkdir -p ~/my-custom-patterns/my-analyzerCreate your pattern file
bashecho "You are an expert analyzer of ..." > ~/my-custom-patterns/my-analyzer/system.mdUse your custom pattern:
bashfabric --pattern my-analyzer "analyze this text"
How It Works
- Priority System: Custom patterns take precedence over built-in patterns with the same name
- Seamless Integration: Custom patterns appear in
fabric --listpatternsalongside built-in ones - Update Safe: Your custom patterns are never affected by
fabric --updatepatterns - Private by Default: Custom patterns remain private unless you explicitly share them
Your custom patterns are completely private and won't be affected by Fabric updates!
Helper Apps
Fabric also makes use of some core helper apps (tools) to make it easier to integrate with your various workflows. Here are some examples:
`to_pdf`
to_pdf is a helper command that converts LaTeX files to PDF format. You can use it like this:
to_pdf input.texThis will create a PDF file from the input LaTeX file in the same directory.
You can also use it with stdin which works perfectly with the write_latex pattern:
echo "ai security primer" | fabric --pattern write_latex | to_pdfThis will create a PDF file named output.pdf in the current directory.
`to_pdf` Installation
To install to_pdf, install it the same way as you install Fabric, just with a different repo name.
go install github.com/danielmiessler/fabric/cmd/to_pdf@latestMake sure you have a LaTeX distribution (like TeX Live or MiKTeX) installed on your system, as to_pdf requires pdflatex to be available in your system's PATH.
`code2context`
code2context is used in conjunction with the create_coding_feature pattern.
It generates a json representation of a directory of code that can be fed into an AI model
with instructions to create a new feature or edit the code in a specified way.
See the Create Coding Feature Pattern README for details.
Install it first using:
go install github.com/danielmiessler/fabric/cmd/code2context@latest`generate_changelog`
generate_changelog generates changelogs from git commit history and GitHub pull requests. It walks through your repository's git history, extracts PR information, and produces well-formatted markdown changelogs.
generate_changelog --helpFeatures include SQLite caching for fast incremental updates, GitHub GraphQL API integration for efficient PR fetching, and optional AI-enhanced summaries using Fabric.
Install it using:
go install github.com/danielmiessler/fabric/cmd/generate_changelog@latestSee the generate_changelog README for detailed usage and options.
pbpaste
The examples use the macOS program pbpaste to paste content from the clipboard to pipe into fabric as the input. pbpaste is not available on Windows or Linux, but there are alternatives.
On Windows, you can use the PowerShell command Get-Clipboard from a PowerShell command prompt. If you like, you can also alias it to pbpaste. If you are using classic PowerShell, edit the file ~\Documents\WindowsPowerShell\.profile.ps1, or if you are using PowerShell Core, edit ~\Documents\PowerShell\.profile.ps1 and add the alias,
Set-Alias pbpaste Get-ClipboardOn Linux, you can use xclip -selection clipboard -o to paste from the clipboard. You will likely need to install xclip with your package manager. For Debian based systems including Ubuntu,
sudo apt update
sudo apt install xclip -yYou can also create an alias by editing ~/.bashrc or ~/.zshrc and adding the alias,
alias pbpaste='xclip -selection clipboard -o'Web Interface (Fabric Web App)
Fabric now includes a built-in web interface that provides a GUI alternative to the command-line interface. Refer to Web App README for installation instructions and an overview of features.
Meta
[!NOTE]
Special thanks to the following people for their inspiration and contributions!
- Jonathan Dunn for being the absolute MVP dev on the project, including spearheading the new Go version, as well as the GUI! All this while also being a full-time medical doctor!
- Caleb Sima for pushing me over the edge of whether to make this a public project or not.
- Eugen Eisler and Frederick Ros for their invaluable contributions to the Go version
- David Peters for his work on the web interface.
- Joel Parish for super useful input on the project's Github directory structure..
- Joseph Thacker for the idea of a
-ccontext flag that adds pre-created context in the./config/fabric/directory to all Pattern queries. - Jason Haddix for the idea of a stitch (chained Pattern) to filter content using a local model before sending on to a cloud model, i.e., cleaning customer data using
llama2before sending on togpt-4for analysis. - Andre Guerra for assisting with numerous components to make things simpler and more maintainable.
Primary contributors
Contributors
Made with contrib.rocks.
fabric was created by Daniel Miessler in January of 2024.
π Support This Project
File: cmd/generate_changelog/README.md
Changelog Generator
A high-performance changelog generator for Git repositories that automatically creates comprehensive, well-formatted changelogs from your git history and GitHub pull requests.
Features
- One-pass git history walking: Efficiently processes entire repository history in a single pass
- Automatic PR detection: Extracts pull request information from merge commits
- GitHub API integration: Fetches detailed PR information including commits, authors, and descriptions
- Smart caching: SQLite-based caching for instant incremental updates
- Unreleased changes: Tracks all commits since the last release
- Concurrent processing: Parallel GitHub API calls for improved performance
- Flexible output: Generate complete changelogs or target specific versions
- GraphQL optimization: Ultra-fast PR fetching using GitHub GraphQL API (~5-10 calls vs 1000s)
- Intelligent sync: Automatically syncs new PRs every 24 hours or when missing PRs are detected
- AI-powered summaries: Optional Fabric integration for enhanced changelog summaries
- Advanced caching: Content-based change detection for AI summaries with hash comparison
- Author type detection: Distinguishes between users, bots, and organizations
- Lightning-fast incremental updates: SHAβPR mapping for instant git operations
Installation
go install github.com/danielmiessler/fabric/cmd/generate_changelog@latestUsage
Basic usage (generate complete changelog)
generate_changelogSave to file
generate_changelog -o CHANGELOG.mdGenerate for specific version
generate_changelog -v v1.4.244Limit to recent versions
generate_changelog -l 10Using GitHub token for private repos or higher rate limits
export GITHUB_TOKEN=your_token_here
generate_changelog
# Or pass directly
generate_changelog --token your_token_hereAI-enhanced summaries
# Enable AI summaries using Fabric
generate_changelog --ai-summarize
# Use custom model for AI summaries
FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-opus-4 generate_changelog --ai-summarizeCache management
# Rebuild cache from scratch
generate_changelog --rebuild-cache
# Force a full PR sync from GitHub
generate_changelog --force-pr-sync
# Disable cache usage
generate_changelog --no-cache
# Use custom cache location
generate_changelog --cache /path/to/cache.dbCommand Line Options
| Flag | Short | Description | Default |
|---|---|---|---|
--repo |
-r |
Repository path | . (current directory) |
--output |
-o |
Output file | stdout |
--limit |
-l |
Limit number of versions | 0 (all) |
--version |
-v |
Generate for specific version | |
--save-data |
Save version data to JSON | false | |
--cache |
Cache database file | ./cmd/generate_changelog/changelog.db |
|
--no-cache |
Disable cache usage | false | |
--rebuild-cache |
Rebuild cache from scratch | false | |
--force-pr-sync |
Force a full PR sync from GitHub | false | |
--token |
GitHub API token | $GITHUB_TOKEN |
|
--ai-summarize |
Generate AI-enhanced summaries using Fabric | false | |
--release |
Update GitHub release description with AI summary for version |
Output Format
The generated changelog follows this structure:
# Changelog
## Unreleased
### PR [#1601](url) by [author](profile): PR Title
- Change description 1
- Change description 2
### Direct commits
- Direct commit message 1
- Direct commit message 2
## v1.4.244 (2025-07-09)
### PR [#1598](url) by [author](profile): PR Title
- Change description
...How It Works
- Git History Walking: The tool walks through your git history from newest to oldest commits
- Version Detection: Identifies version bump commits (pattern: "Update version to vX.Y.Z")
- PR Extraction: Detects merge commits and extracts PR numbers
- GitHub API Calls: Fetches detailed PR information in parallel batches
- Change Extraction: Extracts changes from PR commit messages or PR body
- Formatting: Generates clean, organized markdown output
Performance
- Native Go libraries: Uses go-git and go-github for maximum performance
- Concurrent API calls: Processes up to 10 GitHub API requests in parallel
- Smart caching: SQLite cache eliminates redundant API calls
- Incremental updates: Only processes new commits on subsequent runs
- GraphQL optimization: Uses GitHub GraphQL API to fetch all PR data in ~5-10 calls
- AI-powered summaries: Optional Fabric integration with intelligent caching
- Content-based change detection: AI summaries only regenerated when content changes
- Lightning-fast git operations: SHAβPR mapping stored in database for instant lookups
Major Optimization: GraphQL + Advanced Caching
The tool has been optimized to drastically reduce GitHub API calls and improve performance:
Previous approach: Individual API calls for each PR (2 API calls per PR)
- For a repo with 500 PRs: 1,000 API calls
Current approach: GraphQL batch fetching with intelligent caching
- For a repo with 500 PRs: ~5-10 GraphQL calls (initial fetch) + 0 calls (subsequent runs with cache)
- 99%+ reduction in API calls after initial run!
The optimization includes:
- GraphQL Batch Fetch: Uses GitHub's GraphQL API to fetch all merged PRs with commits in minimal calls
- Smart Caching: Stores complete PR data, commits, and SHA mappings in SQLite
- Incremental Sync: Only fetches PRs merged after the last sync timestamp
- Automatic Refresh: PRs are synced every 24 hours or when missing PRs are detected
- AI Summary Caching: Content-based change detection prevents unnecessary AI regeneration
- Fallback Support: If GraphQL fails, falls back to REST API batch fetching
- Lightning Git Operations: Pre-computed SHAβPR mappings for instant commit association
Requirements
- Go 1.24+ (for installation from source)
- Git repository
- GitHub token (optional, for private repos or higher rate limits)
- Fabric CLI (optional, for AI-enhanced summaries)
Authentication
The tool supports GitHub authentication via:
- Environment variable:
export GITHUB_TOKEN=your_token - Command line flag:
--token your_token .envfile in the same directory as the binary
Environment File Support
Create a .env file next to the generate_changelog binary:
GITHUB_TOKEN=your_github_token_here
FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-sonnet-4-20250514The tool automatically loads .env files for convenient configuration management.
Without authentication, the tool is limited to 60 GitHub API requests per hour.
Caching
The SQLite cache stores:
- Version information and commit associations
- Pull request details (title, body, commits, authors)
- Last processed commit SHA for incremental updates
- Last PR sync timestamp for intelligent refresh
- AI summaries with content-based change detection
- SHAβPR mappings for lightning-fast git operations
Cache benefits:
- Instant changelog regeneration
- Drastically reduced GitHub API usage (99%+ reduction after initial run)
- Offline changelog generation (after initial cache build)
- Automatic PR data refresh every 24 hours
- Batch database transactions for better performance
- Content-aware AI summary regeneration
AI-Enhanced Summaries
The tool can generate AI-powered summaries using Fabric for more polished, professional changelogs:
# Enable AI summarization
generate_changelog --ai-summarize
# Custom model (default: claude-sonnet-4-20250514)
FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-opus-4 generate_changelog --ai-summarizeAI Summary Features
- Content-based change detection: AI summaries are only regenerated when version content changes
- Intelligent caching: Preserves existing summaries and only processes changed versions
- Content hash comparison: Uses SHA256 hashing to detect when "Unreleased" content changes
- Automatic fallback: Falls back to raw content if AI processing fails
- Error detection: Identifies and handles AI processing errors gracefully
- Minimum content filtering: Skips AI processing for very brief content (< 256 characters)
AI Model Configuration
Set the model via environment variable:
export FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-opus-4
# or
export FABRIC_CHANGELOG_SUMMARIZE_MODEL=gpt-5.2AI summaries are cached and only regenerated when:
- Version content changes (detected via hash comparison)
- No existing AI summary exists for the version
- Force rebuild is requested
Contributing
This tool is part of the Fabric project. Contributions are welcome!
License
The MIT License. Same as the Fabric project.
File: data/patterns/humanize/README.md
Humanize: Turn stiff AI text π€ into human-sounding gold πͺ
Humanize aims to help make AI writing sound more like a real person wrote it. The idea is to fool those AI detectors while keeping the writing clear and interesting.
This project focuses on fixing those signs of AI writing β the stuff that makes it sound stiff or too perfect.
We tried it out on a long and tricky example: a story about "why dogs spin before they sit" π, written by Gemini. Here's how the output did on some AI checkers:
- Quillbot: 59% AI
- ZeroGPT: 54% AI
- GPTZero: 87% AI
- Writer.com: 15% AI
Other example give 0% score, so it reall depends on the input text, which AI and which scanner you use.
Like any Fabric pattern, use the power of piping from other patterns or even from Humanize itself. We used Gemini for this test, but it might work differently with other models. So play around and see what you find... and yes, this text have been Humanized (and revised) π
Have fun using Humanize!
Input AI text example:
/* Detailed source-code truncated for AI context efficiency. */Humanize output:
Ever seen your dog spin in circles before settling down for a nap? It's a pretty common thing, but why do they do it? Nobody's entirely sure, but there are a few good guesses.
One idea is that it's an instinct from their wolf ancestors. Imagine a wolf trying to find a comfy spot in tall grass β spinning around would make a little nest.
Another thought is that it's all about comfort. Spinning flattens things out, making a nice, even spot for a nap. You see this a lot in dogs who are picky about where they sleep.
Some people think it's about marking their territory. Spinning spreads their scent, kind of like saying, "This is mine!" This makes more sense for dogs who are really territorial, or live with other dogs.
And then there's the "it's just fun" theory. Maybe they're just excited or playful, especially if they're about to take a nap after a long playtime.
It's probably a mix of all these things. Every dog is different, so their reasons might be a little different too. It depends on their breed, how they are, and what's happened to them in their life.
If your dog does this, try watching them. What are they doing right before they start spinning? Are they tired, or excited? Paying attention might give you a clue about why *your* dog does it. It's a fun little mystery to solve together!File: data/patterns/extract_wisdom_with_attribution/README.md
extract_wisdom_with_attribution
This pattern extends the extract_wisdom pattern by adding speaker names in the Quotes section of the
produced output.
File: data/patterns/extract_wisdom/README.md
Description
extractwisdom addresses the problem of too much content and too little time.
Not only that, but it's also too easy to forget the stuff we read, watch, or listen to.
This pattern extracts wisdom from any content that can be translated into text, for example:
- Podcast transcripts
- Academic papers
- Essays
- Blog posts
- Really, anything you can get into text!
Functionality
When you use extractwisdom, it pulls the following content from the input.
IDEAS- Extracts the best ideas from the content, i.e., what you might have taken notes on if you were doing so manually.
QUOTES- Some of the best quotes from the content.
REFERENCES- External writing, art, and other content referenced positively during the content that might be worth following up on.
HABITS- Habits of the speakers that could be worth replicating.
RECOMMENDATIONS- A list of things that the content recommends Habits of the speakers.
Use cases
extractwisdom output can help you in multiple ways, including:
Time Filtering
Allows you to quickly see if content is worth an in-depth review or not.Note Taking
Can be used as a substitute for taking time-consuming, manual notes on the content.
Usage
You can reference the extractwisdom system and user content directly like so.
Pull the _system_ prompt directly
curl -sS https://github.com/danielmiessler/fabric/blob/main/extract-wisdom/dmiessler/extract-wisdom-1.0.0/system.mdPull the _user_ prompt directly
curl -sS https://github.com/danielmiessler/fabric/blob/main/extract-wisdom/dmiessler/extract-wisdom-1.0.0/user.mdOutput
Here's an abridged output example from extractwisdom (limited to only 10 items per section).
/* Detailed source-code truncated for AI context efficiency. */This allows you to quickly extract what's valuable and meaningful from the content for the use cases above.
Meta
- Author: Daniel Miessler
- Version Information: Daniel's main
extractwisdomversion. - Published: January 5, 2024
File: data/patterns/extract_recipe/README.md
extract_ctf_writeup
`extract_ctf_writeup` is a [Fabric](https://github.com/danielmiessler/fabric) pattern that *extracts a recipe*.
Description
This pattern is used to create a short recipe, consisting of two parts:
- A list of ingredients
- A step by step guide on how to prepare the meal
Meta
- Author: Martin Riedel
File: data/patterns/extract_product_features/README.md
Description
extractwisdom addresses the problem of too much content and too little time.
Not only that, but it's also too easy to forget the stuff we read, watch, or listen to.
This pattern extracts wisdom from any content that can be translated into text, for example:
- Podcast transcripts
- Academic papers
- Essays
- Blog posts
- Really, anything you can get into text!
Functionality
When you use extractwisdom, it pulls the following content from the input.
IDEAS- Extracts the best ideas from the content, i.e., what you might have taken notes on if you were doing so manually.
QUOTES- Some of the best quotes from the content.
REFERENCES- External writing, art, and other content referenced positively during the content that might be worth following up on.
HABITS- Habits of the speakers that could be worth replicating.
RECOMMENDATIONS- A list of things that the content recommends Habits of the speakers.
Use cases
extractwisdom output can help you in multiple ways, including:
Time Filtering
Allows you to quickly see if content is worth an in-depth review or not.Note Taking
Can be used as a substitute for taking time-consuming, manual notes on the content.
Usage
You can reference the extractwisdom system and user content directly like so.
Pull the _system_ prompt directly
curl -sS https://github.com/danielmiessler/fabric/blob/main/extract-wisdom/dmiessler/extract-wisdom-1.0.0/system.mdPull the _user_ prompt directly
curl -sS https://github.com/danielmiessler/fabric/blob/main/extract-wisdom/dmiessler/extract-wisdom-1.0.0/user.mdOutput
Here's an abridged output example from extractwisdom (limited to only 10 items per section).
/* Detailed source-code truncated for AI context efficiency. */This allows you to quickly extract what's valuable and meaningful from the content for the use cases above.
Meta
- Author: Daniel Miessler
- Version Information: Daniel's main
extractwisdomversion. - Published: January 5, 2024
File: data/patterns/extract_ethical_framework/README.md
Extract Ethical Framework
Make implicit ethics explicit. Every prescriptive document contains hidden ethical assumptions β this pattern surfaces them.
Why This Matters
- Terms of Service contain implicit ethics
- AI system descriptions contain implicit ethics
- Policies and laws contain implicit ethics
- Manifestos contain implicit ethics
Making them explicit allows:
- Checking for internal consistency
- Evaluating against minimal ethical standards
- Identifying hidden coercion
- Challenging unstated assumptions
What It Extracts
| Question | What to Find |
|---|---|
| Who counts? | Whose interests matter? |
| What's harm? | What are agents protected from? |
| What's consent? | How is agreement established? |
| Who decides? | Who has authority and why? |
| When is force OK? | What justifies coercion? |
| What wins? | Hierarchy when values conflict |
Usage
# Analyze terms of service
cat tos.txt | fabric -p extract_ethical_framework
# Analyze an AI safety proposal
echo "The AI should be beneficial and aligned with human values" | fabric -p extract_ethical_framework
# Audit a policy document
fabric -p extract_ethical_framework < policy.mdThe Minimal Standard
Does the framework authorize creating unwilling victims?
If yes β it fails the minimal ethics test, regardless of how coherent it is internally.
Source
From the Ultimate Law framework: github.com/ghrom/ultimatelaw
File: data/patterns/extract_ctf_writeup/README.md
extract_ctf_writeup
`extract_ctf_writeup` is a [Fabric](https://github.com/danielmiessler/fabric) pattern that *extracts a short writeup* from a warstory-like text about a cyber security engagement.
Description
This pattern is used to create quickly readable CTF Writeups to help the user decide, if it is beneficial for them to read/watch the full writeup. It extracts the exploited vulnerabilities, references that have been made and a timeline of the CTF.
Meta
- Author: Martin Riedel
File: data/patterns/extract_article_wisdom/README.md
Description
extractwisdom addresses the problem of too much content and too little time.
Not only that, but it's also too easy to forget the stuff you read, watch, or listen to.
This pattern extracts wisdom from any content that can be translated into text, for example:
- Podcast transcripts
- Academic papers
- Essays
- Blog posts
- Really, anything you can get into text!
Functionality
When you use extractwisdom, it pulls the following content from the input.
IDEAS- Extracts the best ideas from the content, i.e., what you might have taken notes on if you were doing so manually.
QUOTES- Some of the best quotes from the content.
REFERENCES- External writing, art, and other content referenced positively during the content that might be worth following up on.
HABITS- Habits of the speakers that could be worth replicating.
RECOMMENDATIONS- A list of things that the content recommends Habits of the speakers.
Use cases
extractwisdom output can help you in multiple ways, including:
Time Filtering
Allows you to quickly see if content is worth an in-depth review or not.Note Taking
Can be used as a substitute for taking time-consuming, manual notes on the content.
Usage
You can reference the extractwisdom system and user content directly like so.
Pull the _system_ prompt directly
curl -sS https://raw.githubusercontent.com/danielmiessler/fabric/main/patterns/extract_wisdom/dmiessler/extract_wisdom-1.0.0/system.mdPull the _user_ prompt directly
curl -sS https://raw.githubusercontent.com/danielmiessler/fabric/main/patterns/extract_wisdom/dmiessler/extract_wisdom-1.0.0/user.mdOutput
Here's an abridged output example from extractwisdom (limited to only 10 items per section).
/* Detailed source-code truncated for AI context efficiency. */This allows you to quickly extract what's valuable and meaningful from the content for the use cases above.
Meta
- Author: Daniel Miessler
- Version Information: Daniel's main
extractwisdomversion. - Published: January 5, 2024