0.0.3 • Published 2 years ago

down-git v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

🐙 Down Git

NPM version

Download directory or file from GitHub.

Install

npm i down-git
# yarn add down-git
# pnpm add down-git

Usage

The following command downloads the directory https://github.com/holazz/down-git/tree/main/src into the ./tmp folder

down-git holazz/down-git/src -b main -o ./tmp

Use down-git --help for more information

You can also use it programmatically:

import { download } from 'down-git'

const options = {
  route: 'holazz/down-git/src',
  branch: 'main',
  output: './tmp',
}

download(options).then(
  () => console.log('Done!')
)

Options

namerequireddescriptiondefault
routetrueDirectory or file path (owner/repo/path)-
branchfalseThe name of the commit/branch/tagRepository's default branch (usually main or master)
outputfalseOutput directoryprocess.cwd()
tokenfalsePersonal access token-

License

MIT License © 2022 zz