Skip to content

tdevere/yait

Repository files navigation

YAIT - YouTube AI Tracker

A privacy-focused browser extension that automatically tracks YouTube videos you watch, extracts transcripts, and organizes them with AI-powered summaries. Export to Obsidian for knowledge management.

Features

  • 🎥 Auto-track YouTube videos - Automatically captures video metadata and watch time
  • 📝 Transcript extraction - Pulls transcripts from all watched videos (with fallback to descriptions)
  • 🤖 AI-powered summaries - Configurable providers: OpenAI, Azure OpenAI, Anthropic, Ollama
  • 🔐 Encrypted storage - API keys encrypted at rest using Web Crypto API
  • 📊 Usage tracking - Monitor token usage and costs across providers
  • 📚 Obsidian integration - Export to markdown with rich metadata
  • 🔒 Privacy-first - All data stored locally, no cloud sync
  • 🌐 Cross-platform - Works on Chrome, Edge, and Firefox

Prerequisites

  • Node.js v18 or later
  • npm (included with Node.js)

Build from Source

# Clone the repo
git clone https://github.com/<your-username>/yait.git
cd yait

# Install dependencies
npm install

# Build for production
npm run build

This creates a dist/ folder containing the compiled extension.

Install in Your Browser

Microsoft Edge

  1. Open edge://extensions/ in the address bar.
  2. Enable Developer mode (toggle in the bottom-left corner).
  3. Click Load unpacked.
  4. Select the dist/ folder inside this project.
  5. The YAIT icon will appear in your toolbar. Pin it for easy access.

Google Chrome

  1. Open chrome://extensions/ in the address bar.
  2. Enable Developer mode (toggle in the top-right corner).
  3. Click Load unpacked.
  4. Select the dist/ folder inside this project.
  5. The YAIT icon will appear in your toolbar. Pin it for easy access.

Firefox

  1. Open about:debugging#/runtime/this-firefox in the address bar.
  2. Click Load Temporary Add-on…
  3. Navigate to the dist/ folder and select the manifest.json file.
  4. The YAIT icon will appear in your toolbar.

Note: Firefox temporary add-ons are removed when the browser closes. For permanent installation, the extension would need to be signed via addons.mozilla.org.

Usage

  1. After installing, visit any YouTube video.
  2. The extension automatically detects the video and extracts metadata and transcripts.
  3. Click the YAIT icon in the toolbar to see stats and the current video.
  4. Use the Obsidian button to export the video as a markdown note.
  5. Configure an AI provider in the Options page to enable AI-powered summaries.

Development

# Run development build with watch mode
npm run dev

# Build for production
npm run build

# Type check
npm run type-check

Debugging in Edge (VS Code)

A launch configuration is included. Press F5 in VS Code to launch Edge with the extension pre-loaded.

Project Structure

src/
├── background/       # Service worker (message handling, DB persistence)
├── content/          # Content scripts (video detection, transcript extraction)
├── options/          # Options/settings page (React)
├── popup/            # Toolbar popup (React)
├── shared/           # Shared code (DB, types, utils, encryption, AI providers)
│   └── services/     # AI provider implementations
└── styles/           # Tailwind CSS
scripts/              # Build utilities (manifest patching, icons)
public/               # Static assets (icons, base manifest)

License

MIT

About

YAIT - YouTube AI Tracker: Privacy-focused browser extension for tracking, transcribing, and organizing YouTube videos with AI-powered summaries

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors