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:
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
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
1#Download all assets of the latest tag to Test folder
2gh release download -p "*" -D "C:\Users\hc\Desktop\Test" -R cli/cli
Hope this tip will be useful for you.