GitHub CLI extension for download folders/files
gh extension install yuler/gh-download
gh config get -h github.com oauth_token
command, for support private repositoryget a tree
API filter path/
means is folder, otherwise checked automatically via api# Create alias dl => download
gh alias set dl "download"
# Download files
gh dl yuler/gh-download README.md gh-download
# Download `.github` folders from `cli/cli` repo
gh dl cli/cli .github
# Download from github.com url
gh dl https://github.com/yuler/actions/blob/3541e20e6f195a812b0e775058224a6d6f4b9fc1/ci/nodejs.yml