Skip to main content

Transform podcast episodes into structured markdown notes

Project description

Inkwell CLI

Transform podcast episodes into structured, searchable markdown notes for Obsidian.

Inkwell downloads audio from RSS feeds (including private/paid feeds), transcribes content, extracts key information through LLM processing, and optionally conducts an interactive interview to capture personal insights.

Vision: Transform passive podcast listening into active knowledge building by capturing both what was said and what you thought about it.

Status

๐ŸŽ‰ v1.0.0 - Production Ready!

All core features implemented and thoroughly tested:

  • โœ… Podcast feed management (add, list, remove)
  • โœ… Multi-tier transcription (YouTube โ†’ Gemini)
  • โœ… LLM-based content extraction with templates
  • โœ… Interactive interview mode with Claude
  • โœ… Obsidian integration (wikilinks, tags, Dataview)
  • โœ… Cost tracking and optimization
  • โœ… Error handling with retry logic
  • โœ… Comprehensive E2E testing
  • โœ… Complete user documentation

Quick Start

Installation

# Clone repository
git clone https://github.com/your-username/inkwell-cli.git
cd inkwell-cli

# Install dependencies using uv
uv sync --dev

API Keys

# Set your API keys
export GOOGLE_API_KEY="your-gemini-api-key"
export ANTHROPIC_API_KEY="your-claude-api-key"  # Optional, for interview mode

Process Your First Episode

# Add a podcast feed
uv run inkwell add "https://feed.syntax.fm/rss" --name syntax

# Process the latest episode
uv run inkwell fetch syntax --latest

# Output:
# Processing: Modern CSS Features (Episode 789)
# Transcription: YouTube API (free) โœ“
# Extraction:    Gemini Flash      โœ“
# Templates:     4
# Cost:          $0.0055
# Output:        ./output/syntax-2025-11-13-modern-css-features/
# โœ“ Complete!

That's it! You now have a structured markdown directory ready for Obsidian.

Features

๐ŸŽ™๏ธ Smart Transcription

Multi-tier transcription that optimizes for cost and quality:

  1. Cache (Free): Check local cache first (30-day TTL)
  2. YouTube (Free): Extract existing transcripts from YouTube videos
  3. Gemini (Paid): Download audio and transcribe as fallback (~$0.115/episode)

Result: Most episodes cost $0.005-0.012 (YouTube + extraction)

๐Ÿค– LLM Content Extraction

Template-based extraction pulls structured information from transcripts:

  • Summary: Episode overview with key topics
  • Quotes: Memorable quotes with context
  • Key Concepts: Main ideas and takeaways
  • Context-specific: Tools mentioned, books referenced, people discussed, etc.

Obsidian Features:

  • Wikilinks: Auto-generated [[links]] for entities (books, people, concepts)
  • Tags: Smart tag generation using LLM (e.g., #productivity, #ai, #health)
  • Dataview: Rich frontmatter for Obsidian Dataview queries

๐Ÿ’ฌ Interactive Interview Mode

Capture your thoughts while the episode is fresh:

uv run inkwell fetch syntax --latest --interview

Claude will ask you questions like:

  • "What stood out most to you?"
  • "How might you apply these ideas?"
  • "What questions do you still have?"

Your responses are saved in my-notes.md within the episode directory.

๐Ÿ’ฐ Cost Tracking

Know exactly what you're spending:

# View overall spending
uv run inkwell costs

# View recent operations
uv run inkwell costs --recent 10

# Filter by provider
uv run inkwell costs --provider gemini --days 30

# See today's costs
uv run inkwell costs --days 1

Typical Costs:

  • YouTube + Gemini extraction: $0.005-0.012
  • Gemini transcription + extraction: $0.115-0.175
  • Recommendation: Use YouTube when available (saves 95%)

๐Ÿ“š Obsidian Integration

Every episode output includes:

Frontmatter (Dataview-compatible):

---
podcast: Syntax FM
episode: Modern CSS Features
episode_date: 2025-11-13
duration_minutes: 42
rating: null
topics: [css, web-development, frontend]
people: [Wes Bos, Scott Tolinski]
tools: [CSS Grid, Flexbox, Container Queries]
books: []
tags: [podcast, technical, web-development]
---

Wikilinks: Automatic [[Entity]] links for discoverability

Tags: Smart contextual tags (#css, #web-development, etc.)

Dataview Queries: See docs/dataview-queries.md for 27 example queries

๐Ÿ”„ Robust Error Handling

Automatic retry with exponential backoff:

  • API failures: 3 attempts with backoff
  • Rate limits: Intelligent retry timing
  • Network errors: Automatic recovery
  • Transient failures: Handled gracefully

Graceful degradation: If YouTube fails, falls back to Gemini

๐Ÿงช Comprehensive Testing

  • Unit Tests: 180+ tests covering all components
  • Integration Tests: 30+ tests for end-to-end workflows
  • E2E Tests: 7 tests validating complete pipeline
  • Total: 200+ tests with extensive coverage

E2E Test Coverage:

  • 5 diverse content types (technical, interview, discussion, educational, storytelling)
  • Duration range: 15-90 minutes
  • Quality validation: Files, frontmatter, wikilinks, tags
  • Cost benchmarking: Expected vs actual costs

Documentation

For Users

For Developers

Basic Usage

Feed Management

# Add a podcast
uv run inkwell add "https://feed.syntax.fm/rss" --name syntax

# Add with authentication
uv run inkwell add "https://private.com/feed.rss" --name premium --auth

# List your podcasts
uv run inkwell list

# Remove a podcast
uv run inkwell remove syntax

Processing Episodes

# Process latest episode
uv run inkwell fetch syntax --latest

# Process specific episode number
uv run inkwell fetch syntax --episode 789

# Process multiple episodes
uv run inkwell fetch syntax --count 5

# Process with interview mode
uv run inkwell fetch syntax --latest --interview

# Overwrite existing output
uv run inkwell fetch syntax --latest --overwrite

# Use specific provider
uv run inkwell fetch syntax --latest --provider claude

Cost Management

# View all costs
uv run inkwell costs

# View last 10 operations
uv run inkwell costs --recent 10

# View by date range
uv run inkwell costs --days 7

# Filter by provider
uv run inkwell costs --provider gemini

# Filter by operation
uv run inkwell costs --operation transcription

# Clear cost history
uv run inkwell costs --clear

Cache Management

# View cache stats
uv run inkwell cache stats

# Clear all cache
uv run inkwell cache clear

# Clear expired only
uv run inkwell cache clear-expired

Output Structure

Each processed episode creates a directory:

output/
โ””โ”€โ”€ podcast-name-YYYY-MM-DD-episode-title/
    โ”œโ”€โ”€ .metadata.yaml        # Episode metadata and cost tracking
    โ”œโ”€โ”€ summary.md           # Episode summary with frontmatter
    โ”œโ”€โ”€ quotes.md            # Memorable quotes with context
    โ”œโ”€โ”€ key-concepts.md      # Main ideas and concepts
    โ”œโ”€โ”€ tools-mentioned.md   # Tools, software, frameworks
    โ”œโ”€โ”€ books-mentioned.md   # Books and resources
    โ”œโ”€โ”€ people-mentioned.md  # People discussed
    โ””โ”€โ”€ my-notes.md          # Your interview responses (if --interview)

Frontmatter (all .md files):

---
podcast: Syntax FM
episode: Modern CSS Features
episode_date: 2025-11-13
duration_minutes: 42
topics: [css, web-development]
people: [Wes Bos, Scott Tolinski]
tags: [podcast, technical, web-development]
---

Wikilinks embedded in content:

  • Books: [[Atomic Habits]]
  • People: [[James Clear]]
  • Concepts: [[Habit Stacking]]

Requirements

  • Python: 3.10 or higher
  • ffmpeg: Required for audio processing
  • API Keys:
    • Google AI (Gemini) API key (required)
    • Anthropic (Claude) API key (optional, for interview mode)

Configuration

Inkwell uses XDG Base Directory specifications:

  • Config: ~/.config/inkwell/config.yaml
  • Feeds: ~/.config/inkwell/feeds.yaml
  • Costs: ~/.config/inkwell/costs.json
  • Cache: ~/.cache/inkwell/transcripts/
  • Logs: ~/.local/state/inkwell/inkwell.log

Configuration Options

Edit ~/.config/inkwell/config.yaml:

version: "1"
log_level: INFO
default_output_dir: ./output
default_provider: gemini  # or "claude"
youtube_check: true
max_episodes_per_run: 10

# Optional API keys (or use environment variables)
gemini_api_key: ""
anthropic_api_key: ""

# Templates to enable
templates_enabled:
  - summary
  - quotes
  - key-concepts
  - tools-mentioned
  - books-mentioned
  - people-mentioned

# Obsidian features
wikilinks_enabled: true
tags_enabled: true
dataview_frontmatter: true

Editing Configuration

You can edit the configuration file directly using inkwell config edit:

# Edit config file in your default editor
uv run inkwell config edit

Supported Editors: atom, code, ed, emacs, gedit, helix, kate, micro, nano, notepad, notepad++, nvim, subl, vi, vim

Set your preferred editor with the EDITOR environment variable:

export EDITOR=vim
uv run inkwell config edit

For security reasons, only whitelisted editors are supported. If you need to use a different editor, you can edit the config file manually:

# View config location
uv run inkwell config show

# Edit manually
nano ~/.config/inkwell/config.yaml

Architecture

High-Level Pipeline

RSS Feed โ†’ Parse Episodes โ†’ Check YouTube โ†’ Download Audio
       โ†’ Transcribe (YouTube or Gemini)
       โ†’ Extract Content (Template-based LLM)
       โ†’ Generate Wikilinks & Tags
       โ†’ [Optional] Interactive Interview
       โ†’ Generate Markdown Files
       โ†’ Save to Output Directory

Key Components

  1. Feed Management (src/inkwell/feeds/)

    • RSS/Atom parsing with authentication
    • Secure credential encryption
  2. Transcription (src/inkwell/transcription/)

    • YouTube transcript extraction (free)
    • Gemini API fallback (paid)
    • 30-day cache with TTL
  3. Extraction (src/inkwell/extraction/)

    • Template-based LLM prompts
    • Multi-provider support (Gemini, Claude)
    • Context-aware extraction
  4. Obsidian Integration (src/inkwell/obsidian/)

    • Wikilink generation from entities
    • Smart tag generation with LLM
    • Dataview-compatible frontmatter
  5. Interview Mode (src/inkwell/interview/)

    • Claude Agent SDK integration
    • Interactive Q&A with streaming
    • Personal insights capture
  6. Cost Tracking (src/inkwell/utils/costs.py)

    • Per-operation cost calculation
    • JSON-based persistence
    • Filtering and aggregation
  7. Error Handling (src/inkwell/utils/retry.py)

    • Exponential backoff with jitter
    • Automatic retry for transient failures
    • Graceful degradation

Project Structure

inkwell-cli/
โ”œโ”€โ”€ src/inkwell/              # Main package
โ”‚   โ”œโ”€โ”€ cli.py               # CLI entry point
โ”‚   โ”œโ”€โ”€ config/              # Configuration management
โ”‚   โ”œโ”€โ”€ feeds/               # RSS parsing
โ”‚   โ”œโ”€โ”€ transcription/       # Transcription system
โ”‚   โ”œโ”€โ”€ audio/               # Audio download
โ”‚   โ”œโ”€โ”€ extraction/          # LLM extraction (Phase 3)
โ”‚   โ”œโ”€โ”€ obsidian/            # Obsidian integration (Phase 5)
โ”‚   โ”œโ”€โ”€ interview/           # Interview mode (Phase 4)
โ”‚   โ””โ”€โ”€ utils/               # Utilities (costs, retry, etc.)
โ”œโ”€โ”€ tests/                   # Test suite (200+ tests)
โ”‚   โ”œโ”€โ”€ unit/               # Unit tests
โ”‚   โ”œโ”€โ”€ integration/        # Integration tests
โ”‚   โ””โ”€โ”€ e2e/                # End-to-end tests
โ”œโ”€โ”€ docs/                    # Documentation (DKS)
โ”‚   โ”œโ”€โ”€ adr/                # Architecture decisions
โ”‚   โ”œโ”€โ”€ devlog/             # Development logs
โ”‚   โ”œโ”€โ”€ lessons/            # Lessons learned
โ”‚   โ”œโ”€โ”€ research/           # Research notes
โ”‚   โ”œโ”€โ”€ experiments/        # Benchmarks
โ”‚   โ”œโ”€โ”€ user-guide.md       # Complete user reference
โ”‚   โ”œโ”€โ”€ tutorial.md         # 10-minute tutorial
โ”‚   โ”œโ”€โ”€ examples.md         # Workflows and examples
โ”‚   โ””โ”€โ”€ dataview-queries.md # Obsidian Dataview examples
โ””โ”€โ”€ templates/               # LLM extraction templates
    โ”œโ”€โ”€ summary.md
    โ”œโ”€โ”€ quotes.md
    โ”œโ”€โ”€ key-concepts.md
    โ””โ”€โ”€ ...

Development

Setup Development Environment

# Install development dependencies
uv sync --dev

# Install pre-commit hooks
uv run pre-commit install

# Run tests
uv run pytest

# Run with coverage
uv run pytest --cov=inkwell --cov-report=html

# Run linting
uv run ruff check .

# Format code
uv run ruff format .

# Type checking
uv run mypy src/

Running Tests

# Run all tests
uv run pytest

# Run specific test types
uv run pytest tests/unit/           # Unit tests
uv run pytest tests/integration/    # Integration tests
uv run pytest tests/e2e/            # E2E tests

# Run with verbose output
uv run pytest -v

# Run specific test file
uv run pytest tests/unit/test_costs.py -v

Code Quality Standards

This project maintains high code quality:

  • Type hints: Full coverage with mypy validation
  • Linting: Ruff for code style
  • Testing: 200+ tests with extensive coverage
  • Documentation: Comprehensive DKS documentation
  • Error handling: Robust retry logic
  • Performance: Benchmarked and optimized

Roadmap

โœ… Phase 1: Foundation (Complete)

  • โœ… Project scaffolding and build system
  • โœ… Configuration management with encryption
  • โœ… RSS feed parsing and validation
  • โœ… CLI with rich terminal output
  • โœ… Comprehensive test suite

โœ… Phase 2: Transcription (Complete)

  • โœ… YouTube transcript API integration
  • โœ… Google Gemini fallback transcription
  • โœ… Audio download with yt-dlp
  • โœ… Transcript caching with TTL
  • โœ… Multi-tier orchestration with cost optimization

โœ… Phase 3: LLM Extraction (Complete)

  • โœ… Template-based LLM prompts
  • โœ… Content extraction (quotes, concepts, etc.)
  • โœ… Markdown generation
  • โœ… Metadata management
  • โœ… Multi-provider support (Gemini, Claude)

โœ… Phase 4: Interactive Interview (Complete)

  • โœ… Claude Agent SDK integration
  • โœ… Interactive Q&A mode with streaming
  • โœ… Personal insights capture
  • โœ… Interview transcript storage

โœ… Phase 5: Obsidian Integration (Complete)

  • โœ… Wikilink generation from entities
  • โœ… Smart tag generation with LLM
  • โœ… Dataview-compatible frontmatter
  • โœ… Cost tracking system
  • โœ… Error handling with retry logic
  • โœ… E2E test framework
  • โœ… Complete user documentation

๐Ÿ”ฎ Future Enhancements

  • Custom templates and prompts
  • Batch processing automation
  • Export formats (PDF, HTML)
  • Web dashboard for management
  • Mobile app integration
  • Community template marketplace

Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run tests and linting (uv run pytest && uv run ruff check .)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

See CLAUDE.md for development guidelines.

License

MIT License - See LICENSE file for details.

Acknowledgments

Core Libraries:

  • typer: CLI framework
  • rich: Terminal formatting
  • pydantic: Data validation
  • feedparser: RSS/Atom parsing
  • yt-dlp: Audio download
  • google-generativeai: Gemini API
  • anthropic: Claude API
  • claude-agent-sdk: Interactive interview mode

Special Thanks:

  • The Obsidian community for inspiration
  • Claude (Anthropic) for development assistance
  • All podcast creators who make great content

Support


Built with โค๏ธ for knowledge workers who love podcasts.

Transform passive listening into active learning.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inkwell_cli-0.10.3.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inkwell_cli-0.10.3-py3-none-any.whl (134.4 kB view details)

Uploaded Python 3

File details

Details for the file inkwell_cli-0.10.3.tar.gz.

File metadata

  • Download URL: inkwell_cli-0.10.3.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for inkwell_cli-0.10.3.tar.gz
Algorithm Hash digest
SHA256 adb01fc4d252d32f6d96fbff71452ed73b0cff0a8935e055ae9b262ddda38367
MD5 56697c349240433f8a9b943085bda50c
BLAKE2b-256 8ffa51fed2718f71c269624e1c5f9f80518442a6a6199481c80fafa3a7dadfbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for inkwell_cli-0.10.3.tar.gz:

Publisher: publish.yml on chekos/inkwell-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inkwell_cli-0.10.3-py3-none-any.whl.

File metadata

  • Download URL: inkwell_cli-0.10.3-py3-none-any.whl
  • Upload date:
  • Size: 134.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for inkwell_cli-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ee70e6da01c2b5538a415d84862e1681ec0108dd05a69bef0aa7dc331f10bd9f
MD5 2416c4d683c1a2c094904e67ea630df2
BLAKE2b-256 81c4880a5a5e87f51ec8dc7d72f2b27ee9aad7c6c8d3ce35db62ca338a633cf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for inkwell_cli-0.10.3-py3-none-any.whl:

Publisher: publish.yml on chekos/inkwell-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page