{"id":16533141,"url":"https://github.com/stefanbuck/octoherd-script-get-files","last_synced_at":"2025-03-03T12:26:16.793Z","repository":{"id":59810655,"uuid":"539184223","full_name":"stefanbuck/octoherd-script-get-files","owner":"stefanbuck","description":"An Octoherd script to download files from repositories","archived":false,"fork":false,"pushed_at":"2023-03-29T22:07:24.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-14T16:51:11.773Z","etag":null,"topics":["octoherd-script"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanbuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-20T20:41:31.000Z","updated_at":"2025-01-08T22:44:02.000Z","dependencies_parsed_at":"2023-01-22T14:30:43.983Z","dependency_job_id":null,"html_url":"https://github.com/stefanbuck/octoherd-script-get-files","commit_stats":null,"previous_names":["stefanbuck/octoherd-script-download-files"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Foctoherd-script-get-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Foctoherd-script-get-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Foctoherd-script-get-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbuck%2Foctoherd-script-get-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanbuck","download_url":"https://codeload.github.com/stefanbuck/octoherd-script-get-files/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241662986,"owners_count":19999230,"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":["octoherd-script"],"created_at":"2024-10-11T18:14:11.875Z","updated_at":"2025-03-03T12:26:16.737Z","avatar_url":"https://github.com/stefanbuck.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octoherd-script-get-files\n\n\u003e The easiest way to download files from GitHub.\n\n[![@latest](https://img.shields.io/npm/v/octoherd-script-get-files.svg)](https://www.npmjs.com/package/octoherd-script-get-files)\n[![Build Status](https://github.com/stefanbuck/octoherd-script-get-files/workflows/Test/badge.svg)](https://github.com/stefanbuck/octoherd-script-get-files/actions?query=workflow%3ATest+branch%3Amain)\n\n## Usage\n\nMinimal usage\n\n```js\nnpx octoherd-script-get-files \\\n  --source README.md \\\n  --output ./out\n```\n\nPass all options as CLI flags to avoid user prompts\n\n```js\nnpx octoherd-script-get-files \\\n  -T ghp_0123456789abcdefghjklmnopqrstuvwxyzA \\\n  -R \"octolinker/*\" \\\n  --source README.md \\\n  --output ./out\n```\n\n## Options\n\n| option | type| description|\n| --- | --- | --- |\n| `--source` | string | **Required.** File to download. This can also be a Glob see [example](#examples).|\n| `--output` | string | **Required.** Specify a path to place the downloaded file or directory (instead of using the current working directory). Directories specified in the path will be created by this command. |\n| `--ignore-archived` or `--no-ignore-archived` | boolean | Default `true`. Ignores archive repositories|\n| `--ignore-forks` or `--no-ignore-forks` | boolean | Default `true`. Ignores forked repositories|\n| `--ignore-public` or `--no-ignore-public` | boolean | Default `false`. Ignores public repositories|\n| `--ignore-private` or `--no-ignore-private` | boolean | Default `false`. Ignores private repositories|\n| `--octoherd-token`, `-T`| string | A personal access token ([create](https://github.com/settings/tokens/new?scopes=repo)). Script will create one if option is not set|\n| `--octoherd-repos`, `-R` | array of strings | One or multiple space-separated repositories in the form of `repo-owner/repo-name`. `repo-owner/*` will find all repositories for one owner. `*` will find all repositories the user has access to. Will prompt for repositories if not set |\n| `--octoherd-bypass-confirms` | boolean | Bypass prompts to confirm mutating requests|\n\n## Examples\n\nDownload a single file\n\n```js\nnpx octoherd-script-get-files -R octolinker/octolinker --source=README.md --output=./out\n```\n\nDownload a single file by full path\n\n```js\nnpx octoherd-script-get-files -R octolinker/octolinker --source=.github/PULL_REQUEST_TEMPLATE.md --output=./out\n```\n\nDownload recursively all files with a certain file extension\n\n```js\nnpx octoherd-script-get-files -R octolinker/octolinker --source='**/*.html' --output=./out\n```\n\nDownload recursively all files from a specific folder\n\n```js\nnpx octoherd-script-get-files -R octolinker/octolinker --source='.github/**/*' --output=./out\n```\n\nDownload everything\n\n```js\nnpx octoherd-script-get-files -R octolinker/octolinker --source='**/*' --output=./out\n```\n\nDon't know how to write Glob? Check out DigitalOcean's amazing [Glob testing tool](https://www.digitalocean.com/community/tools/glob).\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## About Octoherd\n\n[@octoherd](https://github.com/octoherd/) is project to help you keep your GitHub repositories in line.\n\n## License\n\n[ISC](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbuck%2Foctoherd-script-get-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanbuck%2Foctoherd-script-get-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbuck%2Foctoherd-script-get-files/lists"}