This guide is based on Fabric's README and source code on GitHub and Ollama's documentation, read on 3 December 2026.
Fabric is an open-source command-line tool from Daniel Miessler that wraps reusable AI prompts, which it calls Patterns, into simple commands. Instead of pasting a long prompt into a chat window every time, you pipe text into a pattern such as summarize or extract_wisdom and get a structured answer back in the terminal. Fabric works with cloud services, but its README also lists Ollama (local models) and LM Studio as native providers, so you can run every pattern on your own graphics card and keep the text on your PC.
If you'd rather have a general-purpose terminal chat tool, see our comparison of AIChat and LLM CLI or our roundup of the best command-line tools for local LLMs.
What you need
Ollama with a chat model pulled. Our guide to running AI models locally with Ollama and LM Studio covers installation and downloading a model.
A terminal. On Windows, Windows Terminal with PowerShell works well.
A graphics card with enough memory for the model. Fabric only builds the prompt and sends it on; Ollama does the work. Our VRAM guide explains what fits on 8GB, 12GB and 16GB cards.
Step 1: Install Fabric
Fabric's README offers several install routes. On Windows, the simplest is Microsoft's package manager:
winget install danielmiessler.Fabric
The README also gives a one-line PowerShell installer and a scoop install fabric-ai option. On macOS, brew install fabric-ai works, and on any system with Go installed you can run go install github.com/danielmiessler/fabric/cmd/fabric@latest. Note that the Homebrew and Arch Linux packages install the command as fabric-ai rather than fabric; the README suggests adding an alias.
Step 2: Run setup and point it at Ollama
Start Ollama, then run:
fabric --setup
The setup menu (also available as fabric -S) walks through Fabric's configurable parts, including AI providers. Choose Ollama. Fabric's source code shows its default Ollama address is http://localhost:11434, which is Ollama's standard local address, so you can usually accept it. The API key question is optional and can be left blank for a normal local Ollama install.
Once setup finishes, list the models Fabric can see with:
fabric -L
Your Ollama models should appear in the list. You can then pick one per command with -m.
Step 3: Run your first pattern
Patterns read from standard input, so you pipe text in. In PowerShell, to summarise a text file:
Get-Content .\notes.txt | fabric -p summarize -s
-p (or --pattern) chooses the pattern and -s (--stream) prints the answer as it is generated. On macOS the README's own example uses pbpaste | fabric --pattern summarize. Use fabric -l to list every installed pattern and fabric -U to update them.
To save the result rather than reading it on screen, add -o summary.md. To copy it to the clipboard, add -c.
Step 4: Give long documents enough context
This is the step most people miss with local models. Ollama's FAQ says it uses a context window of 4096 tokens by default, which is too small for a long article or meeting transcript, so the end of your input may simply be cut off. Fabric has a --modelContextLength option that, according to its help text, "only affects ollama":
Get-Content .\transcript.txt | fabric -p summarize_meeting --modelContextLength 16384
Alternatively, raise Ollama's default with the OLLAMA_CONTEXT_LENGTH environment variable, as described in Ollama's FAQ. A bigger context window uses more graphics memory, so on an 8GB card you may need a smaller model to make room. Our best local LLMs for 12GB of VRAM guide covers model choice.
Step 5: Use a different model for each pattern
Fabric's README describes per-pattern model mapping through environment variables of the form FABRIC_MODEL_PATTERN_NAME=vendor|model. That lets you send quick jobs such as improve_writing to a small, fast model and heavier ones such as analyze_claims to a larger model, without typing -m every time.
Step 6: Create your own pattern
A pattern is just a folder containing a system.md file with the prompt. Fabric's README recommends setting a separate custom patterns directory in fabric --setup (under the Tools menu), so updates don't overwrite your work. Then:
Create a folder in that directory, for example my-analyzer.
Put your instructions in my-analyzer/system.md.
Run it like any other pattern: fabric -p my-analyzer.
Before spending time on a long run, fabric --dry-run -p my-analyzer shows what would be sent to the model without sending it.
Optional: use patterns from other apps
Fabric can run as a local server with fabric --serve (port 8080 by default). Adding --serveOllama exposes Ollama-style endpoints, and the README says patterns then appear as models such as summarize:latest, so apps that already speak to Ollama can call Fabric patterns. If you do this, the --api-key option can secure the server's routes.
Troubleshooting
No Ollama models listed: check Ollama is running and that the address in fabric --setup matches it (by default http://localhost:11434).
Answers ignore the end of your text: raise the context length as in Step 4.
Answers are slow: the model may be spilling out of graphics memory into system RAM. Try a smaller model or a smaller context window.
fabric isn't recognised after a Homebrew install: the command is fabric-ai unless you add an alias.
Which graphics card helps
Fabric doesn't need a GPU itself, but local models do. A 12GB card such as the ASUS RTX 3060 12GB Dual Gaming OC V2 leaves more room for larger models and context than an 8GB card like the ASUS RTX 5060 8GB Dual OC. We haven't measured speed on either card with Fabric.