created_at2020-05-14 00:10:20.912841
updated_at2020-08-30 15:47:53.984322
descriptionGenerates a list of links to all public videos of a YouTube channel.




Generates a list of links to all public videos of a YouTube channel.

$ yt-chanvids PewDiePie


This program is published on so you can easily get it by running cargo install, like so:

cargo install yt-chanvids

All binaries installed with cargo install are stored in the installation root’s bin folder. If you installed Rust using and don’t have any custom configurations, this directory will be $HOME/.cargo/bin. Ensure that directory is in your $PATH to be able to run programs you’ve installed with cargo install.



You can pass a username or a channel id. They can be found in the URL of a YouTube channel's page.

The program will produce a line for each video that it can find. A line only contains a URL to the video.

The exit code will be 0 if the program does not encounter any problems. Any other value indicates a problem and you will most likely find an error message in the standard error stream.

The only option available at the moment is the help option (-h, --help) which makes the program do nothing but print usage instructions.

The -- sequence is useful for preventing channel ids and usernames to be interpreted as options if they begin with dashes.


The following examples work on bash. Long output is redacted with [...].

You can get a list by either passing a channel id:

# Passing a channel id.
$ yt-chanvids UCR4s1DE9J4DHzZYXMltSMAg

Or a username:

# Passing a username.
$ yt-chanvids HowToBasic

With redirection you're able to save the list to a file:

# Saves list to a file.
$ yt-chanvids Vsauce > to-watch.txt

# Appends more links to the existing file.
$ yt-chanvids Vsauce2 >> to-watch.txt

Pipe the list to another command:

# Counts the number of public videos of a channel.
$ yt-chanvids PewDiePie | wc -l

And even perform complex operations:

# Shortens urls.
$ yt-chanvids PewDiePie | sed "s/^https:\/\/www\.youtube\.com\/watch?v=/https:\/\/\//"


The easiest way to contribute is by starring this project on GitHub!

If you've found a bug, would like to suggest a feature or need help, feel free to create an issue on GitHub:


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Commit count: 37

cargo fmt