Fabric is an open-source framework designed to enhance human capabilities through AI. It provides a modular system that leverages crowdsourced AI prompts (called Patterns) to solve specific problems, and can be used anywhere. Fabric organizes prompts by real-world tasks, making it easy for users to create, collect, and manage important AI solutions, especially suitable for command-line users.
Purpose
The core goal of Fabric is to solve the problem of AI prompts being scattered and difficult to discover and manage. By organizing the basic unit of AI—the prompt itself—it enables users to integrate AI capabilities into their daily lives and work. Fabric is suitable for various life and work activities, such as:
- Extracting the most interesting parts of YouTube videos and podcasts
- Writing an article in your own voice from just an idea
- Summarizing obscure academic papers
- Creating a perfectly matching AI art prompt for a piece of text
- Evaluating content quality to decide whether it is worth reading/watching
- Getting summaries of long, boring content
- Explaining code to you
- Turning bad documentation into usable documentation
- Creating social media posts from any content input
- And more...
Main Capabilities
Fabric offers a range of features and capabilities:
- Patterns: At the core of Fabric are Patterns, which are collections of AI prompts for specific tasks. Users can create, collect, and organize their own Patterns and use them in their preferred tools.
- Multi-AI provider support: Fabric supports a wide range of AI providers, including native integrations (such as OpenAI Codex, Anthropic Claude, Claude Code, Ollama local models) and OpenAI-compatible providers (such as Apple Foundation Models).
- Command-line interface: Fabric itself can be used as a command-line interface, suitable for command-line users.
- REST API server: Provides a REST API server for easy integration into other applications.
- Ollama-compatible mode: Supports Ollama-compatible mode.
- Custom Patterns: Users can set up and use custom Patterns.
- Auxiliary applications: Includes auxiliarytools such as to_pdf, code2context, generate_changelog, and more.
- Web interface: Provides the Fabric Web App.
- Internationalization: Supports multiple languages, including English, Arabic, Chinese, and more.
- Speech-to-text: Supports OpenAI speech-to-text functionality through the --transcribe-file, --transcribe-model, and --split-media-file flags.
- Per-pattern model mapping: Specific models can be configured for individual patterns via environment variables, for example FABRIC_MODEL_PATTERN_NAME=vendor|model.
- Aliases: Aliases can be added for all patterns and used directly as commands.
- Shell completion: Provides shell completion scripts for Zsh, Bash, and Fish.
Usage
Fabric can be installed and used in various ways:
- Installation:
- One-line install (recommended): Corresponding installation commands are available for Unix/Linux/macOS and Windows PowerShell.
- Manual binary download: The latest release binary archives and SHA256 hashes can be found on the GitHub releases page.
- Package managers: macOS (Homebrew), Arch Linux (AUR), Windows (Winget/Scoop). Note that when using Homebrew or the Arch Linux package manager, fabric is provided as fabric-ai and an alias needs to be added.
- Install from source: Go needs to be installed, then run the corresponding command.
- Docker: Prebuilt Docker images are provided and available on Docker Hub (kayvan/fabric) and GHCR (ksylvan/fabric).
- Environment variable setup: Environment variables may need to be set in ~/.bashrc or ~/.zshrc.
- Configuration: Run fabric --setup to configure your preferred provider, or use fabric --listvendors to view all available vendors.
- Usage: Patterns can be used directly, for example fabric --pattern summarize. Aliases can also be added, such as summarize replaces fabric --pattern summarize.
- Shell completion: Completion scripts can be installed with a single command.
- Upgrading: Upgrading the Go version is simple; just rerun the install command to automatically replace the old version.
Use cases
Fabric is suitable for users who need to integrate AI into their daily work and life, especially:
- Command-line users who want to use AI directly in the terminal.
- Users who need to manage and organize a large number of AI prompts.
- Developers who want to integrate AI capabilities into existing workflows.
- Users who need to process various content (such as videos, podcasts, papers, code, documents).
Limitations
- Some features may depend on a specific AI provider or subscription.
- Using certain providers may require configuring API keys or environment variables.
- The documentation does not provide specific billing or pricing information.
- Some features (such as Apple Foundation Models) require a specific OS version (macOS 27 or later).
- The documentation does not provide detailed usage steps for all features; some content requires referring to the official documentation.