Fabric collects task-specific prompts, which it calls Patterns, and makes them runnable from the command line. A Pattern is a Markdown file holding a system prompt for one concrete job — summarizing an article, extracting the interesting parts of a video, rating content quality, explaining code, writing an essay in your own voice — so useful prompts can be versioned, shared, and invoked by name instead of pasted between chat windows.
The command-line tool is a Go binary. You pipe text in and select a Pattern with -p, optionally streaming the response, setting variables, choosing a model and vendor, or applying a session or context. Input can also come from a YouTube video, where the tool pulls the transcript, comments, metadata, or OCR-extracted visual data, from a Spotify episode, or from a scraped web page converted to Markdown. Output can be copied to the clipboard, written to a file, or turned into an image, a spoken audio file, or a PDF through the to_pdf helper.
Prompt strategies apply on top of a Pattern, modifying the system prompt before it is sent: chain-of-thought, chain-of-draft, tree-of-thought, atom-of-thought, least-to-most, self-consistency, self-refinement, reflexion, and a standard direct-answer mode. Custom Patterns live in a separate directory, take precedence over built-in Patterns of the same name, and survive --updatepatterns.
Model access is vendor-neutral. Native integrations cover OpenAI, OpenAI Codex through a ChatGPT subscription, Anthropic, Google Gemini, Ollama for local models, Azure OpenAI, Amazon Bedrock, Vertex AI, LM Studio, and Perplexity, and around twenty further providers connect through OpenAI-compatible endpoints. Models can be mapped per Pattern with a FABRICMODELPATTERN_NAME=vendor|model environment variable, and --dry-run prints what would be sent without spending a request.
Beyond the CLI, Fabric serves a REST API with Swagger documentation covering chat completions, Pattern management, context and session management, model and vendor listing, and transcript extraction, plus an Ollama-compatible endpoint mode. Helper commands include topdf for LaTeX output, code2context for turning a code directory into model input, and generatechangelog.
Features
- Patterns: task-specific Markdown system prompts invoked by name, usable on their own in any chat interface
- Prompt strategies: chain-of-thought, chain-of-draft, tree-of-thought, atom-of-thought, least-to-most, self-consistency, self-refine, and reflexion
- Custom Patterns: a private directory that takes precedence over built-ins and is untouched by updates
- Provider breadth: native support for ten providers plus around twenty OpenAI-compatible endpoints, selectable per Pattern
- Media input: YouTube transcripts, comments, metadata, and OCR-extracted frames, Spotify episode metadata, and scraped web pages
- Media output: streamed text, clipboard and file output, generated images with size and quality controls, and text-to-speech voices
- Sessions and contexts: named contexts and sessions carry state across invocations and can be printed or wiped
- Dry run: --dry-run shows the constructed prompt without making an API call
- REST API: a built-in server with Swagger documentation and an Ollama compatibility mode
- Extensions: registered extensions can be called from inside Pattern files
- Helper tools: topdf for LaTeX, code2context for code directories, and generatechangelog
- Shell aliases: every Pattern can be exposed as a shell command, with an optional common prefix
