How to Use Fabric: The Beginner's Guide (First Install, the Patterns Lesson, First Pattern Run, Sessions, and Custom Patterns)
CodexFuse Team · 2026-11-07T05:42:26.521Z · 17 min read min read
How Do I Use Fabric?
Learning how to use fabric takes seven moves: install Fabric 1.4.564, run the setup, add an API key, pick a pattern, pipe text into it, stream the answer, and save the output. Fabric is an open-source framework for augmenting humans using AI, built by Daniel Miessler, and a pattern is a reusable Markdown prompt that solves one real-world task. Fabric here means the danielmiessler/fabric command-line tool, not cloth, not the Minecraft mod loader, not Microsoft Fabric, not Fabric.js, and not the Python SSH library, and this fabric ai tutorial follows the official documentation, the project repository, and the release notes, with every fact checked as of November 2026.
CodexFuse offers no Fabric tool, so this guide teaches the real project on your own machine, not a web version of it. No Facebook promotion applies to this guide. Fabric talks to nearly 60 AI vendors through one command, and Ollama is one of its native vendors for local models, so the Ollama beginner guide covers the local-model half of the setup while this guide covers Fabric itself.
- Install Fabric with the one-line installer and run fabric --version to confirm 1.4.564.
- Run fabric --setup and add the API key for your vendor.
- List the patterns with fabric --listpatterns and pick one for your task.
- Pipe text into a pattern with echo "your text" | fabric --pattern summarize.
- Stream a long answer with fabric --stream --pattern analyze_claims.
- Turn a video into notes with fabric -y "video URL" --pattern extract_wisdom.
- Save the result with fabric --pattern summarize --output notes.md.
What Is Fabric, Exactly?
A fabric ai framework is a library of reusable prompts plus one command that runs them against almost any AI vendor. Fabric organizes prompts by real-world task, and each prompt is called a Pattern, a Markdown file that tells the model exactly what to do and in what order. The fabric patterns collection holds 265 prompts in the project repository, from summarize and extract_wisdom to analyze_claims and create_prd, and you can use any of them inside Fabric or copy one into any other AI app.
Fabric is an AI augmentation framework, not a model, and that distinction is the whole mental model. You bring your own API keys and pay your own vendor usage, while Fabric supplies the prompts, the piping, and the vendor switching. The project README lists 47 vendors while the source code registers nearly 60, so the honest count is nearly 60 vendors with 47 documented in the README, and the gap exists because new providers land in code before the docs catch up.
The project is young, fast-moving, and heavily starred, which is why this guide pins every version number to the release it was checked against. Daniel Miessler created Fabric in January 2024, and the daniel miessler fabric repository has gathered 44,564 stars and 4,338 forks in the 1,039 days since, with releases landing almost daily. The current release is v1.4.564, published on 3 November 2026, four days before this guide, and it adds Obscurify AI as a new vendor.
| Metric | Value |
|---|---|
| Stars | 44,564 |
| Forks | 4,338 |
| Open issues | 29 |
| Created | 3 January 2024 |
| Age | 1,039 days (2.84 years) |
| Stars per fork | 10.27 |
| Open issues per 100 stars | 0.07 |
| Latest release | v1.4.564 (3 November 2026) |
| License | MIT |
| Language | Go |
| Default branch | main |
print("Repo age in days:", 1039)
print("Repo age in years:", 2.84)
print("Stars per fork:", 10.27)
print("Open issues per 100 stars:", 0.07)
print("Forks per 100 stars:", 9.73)
print("Release age in days:", 4)
print("Vendors in the README:", 47)
print("Vendors in the code:", 59)
print("Patterns shipped:", 265)
print("Strategies shipped:", 9)
How Do I Install Fabric?
A fabric install starts with the one-line installer, which is the route the README recommends. On Linux or macOS, one command downloads the installer and runs it, and on Windows the same job is one PowerShell command. The installer places the fabric binary on your path, and fabric --version then prints the installed version so you can confirm the install worked.
curl -fsSL https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.sh | bash fabric --version iwr -useb https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.ps1 | iex fabric --version
The source route is go install with the cmd/fabric path, and the old command without that path is dead. The repository has no main package at its root, so go install github.com/danielmiessler/fabric@latest fails, while go install github.com/danielmiessler/fabric/cmd/fabric@latest builds the binary from cmd/fabric/main.go. The old path still appears in 2024 guides and in stale package mirrors, so copy the current command from this guide or from the README, not from an old tutorial.
go install github.com/danielmiessler/fabric/cmd/fabric@latest fabric --version
Homebrew users install the fabric-ai formula, never the fabric formula, because the names point at two different projects. The command brew install fabric-ai installs this tool under the binary name fabric-ai, and the README advises the alias fabric='fabric-ai' so the shorter name works. The command brew install fabric installs the Python SSH library from fabfile.org instead, which is a different tool with the same short name, so check the formula name before you install.
| Route | Command | Status on 7 November 2026 |
|---|---|---|
| One-line installer (Linux, macOS) | curl -fsSL https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.sh | bash | Recommended by the README |
| One-line installer (Windows) | iwr -useb https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.ps1 | iex | Recommended by the README |
| Go source | go install github.com/danielmiessler/fabric/cmd/fabric@latest | Current |
| Homebrew | brew install fabric-ai | Current at 1.4.564, alias fabric to fabric-ai |
| Winget | winget install danielmiessler.Fabric | Lags one release, 1.4.563 |
| Scoop | scoop install fabric-ai | Current at 1.4.564 |
| Arch AUR | yay -S fabric-ai | Stale at 1.4.375 |
| Docker | docker run --rm -it kayvan/fabric:latest --version | README-documented |
| Chocolatey | None found | No package under the fabric-ai ID |
Docker is the route for trying Fabric without installing anything on your host, and it needs your config directory mounted into the container. The README example runs kayvan/fabric:latest with the home config folder mounted, and the container then reads the same keys and patterns as a local install. The Docker beginner guide covers the container basics if Docker itself is new to you, and the Git beginner guide covers the clone-and-build path if you install from source.
How Do I Set Up Fabric and Add My API Keys?
The fabric setup step is one command, fabric --setup, and it walks you through keys, models, and pattern folders. The setup installs the 265 patterns, asks which vendors you use, and stores each key in a file called .env under ~/.config/fabric, written with mode 0600 so only your user account can read it. Setup also asks where your custom patterns should live, and that choice matters later, because custom patterns live outside the built-in folder.
fabric --setup fabric --listvendors fabric --listmodels
A vendor key is a normal API key from that vendor, and Fabric never sells or shares it, because the key stays in your own .env file on your own machine. Pick a default model with fabric --changeDefaultModel, or pass a model per call with fabric --model, and a vendor per call with fabric --vendor. The --listvendors flag prints every vendor Fabric knows, and --listmodels prints the models each vendor offers, so you can check a name before you spend a call on it.
What Is a Pattern, and How Do I Run One?
A Pattern is a Markdown prompt that solves one task, and Fabric treats it as the fundamental unit of AI work. Most patterns are a single system.md file with sections for identity, steps, and output format, and Fabric sends almost the whole prompt as the system message so the model follows the structure exactly. You can list every pattern with fabric --listpatterns and read any single one with fabric --readpattern, so browsing costs nothing before you run your first real call.
Running a pattern is one pipe: text goes in on stdin, the pattern shapes the request, and the answer comes back on stdout. The classic first run pipes clipboard text into the summarize pattern, and the stream flag prints the answer as it arrives instead of waiting for the whole response. The copy flag puts the answer on your clipboard, and the output flag writes it to a file, so a summary can land straight in your notes.
pbpaste | fabric --pattern summarize pbpaste | fabric --stream --pattern analyze_claims echo "An idea that coding is like speaking with rules." | fabric -sp write_essay fabric --listpatterns fabric --pattern summarize --output notes.md
The -p flag is the short form of --pattern, and -s is the short form of --stream, so the same commands get shorter once your fingers learn them. Variables let one pattern adapt to a job, with -v flags such as -v=#role:expert, and the temperature flag defaults to 0.7 with top-p at 0.9, so you can leave both alone until a pattern misbehaves. The dry-run flag previews exactly what Fabric would send without calling the model, which is the cheapest way to check a pattern before you spend tokens on it.
How Do I Turn a YouTube Video into Notes with extract_wisdom?
The fabric extract wisdom pattern is the single most popular pattern in the collection, and it turns a video transcript into structured notes. It takes a YouTube URL, fetches the transcript, and returns a summary, a list of surprising ideas, refined insights, and exact quotes with speaker names. The pattern demands a 25-word summary, 20 to 50 ideas, 10 to 20 insights, and 15 to 30 quotes, so the output is long on purpose, and the stream flag keeps it readable while it arrives.
fabric -y "https://www.youtube.com/watch?v=uXs-zPc63kM" --stream --pattern extract_wisdom yt https://www.youtube.com/watch?v=uXs-zPc63kM | fabric -p extract_wisdom
The -y flag is the built-in YouTube route, and the yt shell helper from the README does the same job by piping a transcript into Fabric. Both routes use the YouTube API key that setup asks for, and both keep the video itself out of the model call, because only the transcript text is sent. The Whisper beginner guide covers local speech-to-text if your video has no transcript, since Fabric can also transcribe media files with its transcribe flag.
The extract_wisdom pattern also works on articles, papers, and essays, not just videos, because it takes any text you pipe into it. Variants in the repo tune the same job for agents, direct messages, and attribution, and the no-meta variant skips the framing sections for a shorter result. Start with the plain extract_wisdom pattern, and switch variants only when the default output feels wrong for your material.
How Do Sessions and Contexts Work?
A session is Fabric remembering a conversation, and a context is a reusable block of text that opens every conversation in that session. Sessions live as JSON files under ~/.config/fabric/sessions, and contexts live as plain files under ~/.config/fabric/contexts, with the filename as the context name. The two combine into one system message, so a context sets the voice and the pattern sets the job, and the reply is appended to the session for the next call.
| Flag | What it does |
|---|---|
| --session name | Continue or create a named session |
| --listsessions (-X) | List all sessions |
| --printsession name | Print a session |
| --wipesession name | Delete a session |
| --context name (-C) | Use a named context |
| --listcontexts (-x) | List all contexts |
| --printcontext name | Print a context |
| --wipecontext name | Delete a context |
A session is the simplest way to refine an answer, because the next call sees the previous exchange. Ask for a summary in one call, then ask the same session to turn it into a checklist, and the model works from its own earlier output instead of starting over. Contexts do the opposite job: one file can hold your role, your audience, and your house style, and every call with that context starts from the same footing.
The --serve flag turns Fabric into a small REST API on port 8080, which is the natural way to run it on a server you control. The VPS hosting guide covers the machine that API lives on, and the serve flag keeps the same patterns and vendors as the command line.
How Do I Make My Own Custom Patterns?
A fabric custom patterns folder is a directory you choose during setup, and it holds the patterns only you use. Built-in patterns live under ~/.config/fabric/patterns, while your own patterns live in the separate folder you picked, or in the folder named by the CUSTOM_PATTERNS_DIRECTORY variable. A custom pattern with the same name as a built-in one wins, so you can override a shipped pattern without editing the shipped file.
Creating a pattern is writing one Markdown file with an identity section, a steps section, and an output section, and the repo ships an official_pattern_template to copy. The create_pattern pattern can draft one for you, and the --readpattern flag prints any shipped pattern so you can study its structure first. Pattern updates run through fabric --updatepatterns, and there is no --update flag, so the update command is --updatepatterns with a capital U as its short form.
Updates never touch your custom folder, which is the whole point of keeping it separate. Built-in patterns refresh from the repository when you run the update command, while your own files stay exactly as you wrote them. Keep a copy of your custom folder outside Fabric as well, because a fresh setup on a new machine starts with an empty one.
What Are Strategies, and When Do I Use One?
A strategy is a reasoning recipe that Fabric applies on top of a pattern, and the repo ships nine of them. The list runs from chain-of-thought and tree-of-thought to self-refine and reflexion, and each one changes how the model works through a problem before it answers. The --strategy flag picks one per call, and --liststrategies prints the nine names so you can see them before you choose.
Most beginners can ignore strategies for the first week, because the default standard strategy handles ordinary summaries and extractions well. Reach for chain-of-thought when a pattern needs visible reasoning, and for self-refine when the first answer keeps missing the mark. The strategy changes the reasoning, not the pattern, so the same summarize call can behave differently with a different strategy attached.
Fabric vs Mods: Which One Fits Your Workflow?
Fabric vs mods is the comparison most readers ask about, and the two tools solve different problems. Fabric is a library of reusable Markdown patterns plus a multi-vendor command, with sessions, contexts, and a REST API, while mods is a pipe-native client that sends one ad-hoc prompt per call and prints the answer to stdout. Mods has no pattern library and no sessions, so it fits one-off calls, while Fabric fits repeated jobs you run the same way every day.
The comparison has an expiry date, because Charm archived the mods repository on 9 March 2026 to focus on Crush. Mods still works for existing installs, and its last stable release is v1.8.1 from July 2025, but new work should compare Fabric against Crush in non-interactive mode instead. If your workflow is already built on mods, it keeps running, and if you are choosing fresh, Fabric is the maintained option of the two.
| Feature | Fabric | mods |
|---|---|---|
| Core idea | Reusable pattern library | One-off prompt per call |
| Patterns | 265 shipped, plus custom | None |
| Vendors | Nearly 60 | Configured per YAML file |
| Sessions and contexts | Yes, built in | No |
| YouTube and URL input | Built in (-y, -u) | No |
| REST API | Built in (--serve) | No |
| Status | Actively released (v1.4.564) | Archived 9 March 2026 |
Seven Mistakes Beginners Make with Fabric
Most Fabric frustration comes from seven repeatable mistakes, and each one has a one-line fix. The table below lists the mistake, why it bites, and the fix, so you can check your own setup against it before your first real run.
| Mistake | Why it bites | Fix |
|---|---|---|
| Installing with the old go install path | No main package at the repo root, so the build fails | Use the cmd/fabric path, or the one-line installer |
| Running brew install fabric | Installs the Python SSH library, not this tool | Install fabric-ai and alias it to fabric |
| Skipping fabric --setup | No keys means every call fails | Run setup and add at least one vendor key |
| Putting custom patterns in the built-in folder | Updates overwrite them | Keep custom patterns in your separate folder |
| Running fabric --update to refresh patterns | No such flag exists | Run fabric --updatepatterns |
| Piping a whole video file into a pattern | The model gets binary data, not words | Use -y for the transcript, or transcribe first |
| Forgetting --stream on a long extraction | The answer arrives in one block after a long silence | Add --stream to watch it arrive |
Sources
The facts in this guide come from the Fabric repository, its README, and the GitHub API, all fetched on 7 November 2026. The repository page records 44,564 stars, 4,338 forks, and 29 open issues, and the releases endpoint records v1.4.564 as published on 3 November 2026. The README records the one-line installer, the corrected Go install path, the 47 listed vendors, the 265 shipped patterns, and the nine strategies.
The contexts and sessions tutorial in the repository docs records the session and context file locations and flags. The Homebrew formula for fabric-ai records version 1.4.564, and the winget package manifests record versions up to 1.4.563, with the 1.4.564 manifest returning a 404 on 7 November 2026. The mods repository records its archival on 9 March 2026, and Daniel Miessler's origin-story post records why he created Fabric in January 2024.
No terminal outputs in this guide were executed in a live testbed, so every command shown is documented syntax from the README and the official examples, not a transcript of a run on this machine. Search results for the Fabric phrases were checked on 7 November 2026, and the page-1 field was the vendor README, two 2024-era independent guides, a stale package mirror, and a newsletter blurb, with no complete current beginner walkthrough.
Frequently Asked Questions
Is Fabric free to use?
Fabric itself is free and open source under the MIT license, and you can install it and read every pattern without paying anything. The AI calls are not free, because each call uses your own vendor key and your vendor bills you for the tokens it processes. A local vendor such as Ollama costs nothing per call beyond the electricity for your own machine, so the cheapest way to learn Fabric is with a local model.
Do I need to know Go to use Fabric?
No, the one-line installer needs no Go knowledge, and neither do the Homebrew, winget, and Scoop routes. Go matters only for the source route, which builds Fabric from its repository with one go install command. The patterns themselves are Markdown files, so editing one needs a text editor, not a compiler.
What is the difference between Fabric and just pasting a prompt into ChatGPT?
A pasted prompt is a one-off, while a Fabric pattern is a saved, reusable, versioned prompt that runs the same way every time. Fabric also pipes text in from files, clipboards, YouTube transcripts, and URLs, and it keeps sessions and contexts across calls, which a chat window does not do the same way. The patterns are plain Markdown, so you can also copy any single pattern into ChatGPT and use it there without Fabric at all.
Can I use Fabric with local models and no API key?
Yes, Ollama is a native Fabric vendor, and it runs models on your own machine with no key and no per-call bill. Point Fabric at your local Ollama server, pick a model you have pulled, and the same patterns run entirely offline. Local models are slower than hosted ones on modest hardware, so start with a small model and a short pattern while you learn the flags.
Why does brew install fabric give me the wrong tool?
The Homebrew formula named fabric belongs to the Python SSH library from fabfile.org, which is an older project with the same short name. The Fabric AI framework uses the formula name fabric-ai, and its binary is also called fabric-ai until you add the alias the README suggests. The name collision is the reason the README spells out the fabric-ai name instead of the shorter one.




