solrevdev.ytx 1.0.3

Prefix Reserved
dotnet tool install --global solrevdev.ytx --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local solrevdev.ytx --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=solrevdev.ytx&version=1.0.3
                    
nuke :add-package solrevdev.ytx --version 1.0.3
                    

ytx — YouTube → JSON (title, description, transcript)

A .NET global tool that extracts YouTube video metadata and transcripts as JSON.

{
  "url": "https://youtube.com/...",
  "title": "Video title",
  "description": "Video description...",
  "transcriptRaw": "Full transcript as one string...",
  "transcript": "- [00:03](https://www.youtube.com/watch?v=...&t=3s) First line\n- [00:07](...) Next line"
}

Features

  • 🎯 Single JSON output — Clean, structured data for easy parsing
  • 🌍 Captions-aware — Prefers English captions, falls back to any available
  • 📝 Markdown transcript — Human-readable format with timestamped links
  • 🚀 Cross-platform — Works on macOS, Windows, Linux (.NET 8/9/10)
  • Fast & lightweight — No dependencies beyond .NET and YoutubeExplode

Quick Start

Install from NuGet

dotnet tool install -g solrevdev.ytx

Usage

# Basic usage
ytx "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

# Via JSON input
echo '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}' | ytx

# Save to file
ytx "https://www.youtube.com/watch?v=dQw4w9WgXcQ" > video-data.json

Upgrade

dotnet tool update -g solrevdev.ytx

Output Format

Field Description
url Input YouTube URL (echoed back)
title Video title
description Full video description
transcriptRaw All caption text as a single normalized string
transcript Markdown list with [HH:MM:SS](link) text format

Note: If captions are unavailable (private videos, disabled captions, etc.), transcriptRaw will be empty and transcript will explain why.

Development

Local Build & Test

# Clone the repository
git clone https://github.com/solrevdev/solrevdev.ytx.git
cd solrevdev.ytx

# Restore dependencies
dotnet restore src/Ytx

# Build
dotnet build src/Ytx -c Release

# Test locally (supports net8.0, net9.0, or net10.0)
dotnet run --project src/Ytx --framework net10.0 "YOUR_YOUTUBE_URL"

# Pack for local installation
dotnet pack src/Ytx -c Release
dotnet tool install -g solrevdev.ytx --add-source ./nupkg

Project Structure

├── src/Ytx/           # Main project source
├── .github/workflows/ # CI/CD automation
├── build/             # Build artifacts
├── data/              # Test data
├── docs/              # Documentation
├── tests/             # Unit tests
└── tools/             # Development tools

CI/CD

This project uses GitHub Actions for automated publishing:

  • Triggers: Push to master branch or manual workflow dispatch
  • Version bumping: Automatically increments version (patch/minor/major)
  • NuGet publishing: Publishes to nuget.org using NUGET_API_KEY secret
  • GitHub Releases: Creates tagged releases with auto-generated notes

Manual Release

Go to Actions → "Publish NuGet (ytx)" → "Run workflow" and choose your version bump type.

Exit Codes

  • 0 — Success
  • 1 — Unexpected error (network, permissions, invalid video, etc.)
  • 2 — Usage error (missing or invalid URL)

Known Limitations

  • Private, age-restricted, or region-blocked videos may not provide transcripts
  • Videos with disabled captions will show "No transcript available"
  • Timestamps are based on caption segment start times
  • Large transcripts are not truncated (full output provided)

Dependencies

  • YoutubeExplode — YouTube video data extraction
  • .NET 8.0+ SDK (for development)

License

MIT License - see LICENSE for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Issues and feature requests are welcome!


Made with ❤️ by @solrevdev

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.3 332 11/17/2025
1.0.2 198 8/31/2025
1.0.1 189 8/31/2025