gitdown-cli
v1.1.2
Published
Download single folder and files from github repository
Downloads
4
Maintainers
Readme
gitdown-cli
Download single folder and files from github repository
See gitdown for the command-line github single folder and files download.
Install
npm install -g gitdown-cli
Usage in CLI Command
# <path> (.|dir|dir/subdir|new-path|../)
# <branch> use any branch
gitdown https://github.com/user/repo/tree/<branch>/path <path>?
or
# ignore github.com and tree/branch
gitdown user/repo/path <path>?
Example
# folder download
gitdown https://github.com/nodejs/node/tree/main/doc/api <new-path>?
or
# file download
gitdown https://github.com/nodejs/node/blob/main/doc/api/buffer.md <new-name>?
Usage in Nodejs
const gitdown = require('gitdown')
gitdown(url, path, dir?)