An independent explainer for danielmiessler's Fabric — built to help you actually implement it.

source github.com/danielmiessler/Fabric

Fabric
danielmiessler/Fabric

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".

Primary language GoWeb layer SvelteKit (npm / pnpm)Ecosystems Go modules · npmPublic symbols 115Entrypoint commands 53
Fabric: A vast loom stretches across the screen, its shuttle racing left to right, threading 53 command-patterns into a single bolt of luminous output cloth — every pass of the weft a different AI vendor, every warp thread a named pattern.
A vast loom stretches across the screen, its shuttle racing left to right, threading 53 command-patterns into a single bolt of luminous output cloth — every pass of the weft a different AI vendor, every warp thread a named pattern.
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.

The problem Fabric: the problem
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.

The big idea Fabric pipes any raw text or transcript through a named pattern and a chosen AI vendor to produce consistently structured output.
Key components at a glance
AspectDetail
Core languageGo
Web UISvelteKit + Tailwind
Componentsfabric (CLI/server), fabric (web)
External web deps@floating-ui/dom, highlight.js, marked, yaml, youtube-transcript, and others
Knowledge base384-dim RVF · 1285 passages · 115 public symbols
Docker imageskayvan/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.

The aha Decoupling the pattern definition from the vendor means any prompt can run against any model without rewriting the instruction.

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.

Architecture Go CLI core (fabric cmd) routes stdin through a selected named pattern to one of many vendor plugins (OpenAI, Anthropic, Ollama, Bedrock, Azure, Codex), with a SvelteKit Web UI and REST server as optional front-ends, all sharing a local config and pattern storage layer.
Architecture — modules, components and how they depend on each other.
Data flow At runtime: user pipes text into the fabric CLI with a --pattern flag; the CLI loads the pattern's system.md, constructs a prompt, streams the response from the configured vendor back to stdout or into the Web UI chat, with YouTube transcript inline-fetching handled automatically when a URL is detected.
Data flow — how a request moves through the system at runtime.
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.

In the real world Fabric in use
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
  1. Prerequisite — Go toolchain: You need Go installed. Verify with go version. The module system will pull all dependencies automatically on install.
  2. Install the CLI: Run go install github.com/danielmiessler/fabric/cmd/fabric@latest. Go downloads, compiles, and places the fabric binary in your $GOPATH/bin (or $HOME/go/bin). No output on success — run fabric --version to confirm the binary is on your PATH.
  3. Configure providers: Run fabric --setup to walk through API-key entry for your chosen vendors. Keys are stored in ~/.config/fabric and masked to the last four characters in any config API response.
  4. 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.
  5. Optional — start the REST server and web UI: Run go run ./cmd/fabric --serve to start the API on port 8080. In the web/ directory run npm install then npm run dev (or pnpm install && pnpm run dev) to start the SvelteKit UI. Open the URL printed to the terminal — you have a full browser-based pattern interface.
  6. Optional — Docker path (no Go required): Run docker run --rm -it kayvan/fabric:latest --version to verify the image, then docker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric kayvan/fabric:latest --setup to configure, and docker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric kayvan/fabric:latest -p summarize to run a pattern. Config persists in $HOME/.fabric-config on the host.
  7. 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.
  8. What you have at the end: A fabric binary 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.

# Fabric-knowledge-pack.zip for-ai/ # wire this into your agent Fabric-kb.rvf # 384-dim vector brain (semantic search) Fabric-kb.passages.jsonl # full passage text (search returns TEXT) Fabric-symbols.json # exact public API Fabric-dep-graph.json # what depends on what Fabric-entrypoints.json # build / test / run commands ask-kb.mjs · kb-mcp-server.mjs # CLI + MCP search server for-humans/ # read first Fabric-primer.md # the human orientation
Download the knowledge packRVF vector KB + MCP server — drop it into your own agent.
Give your AI the same understandingFabric-knowledge-pack.zip