yt

Fast, lightweight Crystal CLI for YouTube channel management, metadata editing, and transcript extraction.

yt Banner

yt

pipeline status latest release License: GPL-3.0-or-later Crystal Donate with Liberapay

A fast, lightweight Crystal CLI for YouTube channel management, metadata editing, and transcript extraction.

Features

  • Multi-Channel Profiles: Authenticate and switch between channels via OAuth 2.0 (local browser or headless/remote owner delegation).
  • Metadata CRUD: Inspect, update (preserving categories & tags), upload, and delete videos directly or from JSON files.
  • Transcript Extraction: Fast subtitle downloads via yt-dlp with automatic whisper audio fallback across multiple formats (timestamps, text, json, srt, vtt).

Installation

git clone https://gitlab.com/renich/yt.git
cd yt
make build

Quick Reference

Authentication & Profiles

# Authenticate a channel profile (local browser or remote delegation)
./bin/yt auth [profile_name] --id="CLIENT_ID" --secret="CLIENT_SECRET"
./bin/yt auth [profile_name] --id="CLIENT_ID" --secret="CLIENT_SECRET" --manual

# Profile management
./bin/yt profile list                     # List profiles (* = active)
./bin/yt profile use <name>               # Switch active profile
./bin/yt profile current                  # Show active profile status
./bin/yt profile rename <old> <new>       # Rename a profile
./bin/yt profile delete <name>            # Delete a profile

Video Metadata

./bin/yt list                             # List recent videos
./bin/yt get <VIDEO_ID>                   # Fetch metadata (text, json, yaml)
./bin/yt get <VIDEO_ID> --format=json > metadata.json

# Update metadata (preserves untouched fields)
./bin/yt update <VIDEO_ID> --title="New Title" --description="New Description"
./bin/yt update <VIDEO_ID> --file=metadata.json

./bin/yt upload path/to/video.mp4 --title="Title" --description="Desc" --privacy="private"
./bin/yt delete <VIDEO_ID> [--force]      # Delete video

Transcripts

# Extract transcript (formats: timestamps, text, json, srt, vtt)
./bin/yt transcript <VIDEO_ID>
./bin/yt transcript <VIDEO_ID> --lang="es,en" --format=timestamps -o transcript.txt
./bin/yt transcript <VIDEO_ID> --format=srt -o captions.srt
./bin/yt transcript <VIDEO_ID> --cookies=firefox

Contributing & Development

We welcome contributions! Please review CONTRIBUTING.rst for guidelines, Conventional Commits standards, and development workflows.

make spec     # Run test suite
make lint     # Run Ameba static analysis
make format   # Format code

Supporting the Project

If you find yt valuable for your YouTube workflows or transcript pipelines, consider supporting its maintenance:

Donate using Liberapay

You can also sponsor Rénich Bon Ćirić directly on Liberapay (renich).


License & Authors

Repository

yt

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 4
  • about 2 hours ago
  • December 25, 2025
License

GNU General Public License v3.0 or later

Links
Synced at

Fri, 11 Sep 2026 00:54:21 GMT

Languages