Skip to content

Cap0n3/pulltra-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pulltra-cli

A fast, zero-config CLI tool to fetch YouTube transcripts from the command line. No API key required.

Installation

go install github.com/Cap0n3/pulltra-cli@latest

Or build from source:

git clone https://github.com/Cap0n3/pulltra-cli.git
cd pulltra-cli
go build -o pulltra-cli .

Usage

pulltra-cli [flags] <video-url-or-id>

Flags

Flag Short Default Description
--copy -c false Copy transcript to clipboard
--lang -l en Transcript language (BCP 47 code)
--plain -p false Plain text without timestamps
--output -o Write output to a file

Examples

Fetch a transcript with timestamps:

pulltra-cli https://www.youtube.com/watch?v=dQw4w9WgXcQ
[0:00] Welcome to the channel. Today we're going to cover...

[0:15] Let's start with the basics. This is something you'll want to know...

Copy transcript to clipboard:

pulltra-cli --copy dQw4w9WgXcQ

Get plain text (no timestamps):

pulltra-cli --plain dQw4w9WgXcQ

Save to a file in French:

pulltra-cli --lang fr --output transcript.txt https://youtu.be/dQw4w9WgXcQ

Supported URL formats

  • https://www.youtube.com/watch?v=VIDEO_ID
  • https://youtu.be/VIDEO_ID
  • https://www.youtube.com/shorts/VIDEO_ID
  • Bare video ID (e.g. dQw4w9WgXcQ)

Clipboard support requires wl-copy (Wayland), xclip, or xsel (X11) on Linux, and pbcopy on macOS.

How it works

pulltra-cli uses YouTube's innertube API to retrieve caption data — no API key or authentication needed. It supports both manual and auto-generated captions.

Documentation

Each package has godoc comments. Browse them with:

# Project overview
go doc -all .

# Individual packages
go doc -all ./cmd
go doc -all ./internal/youtube
go doc -all ./internal/format
go doc -all ./internal/clipboard

Or serve as HTML locally:

go install golang.org/x/tools/cmd/godoc@latest
godoc -http=:6060
# Then open http://localhost:6060/pkg/github.com/Cap0n3/pulltra-cli/

License

MIT

About

A fast, zero-config CLI tool to fetch YouTube transcripts from the command line. No API key required.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages