https://github.com/node-libraries/github-files
https://github.com/node-libraries/github-files
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/node-libraries/github-files
- Owner: node-libraries
- Created: 2023-01-29T06:00:25.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-12T12:25:28.000Z (about 2 years ago)
- Last Synced: 2025-03-20T01:45:17.697Z (10 months ago)
- Language: TypeScript
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-files
Download the file at the given github address
## usage
```sh
Usage: github-files [options] [command]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
list [options] Retrieving the file list
-j, --json output json format
download [options] [outdir] Download files
-p, --parallels Number of parallel downloads
help [command] display help for command
```
- Download files in the output folder with a parallel number of 5.
```sh
npx github-files download https://github.com/node-libraries/scaffold/tree/master/src output -p 5
```
## When called from a programme
```ts
import { getGitHubFileList, downloadGitHubFiles } from "github-files";
const main = async () => {
const files = await getGitHubFileList(
"https://github.com/node-libraries/scaffold/tree/master/src"
);
if (files) await downloadGitHubFiles(files, "output");
};
main();
```