{"id":31138654,"url":"https://github.com/gholamrezadar/github-direct-downloader","last_synced_at":"2026-05-09T05:33:42.629Z","repository":{"id":310805555,"uuid":"1041237790","full_name":"Gholamrezadar/github-direct-downloader","owner":"Gholamrezadar","description":"Want to download a specific folder or a single file from a Github repo without cloning the whole repo?","archived":false,"fork":false,"pushed_at":"2025-08-20T09:25:52.000Z","size":288,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-18T11:01:52.475Z","etag":null,"topics":["downloader","github","nextjs"],"latest_commit_sha":null,"homepage":"https://github-direct-downloader.vercel.app","language":"TypeScript","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/Gholamrezadar.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-20T07:29:50.000Z","updated_at":"2025-08-20T10:14:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"5218bd78-7c55-45b5-b449-43a81ee829e7","html_url":"https://github.com/Gholamrezadar/github-direct-downloader","commit_stats":null,"previous_names":["gholamrezadar/github-direct-downloader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gholamrezadar/github-direct-downloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gholamrezadar%2Fgithub-direct-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gholamrezadar%2Fgithub-direct-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gholamrezadar%2Fgithub-direct-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gholamrezadar%2Fgithub-direct-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gholamrezadar","download_url":"https://codeload.github.com/Gholamrezadar/github-direct-downloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gholamrezadar%2Fgithub-direct-downloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32808489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["downloader","github","nextjs"],"created_at":"2025-09-18T10:53:52.421Z","updated_at":"2026-05-09T05:33:42.621Z","avatar_url":"https://github.com/Gholamrezadar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github Direct Downloader\n\nWant to download a specific folder or a single file from a Github repo without cloning the whole repo?\n\nVisit the website: [github-direct-downloader.vercel.app](https://github-direct-downloader.vercel.app)\n\n![demo](github-dl-demo.png)\n\nMake sure to give the repo a star :)\n\n## Research\n\nIn case you want to build something similar for whatever reason, here are my foundings:\n\n### Get a list of files\n\nTo get a list of files from a repo use this api:\n\n```bash\nhttps://api.github.com/repos/{USER}/{REPO}/git/trees/{BRANCH}\\?recursive\\=1\n```\n\nExample:\n\n```bash\nhttps://api.github.com/repos/Gholamrezadar/GHDcode/git/trees/main\\?recursive\\=1\n```\n\n\n### Get direct link to a file\n\n```bash\nhttps://raw.githubusercontent.com/{USER}/{REPO}/refs/heads/{BRANCH}/{path/to/file.ext}\n```\n\n### Download using curl\n\nTo download a file using curl and place it in it's original structure use this command (`--create-dirs` is important)\n\n```bash\ncurl -L \"https://raw.githubusercontent.com/{USER}/{REPO}/refs/heads/{BRANCH}/{path/to/file.ext}\" --create-dirs -o \"path/to/file.ext\"\n```\n\nExample:\n```bash\ncurl -L \"https://raw.githubusercontent.com/gholamrezadar/ghdcode/refs/heads/main/resources/sample%20copy.txt\" --create-dirs -o \"resources/sample copy.txt\"\n```\n\n\n## Credits\n\nGPT 5, Bolt \u0026 Gholamreza Dar 2025\n\n(Frontend mostly done by Bolt with minor tweaks from me)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgholamrezadar%2Fgithub-direct-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgholamrezadar%2Fgithub-direct-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgholamrezadar%2Fgithub-direct-downloader/lists"}