yt

Version, currently master branch1 version
  • master branchlatestSep 11, 2026

gitlab.com/renich/yt

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

1 stars
0 dependents
License: GPL-3.0-or-later

Installation

# Add this to your shard.yml
dependencies:
  yt:
    gitlab: renich/yt
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
>= 1.18.2
License
GPL-3.0-or-later
Author
Renich Bon Ciric
Target
  • yt from src/yt.cr

Dependencies

Runtime Dependencies

  • clim*github: at-grandpa/clim
  • crest*github: mamantoha/crest

Development Dependencies

  • ameba*github: crystal-ameba/amebadev
  • webmock*github: manastech/webmock.crdev

README

yt

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:

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


License & Authors