Reusable AI patterns for automating everyday text tasks
fabric is an open-source framework created by Daniel Miessler that solves a specific problem: you keep writing the same prompts over and over. Summarize this. Extract the key points. Write this up as a report. fabric turns those repeated prompts into reusable patterns — named, shareable, version-controlled prompt templates that you pipe text through like any other Unix tool.
The core idea is deeply Unix: do one thing well, compose with pipes. Each fabric pattern is a focused prompt that takes input from stdin and produces structured output to stdout. Chain them together, automate them with cron, wrap them in bash scripts — fabric is designed to live in your existing workflows.
For a Linux SysAdmin, fabric is most useful for the text-heavy parts of the job: summarizing documentation, extracting action items from meeting notes, drafting incident reports, analyzing log output, and building repeatable AI-assisted reporting pipelines.
fabric itself is free and open source (MIT license). Like the other tools in this series, the cost comes from the AI API backend:
fabric is written in Go. The easiest install for most Linux systems:
# Install via Go (requires Go 1.21+) go install github.com/danielmiessler/fabric@latest # Verify Go is installed go version # If Go is not installed (RHEL/Rocky) sudo dnf install golang # If Go is not installed (Debian/Ubuntu) sudo apt install golangAfter install, run the setup to configure your API keys and default model:
fabric --setupThis walks you through entering your API key(s) and selecting a default model. Settings are stored in ~/.config/fabric/.
fabric ships with a large library of community patterns. Pull them all down:
fabric --updatepatternsThis populates ~/.config/fabric/patterns/ with hundreds of ready-to-use patterns.
fabric --listpatterns after updating to see everything available. There are patterns for summarization, extraction, analysis, writing assistance, security review, and much more.
The core syntax is simple — pipe text into fabric and specify a pattern:
echo "your text here" | fabric --pattern pattern_name # Or pipe from a file cat meeting-notes.txt | fabric --pattern extract_action_items # Or pipe from a command curl -s https://example.com/article | fabric --pattern summarizeCondenses long text into key points. Useful for long documentation, RFCs, or vendor release notes.
cat /usr/share/doc/httpd/README | fabric --pattern summarizePulls actionable tasks out of meeting notes, emails, or ticket descriptions.
cat meeting-notes.txt | fabric --pattern extract_action_itemsTurns bullet points or rough notes into polished prose. Useful for incident post-mortems or knowledge base articles.
cat incident-notes.txt | fabric --pattern write_essayExamines log output for patterns, anomalies, and recommendations.
tail -200 /var/log/messages | fabric --pattern analyze_logsStructures raw information into a formatted report. Good for change management documentation.
cat change-request-notes.txt | fabric --pattern create_reportThe real power of fabric is creating patterns tailored to your specific workflows. A pattern is just a directory with a system.md file containing your prompt.
Use your new pattern immediately:
tail -500 /var/log/messages | fabric --pattern summarize_syslogBecause fabric is pipe-friendly, it drops naturally into shell pipelines and cron jobs.
fabric includes a yt helper that pulls transcripts from YouTube videos:
Of the four tools in this series, fabric is the most distinctly Unix in its philosophy. Patterns are files. Input comes from stdin. Output goes to stdout. Chain them with pipes. Automate them with cron. That's a mental model every SysAdmin already has.
The custom pattern capability is where it gets genuinely valuable for institutional work. Writing a summarize_syslog or bu_change_request pattern once means every future run uses the same carefully crafted prompt — consistent output, reproducible results, shareable with the team.
The automated daily log digest use case alone is worth the install. Getting a readable AI-generated summary of overnight errors in your inbox every morning — without writing a complex parsing script — is the kind of practical efficiency gain that justifies the tool immediately.
fabric pairs well with the other tools in this series: sgpt for interactive questions, aider for file editing, Copilot for script writing, and fabric for automating the text-processing workflows that tie everything together.