Objectives

  • Install and configure the Fabric tool on an Ubuntu system
  • Set up the Gemini API for technical summarization tasks
  • Configure terminal clipboard utilities for seamless data piping
  • Automate the extraction of technical instructions into Obsidian Markdown notes
  • Optimize AI model selection for speed and technical accuracy

Instructions

  1. Install Fabric by running the official installation script:
    • curl -fsSL https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.sh | bash
  2. Add Fabric to your System PATH to ensure the command is recognized:
    • Run echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
    • Refresh your shell with source ~/.bashrc
  3. Install and configure clipboard tools to enable the pbpaste command:
    • Install xclip: sudo apt install xclip
    • Add aliases to ~/.bashrc:
      • echo "alias pbcopy='xclip -selection clipboard'" >> ~/.bashrc
      • echo "alias pbpaste='xclip -selection clipboard -o'" >> ~/.bashrc
    • Run source ~/.bashrc again.
  4. Obtain a Gemini API Key from Google AI Studio.
  5. Run the Fabric setup to initialize patterns and credentials:
    • Execute fabric --setup
    • Paste your Gemini API key when prompted.
    • Select gemini-3.1-flash-image-preview (or a similar Flash model) for faster technical processing.
  6. Set the context length during setup to 1048576 to handle long conversations.
  7. Extract technical instructions from a copied Gemini conversation:
    • Copy the chat text to your clipboard.
    • Run: pbpaste | fabric -p extract_instructions > "$HOME/Documents/Obsidian Vault/AI/note.md"
    • Note: Always use double quotes around the file path if your Obsidian vault name contains spaces.
  8. Switch models for speed if the “Pro” model hangs:
    • Use the -m flag: pbpaste | fabric -m gemini-3-flash-preview -p extract_instructions
  9. Create a permanent shortcut (alias) for one-click exports:
    • Add this to your .bashrc:
    • `echo “alias extract_instructions=‘pbpaste | fabric -p extract_instructions > “$HOME/Documents/Obsidian Vault/AI/gemini-$(date +%Y%m%d%H%M).md”’” >> ~/.bashrc
    • Use the command extract_instructions anytime you want to save a copied chat.
  10. Mix many patterns for better results:
    • Use pbpaste | fabric -p extract_instructions | fabric -p convert_to_markdown > "$HOME/Documents/Obsidian Vault/AI/Technical_Note.md"
    • In that case it doesn’t help to improve the output.