
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
github-content-downloader
Advanced tools
Download any file or folder from GitHub repositories without cloning
A powerful command-line tool to download files and folders from GitHub repositories. Download any file or entire directory from GitHub repositories without cloning - perfect for selectively downloading specific content.
ghcd
)pip install github-content-downloader
# Clone the repository
git clone https://github.com/soykot2910/github-content-downloader.git
# Navigate to the project directory
cd github-content-downloader
# Install the package
pip install .
ghcd https://github.com/username/repository
Example:
ghcd https://github.com/tensorflow/tensorflow
ghcd https://github.com/username/repository/tree/branch/folder
Example:
ghcd https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python
ghcd https://github.com/username/repository/blob/branch/path/to/file
Example:
ghcd https://github.com/tensorflow/tensorflow/blob/master/README.md
ghcd -o ./my-downloads <github-url>
ghcd
ghcd --help
Available options:
-o, --output
: Specify output directory (default: ./downloaded_files)-h, --help
: Show help messageYou can also use it as a Python package in your code:
from github_downloader import download_from_github
# Download complete repository
download_from_github("https://github.com/username/repository")
# Download specific folder
download_from_github(
"https://github.com/username/repository/tree/master/docs",
dest_folder="./my-downloads"
)
# Download single file
download_from_github(
"https://github.com/username/repository/blob/master/README.md"
)
https://github.com/username/repository
Downloads the entire repository from the default branch (usually 'master' or 'main').
https://github.com/username/repository/tree/branch/path/to/folder
Downloads only the specified folder and its contents.
https://github.com/username/repository/blob/branch/path/to/file
Downloads only the specified file.
Permission Error: If you get a permission error while downloading, make sure you have write permissions in the output directory.
Invalid URL Format: Make sure your GitHub URL follows one of these patterns:
https://github.com/username/repo
https://github.com/username/repo/tree/branch/path
https://github.com/username/repo/blob/branch/path
Download Failed: If downloads fail, check:
requests
library (automatically installed with the package)Want to contribute? Great! Here's how:
git checkout -b feature/amazing-feature
)pip install -e .
git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please:
FAQs
Download any file or folder from GitHub repositories without cloning
We found that github-content-downloader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.