A Go program to find and watch YouTube videos from the terminal without requiring API keys.
[!NOTE] This is a
Python -> Go
translation of cybardev/ytpy which itself was aShell -> Python
translation of pystardust/ytfzf (before I rewrote it from scratch)
Click to navigate.
Download the file from the Releases page: ytgo-{os}-{arch}
Place it on your $PATH
and make it executable.
Link to package: pkg.go.dev/github.com/cybardev/ytgo/v3
Run the following command:
go install github.com/cybardev/ytgo/v3/cmd/ytgo@latest
Ensure $GOPATH/bin
is added to $PATH
. An easy way is to add this line to ~/.profile
:
export PATH="$(go env GOPATH)/bin:$PATH"
[!IMPORTANT] The pkg.go.dev registry may have an outdated version. If you encounter bugs or feature disparity, please replace
latest
after@
withmain
, e.g.github.com/cybardev/ytgo/v3/cmd/ytgo@main
, OR try the Manual installation method for the latest updates.
Output of ytgo -h
:
Usage of ytgo:
-d Display URL only
-i Interactive selection
-m Play music only
-n int
Play nth media (default 1)
-p Prompt mode
-u Play from URL
-v Display version
HINT: Here’s a list of mpv keyboard shortcuts for your convenience.
Play a video:
ytgo rickroll
Play an audio:
ytgo -m gurenge band cover
Play the third search result:
ytgo -n 3 racing into the night
Play an audio from URL:
ytgo -u -m "https://www.youtube.com/watch?v=y6120QOlsfU"
Find the URL of a video:
ytgo -d hotaru maiko fujita
Interactive selection mode:
ytgo -i marmot scream meme
var ytInitialData = ({.*?});