AI augmentation, assembled from named patterns.
Fabric is a Go-powered framework for applying large-language-model prompts — called patterns — to any input stream. Pipe text in, name a pattern, get structured intelligence out. The web UI, REST server, and a growing library of community patterns ship in the same repository.
Go CLI + SvelteKit web UI · multi-vendor LLM routing · 53 entrypoint commands · active changelog through 2026
An independent explainer for danielmiessler's Fabric — built to take you from "never seen it" to "ready to implement".
01
LLM prompts are powerful and completely unmanageable.
What problem does this solve?
Every team reinvents the same prompt fragments in scattered markdown files, Notion pages, and Slack threads. There is no standard unit of reuse, no version control story, no way to compose or share the things that actually work.
Provider APIs multiply — OpenAI, Anthropic, Ollama, Azure, Bedrock, Codex — each with its own authentication quirks, sampling parameter rules, and model-discovery behaviour. Wiring them together by hand means bespoke glue code that breaks every time a provider ships a new model or tightens a rate limit.
The gap between 'I have a great prompt' and 'my whole team runs it reliably against any model, from the CLI or a web UI, with YouTube transcripts inlined and API keys properly redacted from config responses' is, historically, several weekends of plumbing.
02
A framework of named, composable prompt patterns.
What exactly is Fabric?
Fabric turns prompts into first-class artifacts called patterns. Each pattern is a named system prompt stored as a markdown file. The CLI, REST server, and web UI all speak the same pattern vocabulary.
The Go core handles vendor routing, streaming, session management, and security hardening — including API-key redaction in config responses and path-traversal prevention. The SvelteKit web UI adds a vendor-filter dropdown, inline YouTube transcript fetching, and a chat flow that renders user messages before the model responds.
Patterns are community-maintained and categorised. Recent additions include create_slides (Reveal.js HTML slideshows) registered across CONVERSION, VISUALIZE, and WRITING categories, and a --readpattern flag that prints any pattern's raw system.md to stdout without touching the filesystem manually.
| Aspect | Detail |
|---|---|
| Core language | Go |
| Web UI | SvelteKit + Tailwind |
| Components | fabric (CLI/server), fabric (web) |
| External web deps | @floating-ui/dom, highlight.js, marked, yaml, youtube-transcript, and others |
| Knowledge base | 384-dim RVF · 1285 passages · 115 public symbols |
| Docker images | kayvan/fabric, ghcr.io/ksylvan/fabric |
03
The pattern is the unit of thought.
What's the core insight that makes it work?
Every useful LLM interaction reduces to a system prompt applied to an input. Name that system prompt, version it, share it — and the entire framework falls out naturally.
Once the pattern is the atom, vendor routing becomes a lookup, streaming becomes a transport concern, and the web UI becomes a pattern browser. The changelog tells the story: new capabilities arrive as new patterns or new vendor plugins, not as rewrites of the core loop.
The same principle governs the multi-vendor layer. When a model string like ollama/llama3 arrives without an explicit vendor, the framework splits the first path segment and resolves it against known vendors — no 'could not find vendor' error, no user-facing friction.
Name the prompt, own the workflow.
04
Pipe in, pattern out — with a REST server and web UI if you want them.
How does the machinery actually run?
The Go binary is the engine. It reads stdin or a flag-supplied input, resolves the named pattern from the local patterns directory (custom directories checked first), routes to the configured vendor, streams the response, and writes to stdout.
The REST server (--serve, port 8080) exposes the same pattern/vendor/session model over HTTP, consumed by the SvelteKit web UI. The UI adds a vendor-filter dropdown backed by a vendorNames derived store, inline YouTube transcript substitution, and a loading indicator during transcript fetch — all wired to the same backend pattern resolution logic.
Vendor plugins are discrete modules. The Codex plugin, for example, implements OpenAI OAuth with PKCE, browser-based login, automatic token refresh on 401, and falls back to streamed delta text when a completed Codex response is empty. Bedrock dynamically fetches supported regions from botocore's endpoints.json with a static fallback. Anthropic models that do not support sampling parameters — including Claude Opus 4.7 and the Claude Fable family — have those parameters automatically omitted. A persistent cache layer serves stale model lists during provider discovery failures so the tool keeps working when upstream is unavailable.
Security is handled at the framework layer, not left to callers: API keys are masked to the last four characters in all GET /config responses, shell commands in the Obsidian route have been replaced with native fs APIs, and path-traversal vectors are blocked. The i18n layer covers error strings across chat, storage, template, plugin registry, and provider modules in ten locales.
05
What people actually do with it.
Who uses this and for what?
Fabric is general-purpose by design. The pattern library and vendor plugins define the surface area; here are three representative workflows grounded in the codebase.
1 Summarise and analyse any content CLI pipeline
Pipe any text — an article, a transcript, a diff — into fabric -p summarize and receive structured output shaped by the pattern's system prompt. YouTube URLs in the web UI are automatically replaced with fetched transcript blocks before the model sees them, supporting multiple links per message.
The --readpattern <name> flag lets you inspect exactly what instructions a pattern carries before you trust it with sensitive input.
2 Run a local REST server for team tooling Server mode
Start fabric --serve (or the Docker image with -p 8080:8080) to expose the full pattern/vendor/session API. The SvelteKit web UI connects to it out of the box. Teams can build internal tools on top of the REST layer without touching the Go source.
The changelog-generation tool (generate_changelog --ai-summarize) is itself a Fabric consumer — it calls the running model to produce the human-readable changelog entries that appear in the repo's own CHANGELOG.md.
3 Create structured documents from raw input Content generation
The create_slides pattern converts input into a Reveal.js HTML slideshow and is registered across CONVERSION, VISUALIZE, and WRITING categories. The pattern system makes it straightforward to add similar output-format patterns without modifying the core routing logic.
Additional helper binaries — to_pdf, code2context, code_helper — are installable independently via go install and extend Fabric's reach into document conversion and code-context workflows.
06
Running in under five minutes.
How do I get it running right now?
Two paths: Go install for the full CLI, or Docker for zero-dependency use. The web UI requires Node.js and npm/pnpm. Pick the one that matches your environment.
go install github.com/danielmiessler/fabric/cmd/fabric@latest- Prerequisite — Go toolchain: You need Go installed. Verify with
go version. The module system will pull all dependencies automatically on install. - Install the CLI: Run
go install github.com/danielmiessler/fabric/cmd/fabric@latest. Go downloads, compiles, and places thefabricbinary in your$GOPATH/bin(or$HOME/go/bin). No output on success — runfabric --versionto confirm the binary is on your PATH. - Configure providers: Run
fabric --setupto walk through API-key entry for your chosen vendors. Keys are stored in~/.config/fabricand masked to the last four characters in any config API response. - Run your first pattern: Echo or pipe text and name a pattern:
echo 'your text here' | fabric -p summarize. You will see streaming output in your terminal shaped by the pattern's system prompt. - Optional — start the REST server and web UI: Run
go run ./cmd/fabric --serveto start the API on port 8080. In theweb/directory runnpm installthennpm run dev(orpnpm install&&pnpm run dev) to start the SvelteKit UI. Open the URL printed to the terminal — you have a full browser-based pattern interface. - Optional — Docker path (no Go required): Run
docker run --rm -it kayvan/fabric:latest --versionto verify the image, thendocker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric kayvan/fabric:latest --setupto configure, anddocker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric kayvan/fabric:latest -p summarizeto run a pattern. Config persists in$HOME/.fabric-configon the host. - Install optional helper binaries: Each helper is a separate
go install:go install github.com/danielmiessler/fabric/cmd/to_pdf@latest,go install github.com/danielmiessler/fabric/cmd/code2context@latest,go install github.com/danielmiessler/fabric/cmd/generate_changelog@latest,go install github.com/danielmiessler/fabric/cmd/code_helper@latest. Each lands as its own binary in$GOPATH/bin. - What you have at the end: A
fabricbinary that pipes any input through any named pattern against any configured LLM vendor, an optional REST server, an optional SvelteKit web UI, and a set of helper tools for PDF conversion, code context, and AI-assisted changelog generation.
07
Knowledge pack: 1285 passages, 384 dimensions.
Does my AI get it too?
The Fabric knowledge base was indexed from the npm-ecosystem representation of this repository: 1285 passages encoded into a 384-dimensional RVF vector space, covering 115 public symbols across 2 components. Use it for semantic search, retrieval-augmented tooling, or as a reference corpus for pattern development.