Saved Instagram Reels to Obsidian Atomic Notes

A local-first pipeline that extracts captions, Whisper speech transcripts, and Gemini Vision frame OCR, writing deduplicated Markdown notes directly into an existing 3-layer Obsidian LLM Wiki vault.

Inspect Live Sandbox
pip install reels-wiki
brew install AtaCanYmc/tap/reels-wiki
Python SDK: reels_wiki CLI: reels-sync MCP: reels-wiki-mcp Bot: reels-wiki-telegram Skill: SKILL.md
Cost-Aware Extraction

Escalates to audio and vision only when text is missing

Every item moves through a 3-stage waterfall. Extracted payloads are stored in sources/reels/<shortcode>.json, and raw media files never enter the vault.

STAGE 1 / METADATA

yt-dlp Metadata & Subtitles

Calls extract_info(download=False) to fetch caption, creator, duration, upload date, and embedded subtitles without downloading video.

Stop threshold caption ≥ 150 chars
STAGE 2 / AUDIO FALLBACK

Whisper Speech-to-Text

Runs only when caption length is under min_caption_chars and no usable subtitles exist. Uses Groq whisper-large-v3-turbo or local faster-whisper.

Stop threshold transcript ≥ 40 chars
STAGE 3 / VISION OCR

Gemini 2.5 Flash Frames

Extracts 4 evenly spaced frames via ffmpeg when both caption and transcript remain short, then reads on-screen code, slides, or diagrams.

Empty guard skip before LLM
Verified Walkthroughs

Trace real Reels through the pipeline

Select one of the four tested Instagram URLs from docs/example-walkthrough.md to inspect URL normalization, stage routing, and output behavior.

Incoming URL Df44o7WhunQ

Canonical:

1. yt-dlp Metadata EXECUTED

2. Whisper Audio SKIPPED

3. Gemini Vision OCR SKIPPED

sources/reels/Df44o7WhunQ.json
Five Interfaces

Run from terminal, MCP client, Python script, or Telegram

Every entry point shares the same queue, deduplication index, and vault writer. Use arrow keys or click a tab to inspect each interface.

CLI commands (global flags appear before subcommand)
# Interactive setup wizard (creates config.yaml + .env)
reels-sync init

# Verify Python, ffmpeg, cookies, API keys, and vault permissions
reels-sync doctor

# Enqueue a single Reel (or /share/ redirect URL)
reels-sync ingest "https://www.instagram.com/reel/DAbCdEfGhIj/?igsh=xyz"

# Import saved_posts.json from an Instagram export
reels-sync import-ig ~/Downloads/instagram-export/ --reels-only

# Preview pending items without spending API calls
reels-sync process --dry-run

# Extract, synthesize, and update _index.md + _log.md
reels-sync process --limit 10 --retry-failed

# Re-synthesize from sources/reels/<shortcode>.json offline
reels-sync reprocess DAbCdEfGhIj

# Queue counts, extraction stages, and LLM token usage JSON
reels-sync --json stats
Vault Enforcement

Validation guarantees before writing to disk

Model output is treated as untrusted input and normalized against your vault schema before any file is written.

Dynamic Folder & Tag Discovery

Scans _CLAUDE.md, _index.md, and note frontmatter for allowed folders and #tags. Excludes sources/ and inbox/ as note destinations.

Zero Dangling Wikilinks

Checks related_wikilinks against real vault note titles and filenames. Unknown targets are rendered as plain text (new note candidate) ....

Crash-Safe Append Queue

Writes snapshots to inbox/reels-queue.jsonl under an exclusive file lock. Stale processing entries auto-reset on the next run, and lost indexes rebuild from the queue.

Bilingual Titles & ASCII Slugs

Generates Turkish titles for Turkish Reels and technical English otherwise, while transliterating Turkish characters into clean ASCII filenames.

Zero-Download Reprocessing

Persists extracted payloads in sources/reels/<shortcode>.json so reels-sync reprocess --all can regenerate notes without touching Instagram or Whisper.

Offline Pytest Suite

Covers URL parsing, Instagram export ingestion, writer idempotency, and JSON repair retries without making network or LLM calls.

Setup

Quick Start

Requires Python 3.10 or newer and ffmpeg on your PATH for audio or frame fallbacks.

  1. 1 Install via PyPI, Homebrew, or source
    Shell
    # PyPI
    pip install reels-wiki
    
    # Homebrew (macOS / Linux)
    brew install AtaCanYmc/tap/reels-wiki
    
    # From source
    git clone https://github.com/AtaCanYmc/reels-wiki.git && cd reels-wiki && pip install -e ".[dev]"
  2. 2 Configure vault path and Instagram cookies
    config.yaml
    cp config.example.yaml config.yaml
    # Set vault_path to your Obsidian vault directory
    # Under extraction:, set cookies_from_browser: chrome (or cookies_file: ~/cookies.txt)
  3. 3 Add API keys and verify configuration
    .env + verification
    cat << 'EOF' > .env
    GROQ_API_KEY=your_groq_api_key
    GEMINI_API_KEY=your_gemini_api_key
    EOF
    
    reels-sync doctor
    reels-sync stats