Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 13 Jun 15:04
· 1 commit to main since this release
v0.1.0

ytb is a fast, friendly command line for YouTube. It talks to the same public InnerTube endpoints the site itself uses, so there is no API key to register, no quota to budget, and nothing to pay for. One pure-Go binary, no runtime dependencies.

This is the first release.

Highlights

  • Resolve videos. Full metadata for any video: title, channel, views, likes, publish date, duration, chapters, caption tracks, streaming formats, and the related-video graph.
  • Walk channels and playlists. Stream a channel's uploads, shorts, live streams, and playlists, or page any playlist's items, following continuation tokens automatically.
  • Search like the site does. The full filter grid: type, upload date, duration, sort order, and feature flags (HD, 4K, HDR, subtitles, live, 360, VR180, Creative Commons).
  • Read the social layer. Comments and replies, community posts, hashtag feeds, and search autocomplete.
  • Download video and audio. A built-in pure-Go engine fetches streams with no API key and no external downloader. It leads with the token-free ANDROID_VR client, deciphers the URL signature and the n throttling parameter with an embedded JavaScript interpreter, and pulls media down in parallel byte ranges. A yt-dlp-style -f selector, playlists, subtitles, output templates, download archives, and SponsorBlock are all built in.
  • Browse YouTube Music. Search artists, albums, and songs, and open an artist, album, playlist, or song through the Music endpoints.
  • Keep what you fetch. Point any command at a local SQLite store (pure-Go, no cgo) and it becomes a crawler, with a work queue, read-only SQL access, full-text search, and a Markdown exporter.

Optional tools

The binary is pure Go and never links anything. ffmpeg is used only to merge a separate video track with its audio, convert audio, and embed cover art; without it, single-stream downloads still work and the rest report a clear error (exit 6). yt-dlp is optional too, used only for download --use-yt-dlp, extract, and recovering caption text when YouTube gates the endpoint.

Install

Homebrew:

brew install tamnd/tap/ytb

Go:

go install github.com/tamnd/ytb-cli/cmd/ytb@v0.1.0

Docker:

docker run --rm ghcr.io/tamnd/ytb video dQw4w9WgXcQ -o json

Or download a prebuilt archive (Linux, macOS, Windows on amd64 and arm64) or a Linux package (deb, rpm, apk) from the assets below. Each release ships checksums.txt signed with keyless cosign, plus SBOMs.

Verify

cosign verify-blob \
  --certificate checksums.txt.pem \
  --signature checksums.txt.sig \
  --certificate-identity-regexp 'https://github.com/tamnd/ytb-cli' \
  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
  checksums.txt

Documentation

Full docs, guides, and the CLI reference live at https://ytb-cli.tamnd.com.

Media download is your responsibility: respect YouTube's Terms of Service and copyright.