{"id":27425922,"url":"https://github.com/ckpack/git-dl","last_synced_at":"2025-04-14T12:29:30.790Z","repository":{"id":283422632,"uuid":"951178231","full_name":"ckpack/git-dl","owner":"ckpack","description":"使用命令行下载 github 项目","archived":false,"fork":false,"pushed_at":"2025-03-25T05:45:35.000Z","size":227,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T06:26:47.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ckpack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2025-03-19T09:28:25.000Z","updated_at":"2025-03-25T05:45:28.000Z","dependencies_parsed_at":"2025-03-25T06:27:20.142Z","dependency_job_id":null,"html_url":"https://github.com/ckpack/git-dl","commit_stats":null,"previous_names":["ckvv/git-dl","ckpack/git-dl"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckpack%2Fgit-dl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckpack%2Fgit-dl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckpack%2Fgit-dl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckpack%2Fgit-dl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckpack","download_url":"https://codeload.github.com/ckpack/git-dl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248880946,"owners_count":21176760,"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":[],"created_at":"2025-04-14T12:29:30.121Z","updated_at":"2025-04-14T12:29:30.758Z","avatar_url":"https://github.com/ckpack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @ckpack/git-dl\n\n[English](./README.md) | [简体中文](./README_ZH.md)\n\nA command-line tool used to download specific content from GitHub repositories. It allows you to specify parameters such as the owner and name of the repository, the output directory, the branch, the subpath, the glob expression, etc., making it convenient to download the files you need.\n\n\u003e GitHub has rate limits for unauthenticated users \u003chttps://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api\u003e. You can add `GITHUB_TOKEN` to the environment variables or use the `-t` option to avoid exceeding the limits. You can create `GITHUB_TOKEN` at \u003chttps://github.com/settings/personal-access-tokens\u003e\n\n# Install\n\n```shell\nnpm install -g @ckpack/git-dl\n```\n\n# Usage\n\n```shell\ngit-dl [options] [command] \u003cowner/repo\u003e [output-dir]\n```\n\nCommand:\n\n-   `\u003cowner/repo\u003e`：Required. The owner and name of the GitHub repository, in the format of `owner/repo`, for example, `ckpack/git-dl`.\n-   `[output-dir]`：Optional. The output directory for the downloaded files. If not specified, the default directory will be used.\n\nOptions:\n\n+ `-V`, `--version`         output the version number\n+ `-b`, `--branch \u003cchar\u003e`   branch name (default: \"main\")\n+ `-s`, `--subpath \u003cchar\u003e`  subpath\n+ `-g`, `--glob \u003cchar\u003e`     glob expressions\n+ `-d`, `--debug `          show debug log\n+ `-t`, `--token \u003cchar\u003e`    github token\n+ `-h`, `--help`            display help for command\n\nExample:\n\n```shell\n# download ckpack/git-dl\ngit-dl ckpack/git-dl\n\n# download ckpack/git-dl to my_dir\ngit-dl ckpack/git-dl ./my_dir\n\n# Only download the src directory in ckpack/git-dl\ngit-dl ckpack/git-dl -s src\n\n# Only download the .ts files in ckpack/git-dl\ngit-dl ckpack/git-dl -g \"**.ts\"\n\n# USE GITHUB_TOKEN\ngit-dl ckpack/git-dl -g \"**.ts\" -t \"YOUR_GITHUB_TOKEN\"\n\n# Show the help for the command\ngit-dl -h\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckpack%2Fgit-dl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckpack%2Fgit-dl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckpack%2Fgit-dl/lists"}