# github-download-directory

> Download the contents of a given directory from a repository on GitHub.

Latest version **3.0.0** (published 2022-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install github-download-directory
pnpm add github-download-directory
yarn add github-download-directory
bun add github-download-directory
```

Provides the command `github-download-directory`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2022-04-08 |
| First published | 2018-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 3 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Blaine Bublitz |
| Maintainers | phated |
| Keywords | github, fetch, directories, files, docs, documentation |

## Links

- npm: https://www.npmjs.com/package/github-download-directory
- Repository: https://github.com/phated/github-download-directory
- Homepage: https://github.com/phated/github-download-directory#readme
- Issues: https://github.com/phated/github-download-directory/issues
- npm.io page: https://npm.io/package/github-download-directory

## Dependencies (3)

- [keyv](https://npm.io/package/keyv.md) ^4.0.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^18.12.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2022-04-08
- 2.0.0 — 2020-06-06
- 1.2.0 — 2020-04-05
- 1.1.1 — 2018-02-01
- 1.1.0 — 2018-01-23
- 1.0.0 — 2018-01-16

## README

# github-download-directory

Download the contents of a given directory from a repository on GitHub.

Only works in node 12+

## Usage

Best used from the command line:

```bash
> github-download-directory gulpjs/gulp docs
```

Or programatic:

```js
var downloader = require('github-download-directory');

downloader.download('gulpjs', 'gulp', 'docs').then(console.log, console.error);
```

You can also construct a downloader instance:

```js
var { Downloader } = require('github-download-directory');

// You can even include custom cache stores compatible with https://www.npmjs.com/package/keyv
var KeyvFile = require('keyv-file').KeyvFile;
var store = new KeyvFile();

var custom = new Downloader({
  cache: { store },
  github: { auth: 'SOME_AUTH_TOKEN' },
});

custom.download('gulpjs', 'gulp', 'docs').then(console.log, console.error);
```

## License

MIT

---
_Source: https://npm.io/package/github-download-directory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
