Fabric is a command-line framework that organizes AI prompts, called Patterns, by the real-world task they perform, so that a person can collect, version, and run them from one place. It treats the integration of AI into everyday work as the problem to solve rather than model capability, and the Patterns themselves are the unit it organizes. The CLI runs a Pattern over text from stdin, a URL, or a YouTube transcript and streams the result back.
Patterns are Markdown files that rely mostly on the system prompt and give the model clear, ordered instructions, so a person can read what one does. Fabric ships Patterns for tasks such as extracting the key points from videos and podcasts, summarizing papers, rating content, explaining code, rewriting documentation, and drafting social posts. Custom Patterns live in a separate directory that updates to the built-in set do not overwrite, and prompt strategies (Chain-of-Thought, Chain-of-Draft, Tree-of-Thought, Self-Refine, Reflexion, and others) can be layered on top of any Pattern.
Model access covers native integrations with OpenAI, OpenAI Codex (through a ChatGPT or Codex subscription), Anthropic, Claude Code (through a Claude subscription), Google Gemini, Ollama, Azure OpenAI, Amazon Bedrock, Vertex AI, LM Studio, and Perplexity, plus a list of OpenAI-compatible endpoints including DeepSeek, Groq, Mistral, MiniMax, OpenRouter, LiteLLM, and Together. A model can be pinned per Pattern. A built-in REST API server exposes chat completions, Pattern management, contexts and sessions, model listing, and YouTube transcript extraction over HTTP, and an Ollama-compatible mode presents Patterns as models so that any Ollama client can call them through Fabric's providers. A web interface and helper commands (to_pdf for LaTeX output, code2context for feeding a code directory to a model, generate_changelog from git history) round out the toolset.
Features
- Patterns: Markdown prompts organized by task, run from the CLI over stdin, a URL (scraped to Markdown through Jina AI), or a YouTube transcript
- Prompt strategies: Chain-of-Thought, Chain-of-Draft, Tree-of-Thought, Atom-of-Thought, Least-to-Most, Self-Consistency, Self-Refine, and Reflexion, applied to any Pattern's system prompt
- Custom Patterns: a separate directory for personal Patterns that updates to the built-in set leave untouched
- Providers: native OpenAI, Codex, Anthropic, Claude Code, Gemini, Ollama, Azure OpenAI, Amazon Bedrock, Vertex AI, LM Studio, and Perplexity, plus OpenAI-compatible endpoints such as DeepSeek, Groq, Mistral, OpenRouter, and LiteLLM
- Per-Pattern model mapping: a different vendor and model for each Pattern
- REST API server: chat completions with streaming, Pattern create, read, update, and delete, contexts and sessions, model and vendor listing, and YouTube transcript extraction
- Ollama compatibility mode: the server exposes Ollama-style endpoints so Ollama clients can use any Fabric provider, with Patterns listed as models
- Web search: a search tool for Anthropic, OpenAI, Gemini, and Grok models
- Speech to text: transcribes audio files with OpenAI speech-to-text models, with long media split into chunks
- Dry run and prompt export: previews the composed prompt without a model call, or exports it for use with other CLI tools
- Extensions: external commands callable from inside Pattern files
- Helper apps: to_pdf (LaTeX to PDF), code2context (a code directory as JSON for a model), generate_changelog (from git history and pull requests), and a web interface



