JSPM

yt2blog

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q72011F
  • License MIT

Transform YouTube videos into polished blog posts using AI

Package Exports

  • yt2blog
  • yt2blog/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (yt2blog) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

yt2blog

yt2blog

Transform any YouTube video into a polished blog post using AI

MIT License

╔════════════════════════════════════════════════════════════════════╗
║                                                                    ║
║   ██╗   ██╗████████╗ ██████╗ ██████╗  ██╗      ██████╗  ██████╗    ║
║   ╚██╗ ██╔╝╚══██╔══╝╚════██╗ ██╔══██╗ ██║     ██╔═══██╗██╔═════╝   ║
║    ╚████╔╝    ██║    █████╔╝ ██████╔╝ ██║     ██║   ██║██║  ███╗   ║
║     ╚██╔╝     ██║   ██╔═══╝  ██╔══██╗ ██║     ██║   ██║██║   ██║   ║
║      ██║      ██║   ███████╗ ██████╔╝ ███████╗╚██████╔╝╚██████╔╝   ║
║      ╚═╝      ╚═╝   ╚══════╝ ╚═════╝  ╚══════╝ ╚═════╝  ╚═════╝    ║
║                                                                    ║
╚════════════════════════════════════════════════════════════════════╝

Features

  • YouTube → Transcript → AI → Blog - Full pipeline from video URL to polished markdown
  • Dynamic Model Selection - Search, sort, and filter from 20+ AI models with live pricing info
  • Multiple Blog Styles - SEO, Medium essay, Newsletter, Twitter thread, Technical breakdown
  • 9 Built-in Themes - Default, Dracula, Nord, Catppuccin, Tokyo Night, Monokai, High Contrast, Neo Brutalism, Windows 98
  • BYOK (Bring Your Own Key) - Use your own API keys or AI Gateway
  • Interactive CLI - Beautiful terminal UI with progress tracking

Prerequisites

  • Node.js >= 18
  • pnpm (recommended) or npm
  • API Key - Either AI Gateway key or provider-specific key (see below)
  • yt-dlp (optional) - Only needed for Whisper fallback on videos without captions

Quick Start

# Clone and install
git clone https://github.com/BankkRoll/yt2blog.git
cd yt2blog
pnpm install

# Set your API key
cp .env.example .env
# Edit .env and add your key(s)

# Run
pnpm dev

Environment Variables

Environment variables can be set in multiple ways:

# Option 1: .env file (recommended)
cp .env.example .env
# Edit .env with your keys

# Option 2: Shell export
export AI_GATEWAY_API_KEY=your-key

# Option 3: Inline with command
AI_GATEWAY_API_KEY=your-key pnpm dev

# Option 4: System environment variables
# Set via your OS settings
AI_GATEWAY_API_KEY=your-gateway-key

Get your key from Vercel Dashboard → AI Gateway

Provider-Specific Keys (BYOK)

If not using AI Gateway, set keys for the providers you want to use:

Variable Provider Notes
OPENAI_API_KEY OpenAI Also used for Whisper transcription fallback
ANTHROPIC_API_KEY Anthropic Claude models
GOOGLE_API_KEY Google AI Gemini models
GROQ_API_KEY Groq Fast inference
MISTRAL_API_KEY Mistral
COHERE_API_KEY Cohere Command models
PERPLEXITY_API_KEY Perplexity Online search models
XAI_API_KEY xAI Grok models
DEEPSEEK_API_KEY DeepSeek

App Settings

Variable Description Default
YT2BLOG_THEME Default theme ID default

Available themes: default, dracula, nord, catppuccin, tokyo-night, monokai, high-contrast, neo-brutalism, windows-98

Supported Models

The model selector dynamically fetches available models from AI Gateway. When offline or without a gateway key, these defaults are available:

Provider Models
OpenAI GPT-4o, GPT-4o Mini, GPT-4 Turbo
Anthropic Claude Sonnet 4, Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude 3 Opus
Google Gemini 2.0 Flash, Gemini 1.5 Pro, Gemini 1.5 Flash
Groq Llama 3.3 70B, Llama 3.1 8B, Mixtral 8x7B
Mistral Mistral Large, Mistral Small
Cohere Command R+, Command R
Perplexity Sonar Large Online
xAI Grok 2
DeepSeek DeepSeek Chat

Documentation

Document Description
DEVELOPMENT.md Development setup, architecture, and project structure
CONTRIBUTING.md Contribution guidelines and workflow
CHANGELOG.md Version history and release notes
CODE_OF_CONDUCT.md Community guidelines
LICENSE MIT License

Acknowledgments

  • Vercel AI SDK - AI Gateway and model routing
  • Ink - React for CLI
  • YouTube InnerTube API - Transcript fetching