Terminal AI Workflows: Using Fabric Patterns and UNIX Pipes to Automate Daily Knowledge Tasks
Bringing Generative AI to the Command Line
Most generative AI tools force users into browser tabs or proprietary desktop GUIs. For developers, sysadmins, and command-line power users, switching windows to copy-paste text into a web chat introduces significant cognitive friction.
Created by Daniel Miessler, Fabric is an open-source framework written in Go that treats prompts as first-class UNIX utilities.
---
1. The UNIX Philosophy Applied to Prompts
The core beauty of Fabric is its seamless integration with standard shell pipes (|):
```bash # Summarize your active clipboard buffer pbpaste | fabric -p summarize
# Extract structured wisdom and quotes from a YouTube transcript fabric -y "https://www.youtube.com/watch?v=example" | fabric -p extract_wisdom
# Code review an active Git diff before committing git diff | fabric -p review_code ```
Instead of writing custom prompt instructions every time, Fabric provides a battle-tested repository of Patterns—specialized markdown prompts engineered for specific analytical tasks.
---
2. Installation & Dynamic Model Routing
Fabric has been completely rewritten in Go and is installable via package managers:
- macOS (Homebrew): brew install fabric-ai
- Windows (Winget): winget install danielmiessler.Fabric
- Linux / Source: go install github.com/danielmiessler/fabric/cmd/fabric@latest
Users configure keys dynamically via fabric --setup. The tool dynamically routes requests across Anthropic, OpenAI, Ollama, Groq, or Google Vertex via the -m <model> flag, allowing power users to toggle between cloud reasoning models and local offline LLMs in seconds.
---