About fabric
Fabric is an open source framework for using AI from the command line, written in Go and published under the MIT license. Its premise is that AI has an integration problem rather than a capability problem, so it breaks recurring tasks into reusable prompts called Patterns and makes them callable from a terminal, a script or an HTTP endpoint. A Pattern is a plain Markdown file holding a system prompt, which means the whole library can be read, edited and extended like ordinary text. Shipped Patterns include summarize, extract_wisdom, analyze_claims, analyze_code and write_latex, and users can keep their own Patterns in a separate directory.
It suits developers, analysts and writers who prefer piping text through a terminal to switching between chat interfaces. Input arrives from standard input or arguments, output can stream, and options select the model and vendor, pull a YouTube transcript or comments, scrape a web page to Markdown, manage sessions and contexts, generate images, transcribe audio, run a web search, or print the assembled prompt without calling a model. Prompt strategies such as chain of thought, tree of thought and reflexion can be layered onto any Pattern. Native provider integrations cover OpenAI, Anthropic, Google Gemini, Ollama, Azure OpenAI, Amazon Bedrock, Vertex AI, LM Studio and Perplexity, with many compatible services including OpenRouter, Groq, Mistral, DeepSeek and Together. A serve mode exposes a REST API with Swagger documentation and optional Ollama compatible endpoints, and a bundled web app offers a graphical alternative. Installation options include a single install script, Homebrew, AUR, Winget, Scoop, a Go install command and Docker images.
The software itself is free and carries no pricing page. Running it costs whatever the chosen model provider charges, since Fabric uses the user's own API keys or local models. The project accepts optional sponsorship through GitHub Sponsors.