July 24, 2026
Fabric: Piping AI Into Your Terminal Like It’s Just Another Unix Command
I was three browser tabs deep, again, copy-pasting the same “summarize this and pull out the key insights” prompt into a chat window for…

By Harsh Raj Singhania
6 min read
I was three browser tabs deep, again, copy-pasting the same "summarize this and pull out the key insights" prompt into a chat window for what had to be the fifth time that day, when it finally annoyed me enough to do something about it. Different article, same prompt, same manual context-switch out of my terminal and into a browser tab I didn't want open in the first place.
That's the actual friction of using AI day to day and nobody talks about it enough. It's not that the models aren't good. It's that using them well means breaking your flow. Tab out. Log in. Retype a prompt you've typed a hundred times before, hoping you phrased it close enough to last time to get a consistent result. Tab back. Repeat tomorrow.
So here's the question that got me down this rabbit hole: what if you could pipe data directly from your clipboard, or straight out of your terminal, into a genuinely well-engineered AI prompt, the same way you'd pipe output into grep or wc -l? No browser. No retyping. Just stdin in, result out.
That's exactly what Fabric does, and once I actually sat down and used it properly, it changed how I think about where AI belongs in a daily workflow.
What Fabric Actually Is
Fabric is an open-source framework built by Daniel Miessler, and the first thing worth clearing up is what it isn't. It's not a new model. It's not competing with GPT-4 or Claude or anything running locally through Ollama. Fabric doesn't generate anything on its own, it's the orchestration layer sitting between your local data and whichever AI model you point it at.
Think of it less like a product and more like plumbing. It takes text, from a file, a clipboard, a YouTube transcript, wherever, routes it through a carefully engineered prompt, and hands you back a result, all without you ever touching a web UI.
The philosophy behind it is straight out of classic Unix design: do one thing well, and talk to everything else through standard input and standard output. stdin in, stdout out. Once a tool respects that contract, it stops being an isolated app and starts being a piece you can chain into literally anything else running in your shell. That's the part that hooked me. I already live in a terminal for pretty much everything I do, lab work, log parsing, writing tooling for my job search, so a tool that behaves like a proper Unix citizen instead of demanding its own walled-off interface is exactly what I wanted without knowing I wanted it.
The Secret Sauce: Patterns
The actual intelligence in Fabric doesn't come from some proprietary model tuning. It comes from what the project calls Patterns, and once you understand what these are, the whole framework clicks into place.
A Pattern is a carefully written, version-controlled Markdown file that acts as a system prompt engineered for one specific job. extract_wisdom pulls the genuinely useful ideas out of long-form content and throws away the filler. summarize compresses without gutting the meaning. explain_code takes a script and walks you through what it's actually doing in plain English. There are patterns for analyzing malware, writing essays, rating the quality of an argument, dozens of them, each one scoped down to do exactly one job well.
What makes these different from the prompt you'd type from memory into a chat window is that they're not improvised. They're open-source, sitting in a public repo, and they get refined by a community of developers who are constantly testing and tightening them. You're not relying on your own half-remembered phrasing of "please summarize this well." You're running a prompt that's been iterated on by people who cared enough to keep making it better, and that shows up directly in the consistency of what you get back.
Why This Is Actually Worth Adopting
Speed. No tabbing out, no logging in, no clunky web interface standing between you and an answer. The AI meets you exactly where you're already working.
Consistency. Ad-hoc prompting means your results drift depending on how you happened to phrase things that day. Patterns are static, version-controlled files, so running extract_wisdom today gives you the same quality and structure it gave you last week. That predictability matters more than people give it credit for once you're relying on this daily instead of occasionally.
Model-agnostic infrastructure. Fabric doesn't marry you to one provider. Point it at GPT-4, point it at Claude, point it at a fully local model running through Ollama, the Pattern underneath stays exactly the same. You're not rebuilding your workflow every time you decide to switch providers or a new model drops.
Getting It Installed
Fabric has moved to a Go-based build, which makes installation genuinely painless. On macOS you can grab it straight from Homebrew:
brew install fabric-aibrew install fabric-aiNote the -ai suffix, there's an unrelated fabric formula for a completely different SSH tool already sitting in Homebrew's index, so the project ships under fabric-ai to avoid the collision. If you want the command to just be fabric afterward, add an alias to your shell config:
alias fabric='fabric-ai'alias fabric='fabric-ai'If you're on Linux or prefer installing straight from source, and Go is already on your system:
go install github.com/danielmiessler/fabric/cmd/fabric@latestgo install github.com/danielmiessler/fabric/cmd/fabric@latestOnce it's installed, run the setup wizard:
fabric --setupfabric --setupManaging the Engine Room
This is where you actually wire Fabric up to an AI provider. The setup walks you through entering API keys for whichever providers you plan to use, OpenAI, Anthropic, or a local Ollama endpoint if you're going that route, and writes everything out to a config file under ~/.config/fabric/. From there you can set a default model so you're not specifying -m on every single call.
Handling API Realities
Here's the part most quickstart guides skip past, and the part that'll actually bite you once you start using Fabric heavily instead of just poking at it.
Once you're piping large batches of text through Fabric, transcripts, log files, entire codebases, you're generating real API usage, and that means real cost and real rate limits. A few habits that saved me some pain:
- Watch your usage dashboard. Both OpenAI and Anthropic give you usage breakdowns in their respective consoles. Check them, especially if you're scripting anything that loops Fabric calls automatically.
- Set a fallback model. If your primary model hits a rate limit mid-script, you want a documented fallback rather than a failed job. Fabric lets you specify a default model in config, and you can override it per-call with
-mif your primary is throttled. - Expect 429s if you're running high-volume automated jobs. If you're batch-processing a folder of transcripts or logs, add deliberate delays between calls, or batch smaller. A rate-limit error mid-pipeline is a lot more annoying to debug than a script that's just running a little slower on purpose.
Everyday Workflows
This is where Fabric actually earns its keep. A few of the commands I've ended up using constantly:
The quick summary, pulling straight from your clipboard:
pbpaste | fabric -p summarizepbpaste | fabric -p summarizeThe content consumer, pulling a YouTube transcript natively and running it through wisdom extraction instead of watching a 40-minute video for three good ideas:
yt --transcript [URL] | fabric -p extract_wisdomyt --transcript [URL] | fabric -p extract_wisdomThe developer workflow, handing a local script to the model for a plain-English walkthrough:
cat main.py | fabric -p explain_codecat main.py | fabric -p explain_codeThree completely different tasks, same interface, same predictable output quality every time.
Leveling Up: Advanced Fabric
Writing Your Own Patterns
The built-in Patterns cover a lot of ground, but eventually you'll hit something specific enough to your own niche that nothing off the shelf quite fits. That's when you write your own.
Create a new directory under ~/.config/fabric/patterns/, name it after what it does, and drop in a system.md file with your prompt written in the same structured Markdown style the official Patterns use, clear instructions, explicit ordering, no ambiguity. Fabric picks it up automatically, and from that point on it's callable with -p your_pattern_name exactly like a built-in one.
Stitching Pipelines Together
Because Fabric respects stdin/stdout, you're not limited to one Pattern per command. You can chain them:
cat article.txt | fabric -p summarize | fabric -p write_essaycat article.txt | fabric -p summarize | fabric -p write_essaySummarize first, then feed that summary directly into a Pattern that drafts an essay or an email around it. Each stage does one job, and the output of one becomes the input of the next, which is the entire Unix philosophy playing out inside an AI workflow instead of a traditional data pipeline.
Going Fully Local With Ollama
If you're working with anything sensitive, personal notes, internal files, research data you don't want touching a cloud API, Fabric can run entirely offline against a local model through Ollama. Same Patterns, same command structure, zero data leaving your machine. For anyone who cares about data privacy as much as I do, that's not a nice-to-have, it's the difference between actually using a tool on sensitive material and just not using it at all.
Augmenting, Not Replacing
Miessler's stated vision for this project isn't "let AI do your work for you." It's the opposite. Fabric exists to strip away the noise, the summarizing, the transcript-parsing, the first-pass code explanations, so you have more attention left over for the work that actually requires a human brain: judgment, synthesis, decisions.
That distinction matters more than it sounds like it should. A tool that does your thinking for you makes you worse at thinking. A tool that clears the noise so you can think faster makes you better at it. Fabric is built for the second category, and once your terminal is the AI interface instead of a browser tab you have to context-switch into, it's genuinely hard to go back.
Install it, run extract_wisdom against a podcast episode you've been meaning to actually process instead of just half-listening to, and see what it pulls out that you would've missed. I'd be curious what patterns you end up reaching for most.
I write about hands-on security research and the tools I actually end up using day to day as I work through my cybersecurity degree. If this was useful, follow along.