{"id":31025747,"url":"https://github.com/unitvectory-labs/ghrelgrab","last_synced_at":"2025-09-13T17:12:15.584Z","repository":{"id":309989447,"uuid":"1038284776","full_name":"UnitVectorY-Labs/ghrelgrab","owner":"UnitVectorY-Labs","description":"Fetches and extracts a specified version of a GitHub release asset from a chosen repository for the current or mapped system architecture.","archived":false,"fork":false,"pushed_at":"2025-09-06T13:08:14.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T14:24:48.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/UnitVectorY-Labs.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,"zenodo":null}},"created_at":"2025-08-14T23:34:50.000Z","updated_at":"2025-09-06T13:08:16.000Z","dependencies_parsed_at":"2025-08-15T02:26:10.998Z","dependency_job_id":"15484bf8-9bdf-445c-87e6-00ca88465b15","html_url":"https://github.com/UnitVectorY-Labs/ghrelgrab","commit_stats":null,"previous_names":["unitvectory-labs/ghrelgrab"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/UnitVectorY-Labs/ghrelgrab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fghrelgrab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fghrelgrab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fghrelgrab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fghrelgrab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UnitVectorY-Labs","download_url":"https://codeload.github.com/UnitVectorY-Labs/ghrelgrab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fghrelgrab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274997547,"owners_count":25387934,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"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":[],"created_at":"2025-09-13T17:12:12.670Z","updated_at":"2025-09-13T17:12:15.567Z","avatar_url":"https://github.com/UnitVectorY-Labs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub release](https://img.shields.io/github/release/UnitVectorY-Labs/ghrelgrab.svg)](https://github.com/UnitVectorY-Labs/ghrelgrab/releases/latest) [![License](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/licenses/MIT) [![Active](https://img.shields.io/badge/Status-Active-green)](https://guide.unitvectorylabs.com/bestpractices/status/#active) [![Go Report Card](https://goreportcard.com/badge/github.com/UnitVectorY-Labs/ghrelgrab)](https://goreportcard.com/report/github.com/UnitVectorY-Labs/ghrelgrab)\n\n# ghrelgrab\n\nFetches and extracts a specified version of a GitHub release asset from a chosen repository for the current or mapped system architecture.\n\n## Usage\n\n```bash\nghrelgrab \\\n  --repo owner/repo \\\n  --version v1.2.3 \\\n  --file \"asset-{version}-{os}-{arch}.tar.gz\"\n```\n\nSupported flags:\n\n- `--repo` (required): GitHub `owner/repo` (e.g. `owner/repo`)\n- `--version` (required): Release tag (e.g. `v1.2.3`)\n- `--file` (required): Asset filename, supports `{version}`, `{os}`, and `{arch}` tokens\n- `--out`: Output directory (default: current directory)\n- `--os`: Override detected OS for `{os}` substitution (default: current OS)\n- `--os-map`: Remap detected OS before substitution (e.g. `linux=ubuntu,windows=win32`)\n- `--arch`: Override detected architecture for `{arch}` substitution (default: current arch)\n- `--arch-map`: Remap detected arch before substitution (e.g. `amd64=x86_64,arm64=aarch64`)\n- `--token`: GitHub token (defaults to `GH_TOKEN` env) for private assets\n- `--debug`: Enable debug output\n\nThe tool automatically extracts `.tar.gz`, `.tgz`, and `.zip` archives. Other files are saved as-is. Output file paths are printed to stdout.\n\n\nWhile this application can be used as a command line application, one of its uses is as a docker layer for downloading application dependencies.\n\n```\n# Stage 1: fetch the release asset with ghrelgrab \nFROM ghcr.io/unitvectory-labs/ghrelgrab:latest AS fetcher\nWORKDIR /work\n\nRUN [\"/ghrelgrab\",\"--repo\",\"owner/repo\",\"--version\",\"v1.2.3\",\"--file\",\"asset-{version}-{os}-{arch}.tar.gz\",\"--out\",\"/work\",\"--arch-map\",\"x86_64=amd64,aarch64=arm64\",\"--debug\"]\n\n# Stage 2: your runtime\nFROM gcr.io/distroless/base-debian12\n\n# If the tar extracts a file named `asset` at /work,\n# copy it from there. Adjust the path if the archive has a subdir.\nCOPY --from=fetcher /work/asset /usr/local/bin/asset\n\nWORKDIR /app\n\n# the rest goes here...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitvectory-labs%2Fghrelgrab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funitvectory-labs%2Fghrelgrab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitvectory-labs%2Fghrelgrab/lists"}