{"id":19685447,"url":"https://github.com/kislerdm/github-downloader","last_synced_at":"2026-05-14T15:37:03.537Z","repository":{"id":99103823,"uuid":"381528729","full_name":"kislerdm/github-downloader","owner":"kislerdm","description":"CLI to download part of codebase from bulky mono-repo","archived":false,"fork":false,"pushed_at":"2022-08-09T23:58:51.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T01:11:28.175Z","etag":null,"topics":["cli","github","github-api","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kislerdm.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-06-30T00:14:20.000Z","updated_at":"2022-08-09T23:58:54.000Z","dependencies_parsed_at":"2023-06-03T20:15:45.695Z","dependency_job_id":null,"html_url":"https://github.com/kislerdm/github-downloader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kislerdm%2Fgithub-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kislerdm%2Fgithub-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kislerdm%2Fgithub-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kislerdm%2Fgithub-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kislerdm","download_url":"https://codeload.github.com/kislerdm/github-downloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993543,"owners_count":19890418,"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":["cli","github","github-api","golang"],"created_at":"2024-11-11T18:21:58.378Z","updated_at":"2026-05-14T15:36:58.515Z","avatar_url":"https://github.com/kislerdm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Simple Downloader\n\n**Motivation**: It is often required to fetch a couple of codebase modules from bulky monorepo. Unfortunately standard [git client](https://git-scm.com/) doesn't permit for such operation directly. Github provides a set of API endpoints to achieve that objective though.\n\n*The repo contains the codebase of the CLI tool* to download part of the codebase: either a file/blob, or directory/tree from a github repository.\n\n## Installation\n\n### Requirements\n\n- [cURL](https://curl.se/)\n\n- [tar](https://man7.org/linux/man-pages/man1/tar.1.html)\n\n### Instructions\n\nRun to install:\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/kislerdm/github-downloader/HEAD/install.sh)\"\n```\n\n## How to use\n\n**Note** The tool was not tested in windows.\n\n- Run to see the help:\n\n```bash\ngithub-downloader -h\n```\n\n- Run to fetch the current version of the app:\n\n```bash\ngithub-downloader -b https://github.com/kislerdm/github-downloader/blob/master/cli/VERSION\n```\n\nYou shall see the following in stdout:\n\n```bash\n2021/06/30 17:42:11 Download [4 bytes] cli/VERSION\n```\n\nNow if you were to run the command:\n\n```bash\ncat /tmp/cli/VERSION\n```\n\nYou shall expect to see the current version of the app.\n\n## How to use github token\n\nIt is advised to authenticate with github to overcome the API calls [rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting). Please follow [the instructions](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) to setup an access token.\n\nThe required authorization scope is `repo`.\n\nThere are two options to allow the CLI to access the token:\n\n- Export the token as an environmental variable `GITHUB_TOKEN`\n\n- Provide the token as a cmd option:\n\n```bash\ngithub-downloader -token=xxxxxx https://github.com/kislerdm/github-downloader/blob/master/cli/VERSION\n```\n\n### Note\n\nThe *cmd option token* is prioritized above the environmental variable. In the other words, if you export token as an envvar and provide another token as the cmd option `token`, the later value will be used to authenticate with the github API.\n\n## Collaboration\n\nIf you find this tool useful but missing some features, please open a github issue, or submit a PR with modifications.\n\n### Note\n\nThe codebase is distributed under [the MIT copyright license](./LICENSE).\n\n## Author\n\n[Dmitry Kisler](https://www.dkisler.com)\n\nFeel free to get in touch [here](https://www.linkedin.com/in/dkisler/) to chat over tech stuff :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkislerdm%2Fgithub-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkislerdm%2Fgithub-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkislerdm%2Fgithub-downloader/lists"}