How to download all assets from GitHub

This article will show you how to download all assets from GitHub

Today, I downloaded some assets on GitHub by manually using Internet Download Manager (IDM) and it took me a lot of time to download all the assets available on each tag. So I searched for a solution on Google and found GitHub cli which will help me do it faster by typing 1 line of code.


1. Download and Install GitHub Cli

Download and Install GitHub Cli via a link:

GitHub CLI

Once completed. Open CMD and verify it.

1gh --version
2gh version 2.42.1 (2024-01-16)
3https://github.com/cli/cli/releases/tag/v2.42.1

2. Download all assets of release in Repo

1#List down all tags in the repo
2gh release list -R <username>/<repo>
3
4#Download specific tag
5gh release download <tag> -p "*" -D <destination> -R <username>/<repo>
6
7#Download the latest tag
8gh release download -p "*" -D <destination> -R <username>/<repo>

3. Practice

I will try to download all the assets of release in the Repo cli/cli

Link Repo: cli/cli: GitHub’s official command line tool

1#List down all tags in the repo
2gh release list -R cli/cli

gh-01.png

1#Download all assets of tag v2.30.0 to Test folder
2gh release download v2.30.0 -p "*" -D "C:\Users\hc\Desktop\Test" -R cli/cli

gh-02.png

1#Download all assets of the latest tag to Test folder
2gh release download -p "*" -D "C:\Users\hc\Desktop\Test" -R cli/cli

gh-03.png


Hope this tip will be useful for you.