
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
github-download
Advanced tools
Easily download Github repos without any external dependencies such as Git, Tar, Unzip, etc.
Easily download Github repos without any external dependencies such as Git, Tar, Unzip, etc.
I really like the concept of managing user defined projects, repos, file structures (package management) on Github like the way that Component does package management. I have a package management system Rock that I use to create skeleton/templates of projects. I wanted Rock to use Github as a package management system. I also didn't want any dependencies amongst any 3rd party programs like Git, Tar, or Unzip. Pure Node.js JavaScript is what I wanted.
npm install github-download
Downloads the latest copy of the master
branch. This will still work even if the Github API limit has been reached.
https://github.com/jprichardson/node-vcsurl.git
, git@github.com:jprichardson/node-vcsurl.git
, or git://github.com/jprichardson/node-vcsurl.git
. It can also be an object containing like so: {user: 'jprichardson', repo: 'vcsurl'}
.Returns a GithubDownloader object that emits events on dir
, file
, and end
.
Example:
var ghdownload = require('github-download')
, exec = require('exec')
ghdownload({user: 'jprichardson', repo: 'node-batchflow'}, process.cwd())
.on('dir', function(dir) {
console.log(dir)
})
.on('file', function(file) {
console.log(file)
})
.on('zip', function(zipUrl) { //only emitted if Github API limit is reached and the zip file is downloaded
console.log(zipUrl)
})
.on('error', function(err) {
console.error(err)
})
.on('end', function() {
exec('tree', function(err, stdout, sderr) {
console.log(stdout)
})
})
Outputs:
.
├── CHANGELOG.md
├── LICENSE
├── README.md
├── lib
│ └── batchflow.js
├── package.json
└── test
├── batchflow-par-array.test.js
├── batchflow-par-limit.test.js
├── batchflow-par-object.test.js
├── batchflow-seq-array.test.js
├── batchflow-seq-object.test.js
├── batchflow.test.js
├── mocha.opts
└── resources
3 directories, 12 files
(MIT License)
Copyright 2013, JP Richardson jprichardson@gmail.com
FAQs
Easily download Github repos without any external dependencies such as Git, Tar, Unzip, etc.
The npm package github-download receives a total of 1,854 weekly downloads. As such, github-download popularity was classified as popular.
We found that github-download demonstrated a not healthy version release cadence and project activity because the last version was released 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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.