{"id":17771697,"url":"https://github.com/akoutmos/octo_fetch","last_synced_at":"2025-03-15T16:31:24.040Z","repository":{"id":61062043,"uuid":"547360503","full_name":"akoutmos/octo_fetch","owner":"akoutmos","description":"Download, verify, and extract GitHub release artifacts effortlessly right from Elixir","archived":false,"fork":false,"pushed_at":"2023-11-14T19:22:13.000Z","size":91,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T15:46:30.744Z","etag":null,"topics":["artifact","elixir","elixir-library","github"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/akoutmos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":null},"created_at":"2022-10-07T14:54:51.000Z","updated_at":"2024-02-27T22:01:25.000Z","dependencies_parsed_at":"2023-11-14T19:26:27.585Z","dependency_job_id":"e0bb43a3-bc8b-4f48-a167-a602edd88821","html_url":"https://github.com/akoutmos/octo_fetch","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"82f209a517d8aa5317ce09c3ae608af1e5de0900"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoutmos%2Focto_fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoutmos%2Focto_fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoutmos%2Focto_fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoutmos%2Focto_fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akoutmos","download_url":"https://codeload.github.com/akoutmos/octo_fetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221586405,"owners_count":16847911,"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":["artifact","elixir","elixir-library","github"],"created_at":"2024-10-26T21:35:05.892Z","updated_at":"2025-03-15T16:31:24.010Z","avatar_url":"https://github.com/akoutmos.png","language":"Elixir","readme":"\u003c!--START--\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg align=\"center\" width=\"33%\" src=\"guides/images/logo.svg\" alt=\"OctoFetch Logo\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Download, verify, and extract GitHub release artifacts effortlessly right from Elixir\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hex.pm/packages/octo_fetch\"\u003e\n    \u003cimg alt=\"Hex.pm\" src=\"https://img.shields.io/hexpm/v/octo_fetch?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/akoutmos/octo_fetch/actions\"\u003e\n    \u003cimg alt=\"GitHub Workflow Status (master)\"\n    src=\"https://img.shields.io/github/actions/workflow/status/akoutmos/octo_fetch/main.yml?label=Build%20Status\u0026style=for-the-badge\u0026branch=master\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://coveralls.io/github/akoutmos/octo_fetch?branch=master\"\u003e\n    \u003cimg alt=\"Coveralls master branch\" src=\"https://img.shields.io/coveralls/github/akoutmos/octo_fetch/master?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/sponsors/akoutmos\"\u003e\n    \u003cimg alt=\"Support OctoFetch\" src=\"https://img.shields.io/badge/Support%20the%20project-%E2%9D%A4-lightblue?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\u003c!--END--\u003e\n\n# Contents\n\n- [Installation](#installation)\n- [Supporting OctoFetch](#supporting-octofetch)\n- [Setting Up OctoFetch](#setting-up-octofetch)\n- [Attribution](#attribution)\n\n## Installation\n\n[Available in Hex](https://hex.pm/packages/octo_fetch), the package can be installed by adding\n`octo_fetch` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:octo_fetch, \"~\u003e 0.4.0\"}\n  ]\nend\n```\n\nDocumentation can be found at [https://hexdocs.pm/octo_fetch](https://hexdocs.pm/octo_fetch).\n\n## Supporting OctoFetch\n\nIf you rely on this library, it would much appreciated if you can give back to the project in order to help\nensure its continued development.\n\n### Gold Sponsors\n\n\u003ca href=\"https://github.com/sponsors/akoutmos/sponsorships?sponsor=akoutmos\u0026tier_id=58083\"\u003e\n  \u003cimg align=\"center\" height=\"175\" src=\"guides/images/your_logo_here.png\" alt=\"Support the project\"\u003e\n\u003c/a\u003e\n\n### Silver Sponsors\n\n\u003ca href=\"https://github.com/sponsors/akoutmos/sponsorships?sponsor=akoutmos\u0026tier_id=58082\"\u003e\n  \u003cimg align=\"center\" height=\"150\" src=\"guides/images/your_logo_here.png\" alt=\"Support the project\"\u003e\n\u003c/a\u003e\n\n### Bronze Sponsors\n\n\u003ca href=\"https://github.com/sponsors/akoutmos/sponsorships?sponsor=akoutmos\u0026tier_id=17615\"\u003e\n  \u003cimg align=\"center\" height=\"125\" src=\"guides/images/your_logo_here.png\" alt=\"Support the project\"\u003e\n\u003c/a\u003e\n\n## Setting Up OctoFetch\n\nIf you want to create a downloader utility for a particular GitHub repository, you can use this library\nto take care of all of the boilerplate, validation, and archive extraction. For example, if you want to create\na downloader for Litestream, you can do the following:\n\n```elixir\ndefmodule LiteStream.Downloader do\n  use OctoFetch,\n    latest_version: \"0.3.9\",\n    github_repo: \"benbjohnson/litestream\",\n    download_versions: %{\n      \"0.3.9\" =\u003e [\n        {:darwin, :amd64, \"74599a34dc440c19544f533be2ef14cd4378ec1969b9b4fcfd24158946541869\"},\n        {:linux, :amd64, \"806e1cca4a2a105a36f219a4c212a220569d50a8f13f45f38ebe49e6699ab99f\"},\n        {:linux, :arm64, \"61acea9d960633f6df514972688c47fa26979fbdb5b4e81ebc42f4904394c5c5\"}\n      ],\n      \"0.3.8\" =\u003e [\n        {:darwin, :amd64, \"d359a4edd1cb98f59a1a7c787bbd0ed30c6cc3126b02deb05a0ca501ff94a46a\"},\n        {:linux, :amd64, \"530723d95a51ee180e29b8eba9fee8ddafc80a01cab7965290fb6d6fc31381b3\"},\n        {:linux, :arm64, \"1d6fb542c65b7b8bf91c8859d99f2f48b0b3251cc201341281f8f2c686dd81e2\"}\n      ]\n    }\n\n  # You must implement this function to generate the names of the downloads based on the\n  # user's current running environment\n  @impl true\n  def download_name(version, :darwin, arch), do: \"litestream-v\\#{version}-darwin-\\#{arch}.zip\"\n  def download_name(version, :linux, arch), do: \"litestream-v\\#{version}-linux-\\#{arch}.tar.gz\"\nend\n```\n\nYou would then be able to download the release artifact by doing the following:\n\n```elixir\niex (1) \u003e Litestream.Downloader.download(\".\")\n{:ok, [\"./litestream\"], []}\n```\n\n## Attribution\n\nIt wouldn't be right to not include somewhere in this project a \"thank you\" to the various projects and people that\nhelped make this possible:\n\n- The logo for the project is an edited version of an SVG image from the [unDraw project](https://undraw.co/)\n- The work done in [Phoenix Tailwind](https://github.com/phoenixframework/tailwind) served as a baseline for how to\n  structure this library.\n","funding_links":["https://github.com/sponsors/akoutmos","https://github.com/sponsors/akoutmos/sponsorships?sponsor=akoutmos\u0026tier_id=58083","https://github.com/sponsors/akoutmos/sponsorships?sponsor=akoutmos\u0026tier_id=58082","https://github.com/sponsors/akoutmos/sponsorships?sponsor=akoutmos\u0026tier_id=17615"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakoutmos%2Focto_fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakoutmos%2Focto_fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakoutmos%2Focto_fetch/lists"}