npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

youtube-transcript-cli

v0.1.5

Published

A Node.js CLI that fetches YouTube transcripts from a video URL or video ID.

Readme

YouTube Transcript CLI

A Node.js CLI that fetches YouTube transcripts from a video URL or video ID.

This project is a standalone CLI package for npm and bun (not an MCP server).

Features

  • Fetch transcript by full YouTube URL or raw video ID
  • Optional language priority list (--lang=en,fr)
  • Optional timestamps (--timestamps)
  • Optional chunking by max characters (--max=6000)
  • Works as a local command and as a global command (-g)

Command Name

The CLI command is:

yt-transcript

Hyphens are valid in CLI command names.

Installation

Global install (recommended)

npm install -g youtube-transcript-cli
# or with bun
bun add -g youtube-transcript-cli

Then use it directly from any terminal:

yt-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ --lang=en,fr --timestamps --max=6000

Local install in a project

npm install youtube-transcript-cli
# or with bun
bun add youtube-transcript-cli

Run with npx:

npx yt-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ --lang=en,fr --timestamps --max=6000

Local Development Test (before publishing)

From this repository folder:

npm install
npm run build
npm link
yt-transcript --help
yt-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ --lang=en,fr --timestamps --max=6000

# bun alternative
bun install
bun run build
bun link
yt-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ --lang=en,fr --timestamps --max=6000

Remove the global link when done:

npm unlink -g youtube-transcript-cli
# or with bun
bun unlink -g youtube-transcript-cli

Usage

yt-transcript [<url|videoId>] [--lang en,fr] [--timestamps] [--max 12000]

If no URL/ID is provided, a default demo video is used.

Version

Check the installed CLI version:

yt-transcript -v
yt-transcript --version
# when running without global install via npx:
npx youtube-transcript-cli -v

Options

  • --lang=en,fr or --lang en,fr: language priority list
  • --timestamps: include timestamps in output
  • --max=6000 or --max 6000: chunk output by max characters
  • --help or -h: show help

Output Behavior

  • Without --max, output is not chunked.
  • With --max, output is split into chunks.
  • Timestamps are based on real segment offsets.

Use as a Skill (Prompt Examples)

When integrated as a skill in an AI assistant, users can ask:

  • Give me the transcript and timestamps on this video https://www.youtube.com/watch?v=dQw4w9WgXcQ
  • Give me the french transcript of this Youtube video dQw4w9WgXcQ
  • Extract transcript in English and French with timestamps for https://youtu.be/dQw4w9WgXcQ and save it as a .txt/.md/text/markdown file

Use as a Skill (Integration instructions)

To integrate this CLI as a reusable skill, place a folder containing a SKILL.md file inside one of the assistant-supported skills directories. Common locations:

  • <your-project>/.claude/skills/yt-transcript/
  • <your-project>/.github/skills/yt-transcript/
  • <your-project>/.opencode/skills/yt-transcript/

In that folder create a SKILL.md describing usage and parameters. Minimal example:

# yt-transcript

Short description: Uses the `yt-transcript` CLI to fetch a YouTube video's transcript.

Usage examples:
- `yt-transcript https://www.youtube.com/watch?v=<id> --lang en,fr --timestamps`

Notes:
- Ensure `youtube-transcript-cli` is available in the runtime environment (installed as a project dependency or available in `PATH`).
- Adapt the invocation to your assistant runtime (Node, container, cloud function, etc.).

After adding the folder, register or load the skills directory according to your assistant's mechanism so the skill becomes discoverable.

If you want, I can create an example SKILL.md in one of these locations in the repository — which one do you prefer?

Publish to npm

When you are ready:

npm login
npm publish

The package is configured with:

  • package name: youtube-transcript-cli
  • CLI command: yt-transcript

License

MIT