{"id":16441943,"url":"https://github.com/pspgbhu/github-download-parts","last_synced_at":"2026-05-15T09:45:19.237Z","repository":{"id":80416072,"uuid":"106855888","full_name":"pspgbhu/github-download-parts","owner":"pspgbhu","description":"Not only download the whole repository from github, but also it is able to download a partial of repository!","archived":false,"fork":false,"pushed_at":"2019-01-01T18:36:51.000Z","size":123,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T14:45:52.762Z","etag":null,"topics":["download","git","git-clone","git-clone-partial","git-download","git-download-partial","git-partial"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pspgbhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-13T17:48:20.000Z","updated_at":"2022-02-02T01:35:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fcedf3b-aa9e-4fea-9093-790e089f7c66","html_url":"https://github.com/pspgbhu/github-download-parts","commit_stats":{"total_commits":60,"total_committers":2,"mean_commits":30.0,"dds":"0.44999999999999996","last_synced_commit":"f26759b80e1ee814b3cb86b5b66ba09ee600d5f5"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pspgbhu%2Fgithub-download-parts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pspgbhu%2Fgithub-download-parts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pspgbhu%2Fgithub-download-parts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pspgbhu%2Fgithub-download-parts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pspgbhu","download_url":"https://codeload.github.com/pspgbhu/github-download-parts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240788674,"owners_count":19857691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["download","git","git-clone","git-clone-partial","git-download","git-download-partial","git-partial"],"created_at":"2024-10-11T09:15:53.114Z","updated_at":"2026-05-15T09:45:14.217Z","avatar_url":"https://github.com/pspgbhu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](./README_CN.md)\n\n# github-download-parts\n\n[![npm package](https://img.shields.io/npm/v/github-download-parts.svg)](https://www.npmjs.org/package/github-download-parts)\n[![NPM downloads](http://img.shields.io/npm/dm/github-download-parts.svg)](https://npmjs.org/package/github-download-parts)\n[![GitHub issues](https://img.shields.io/github/issues/pspgbhu/github-download-parts.svg)](https://github.com/pspgbhu/github-download-parts/issues)\n[![Build Status](https://travis-ci.org/pspgbhu/github-download-parts.svg?branch=master)](https://travis-ci.org/pspgbhu/github-download-parts)\n\nIt is able to download a partial of repository!\n\n\n## Usage\n\n- Download a single file\n\n```js\nconst repo = require('github-download-parts');\n\n// download the `index.js` file to `target` folder\nrepo('pspgbhu/github-download-parts', 'target', 'index.js')\n  .then(() =\u003e {\n    console.log('download success');\n  })\n  .catch(() =\u003e {\n    console.log('download error');\n  }\n```\n\n- Download a folder\n\n```js\nconst repo = require('github-download-parts');\n\n// download all files in the `test` folder of github repository to the local `target` folder.\nrepo('pspgbhu/github-download-parts', 'target', 'test')\n  .then(() =\u003e {\n    console.log('download success');\n  })\n  .catch(() =\u003e {\n    console.log('download error');\n  });\n```\n\n- Download a whole repository\n\n```js\nconst repo = require('github-download-parts');\n\n// download the whole repository into target local folder\nrepo('pspgbhu/github-download-parts', 'target')\n  .then(() =\u003e {\n    console.log('download success');\n  })\n  .catch(() =\u003e {\n    console.log('download error');\n  });\n```\n\n## API\n\n### repo(git, target ,pathname)\n\n- **git** `\u003cstring\u003e`\n\n  The git repository, the format of string is `\"${username}/${repository}\"`.\n\n- **target** `\u003cstring\u003e`\n\n  The local folder path that files will be created into.\n\n- **pathname** `\u003cstring\u003e`\n\n  A file or folder path of github repository.\n\n### repo(options)\nOr you could use a object as the `options` parameter\n\n- **options** `\u003cobject\u003e`\n  - **username** `\u003cstring\u003e`: The username of github.\n  - **repository** `\u003cstring\u003e`: The name of the repository.\n  - **repo** `\u003cstring\u003e`: The shorthand for `username` and `repository`, the format is `\"${username}/${respository}\"`\n  - **target** `\u003cstring\u003e`: The local folder path that files will be created into.\n  - **pathname** `\u003cstring\u003e`: A file or folder path of github repository.\n\n## CLI\n\n### Install\n\n```bash\n# Install the package\n$ npm i -g github-download-parts\n\n# Show more information about github-download-parts cli\n$ repo -h\n```\n\n### Example\n\n- Download a file or folder form someone github repository\n\n```bash\n$ repo -r \"username/repository\" -t local_folder -p target_file.js\n```\n\n- Download the whole repository\n\n```bash\n$ repo -r \"username/repository\" -t local_folder\n```\n\n### Options\n\n- `-r --repo \u003crepo\u003e`: Github repository, the format is `\"${username}/${repository}\"`\n\n- `-t --target \u003cdir\u003e`: The local directory that files will be created into\n\n- `-p --pathname \u003cpath\u003e`: The file or folder path of github repository you want to download\n\n## Download Limiting\n\nBecause of Github API Rate Limiting, every IP only be allowed 60 requests per hour, So **every IP just only could download 60 times per hour**.\n\n[Know More About Github Rate Limiting](https://developer.github.com/v3/#rate-limiting)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpspgbhu%2Fgithub-download-parts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpspgbhu%2Fgithub-download-parts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpspgbhu%2Fgithub-download-parts/lists"}