{"id":14069283,"url":"https://github.com/devmatteini/dra","last_synced_at":"2026-01-02T18:17:08.296Z","repository":{"id":36953187,"uuid":"434774009","full_name":"devmatteini/dra","owner":"devmatteini","description":"A command line tool to download release assets from GitHub","archived":false,"fork":false,"pushed_at":"2025-07-19T14:59:11.000Z","size":2790,"stargazers_count":267,"open_issues_count":6,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-27T00:50:44.860Z","etag":null,"topics":["automation","cli","command-line","github-releases","release-assets","releases","rust","rust-lang","tool"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/devmatteini.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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-12-04T00:56:57.000Z","updated_at":"2025-07-25T04:29:47.000Z","dependencies_parsed_at":"2023-02-19T07:31:26.255Z","dependency_job_id":"2a0d9417-22bf-45f5-86bd-edb786792750","html_url":"https://github.com/devmatteini/dra","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/devmatteini/dra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fdra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fdra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fdra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fdra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devmatteini","download_url":"https://codeload.github.com/devmatteini/dra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fdra/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267815187,"owners_count":24148356,"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-07-30T02:00:09.044Z","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":["automation","cli","command-line","github-releases","release-assets","releases","rust","rust-lang","tool"],"created_at":"2024-08-13T07:06:48.260Z","updated_at":"2025-12-30T00:12:59.855Z","avatar_url":"https://github.com/devmatteini.png","language":"Rust","readme":"# DRA - Download Release Assets from GitHub\n\n[![CI](https://github.com/devmatteini/dra/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/devmatteini/dra/actions/workflows/ci.yml)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/devmatteini/dra)\n\nA command line tool to download release assets from GitHub.\n\n[Why should I use dra?](#why-should-i-use-dra) •\n[Installation](#installation) •\n[Usage](#usage) •\n[Contributing](#contributing) •\n[License](#license)\n\n![dra demo](./assets/demo.gif)\n\n## Why should I use dra?\n\nYou can do everything `dra` does with the official [GitHub cli](https://cli.github.com/).\n\n`dra` helps you download release assets more easily:\n\n- No authentication for public repository (you cannot use `gh` without authentication)\n- [Built-in generation of pattern](#non-interactive-download) to select an asset to download\n  (with `gh` you need to provide [glob pattern](https://cli.github.com/manual/gh_release_download) that you need to\n  create manually).\n- [Automatically select and download](#automatic) an asset based on your operating system and architecture\n- [Download and install assets](#install-assets), with support for the most common formats (e.g. tar/zip archives,\n  deb/rpm packages...)\n\n## Installation\n\n`dra` is available on Linux (x86_64, armv6, arm64), macOS (x86_64, arm64) and Windows.\n\n### Prebuilt binaries\n\nDownload the prebuilt versions of `dra` for all supported platforms from\nthe [latest release](https://github.com/devmatteini/dra/releases/latest).\n\nYou can use this `bash` script to automatically download the latest release across all supported platforms.\nReplace `\u003cDESTINATION\u003e` with the path where you want to place dra (e.g `~/.local/bin`).\nIf you omit `--to` option, the default value is the current working directory.\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/devmatteini/dra/refs/heads/main/install.sh | bash -s -- --to \u003cDESTINATION\u003e\n```\n\n### Debian-based distributions\n\nDownload the latest `.deb` package from the [release page](https://github.com/devmatteini/dra/releases/latest) and\ninstall it via:\n\n```shell\nsudo dpkg -i dra_x.y.z_amd64.deb # adapt version number\n```\n\n### Arch Linux\n\n`dra` can be installed from the [community repository](https://archlinux.org/packages/extra/x86_64/dra/):\n\n```shell\npacman -S dra\n```\n\n### macOS/Linux with Homebrew\n\n`dra` can be installed from [Homebrew](https://formulae.brew.sh/formula/dra#default):\n\n```shell\nbrew install dra\n```\n\n### From source\n\n```shell\ngit clone https://github.com/devmatteini/dra \u0026\u0026 cd dra\nmake release\n./target/release/dra --version\n```\n\n### Update dra\n\nThe method to update `dra` depends on how you initially installed it.\n\n**If you used a package manager** (e.g [Homebrew](#macoslinux-with-homebrew) or [pacman](#arch-linux)), use the\ncorresponding package manager commands to update `dra`.\n\n**If you downloaded a prebuilt binary** from GitHub Releases, you have two options:\n\n#### Option 1: Use dra to update itself\n\n- Linux (_Note that you can't replace a binary while it's executing_)\n  ```shell\n  dra download -a -i -o dra-new devmatteini/dra \u0026\u0026 mv dra-new /path/to/dra\n  ```\n- macOS\n  ```shell\n  dra download -a -i -o /path/to/dra devmatteini/dra\n  ```\n- Windows (_Note that you can't replace a binary while it's executing_)\n  ```shell\n  dra download -a -i -o dra-new.exe devmatteini/dra \u0026\u0026 mv dra-new.exe /path/to/dra.exe\n  ```\n\n#### Option 2: Use the automated bash script\n\nFollow the installation instructions on how to use the [automated bash script](#prebuilt-binaries)\n\n## Usage\n\n- [Download assets with interactive mode](#interactive-download)\n- [Download assets with non-interactive mode](#non-interactive-download)\n- [Download options](#download-options)\n- [Install assets](#install-assets)\n- [Authentication](#authentication)\n- [Shell completion](#shell-completion)\n- [Examples](#examples)\n\n### Interactive download\n\nManually select and download an asset from a repository\n\n```shell\ndra download devmatteini/dra-tests\n```\n\n### Non-Interactive download\n\nThis mode is useful to be used in automated scripts.\n\nThere are two modes to download assets: [automatic](#automatic) and [selection](#selection).\n\n#### Automatic\n\nAutomatically select and download an asset based on your operating system and architecture\n\n```shell\n# you can use -a or --automatic\ndra download -a devmatteini/dra-tests\n```\n\n\u003e [!IMPORTANT]\n\u003e Since there is no naming convention for release assets,\n\u003e be aware that this mode may fail if no asset matches your system based on `dra` rules for recognizing an asset.\n\n#### Selection\n\nSelect and download the first asset that matches a given pattern\n\n```shell\ndra download --select \u003cPATTERN\u003e devmatteini/dra-tests\n```\n\nYou can pass one of the following patterns:\n\n##### Literal\n\nThe exact name of the asset.\n\n```shell\ndra download --select helloworld.tar.gz devmatteini/dra-tests\n```\n\n##### Untagged\n\nA version-free pattern of your asset. Most of the time, this is the pattern you will use.\n\nIt's useful when release assets contain the release tag in their name, and you want a stable pattern to download across\ndifferent releases.\n\nFirst, you need to generate an untagged asset name:\n\n```shell\ndra untag devmatteini/dra-tests\n# Output: helloworld_{tag}.tar.gz\n```\n\nCopy the output and run:\n\n```shell\ndra download --select \"helloworld_{tag}.tar.gz\" devmatteini/dra-tests\n```\n\n##### Wildcard\n\nA [wildcard pattern](https://en.wikipedia.org/wiki/Matching_wildcards), using `*` and/or `?` special characters.\n\nIt's useful when release assets contain sections that change for each release (e.g. a build number or timestamp).\n\n```shell\ndra download --select 'helloworld*_amd64.deb' devmatteini/dra-tests\n```\n\n### Download options\n\nAll `dra-download` options works with both interactive and non-interactive modes.\n\nSelect and download an asset to custom path\n\n```shell\ndra download --output /tmp/dra-example devmatteini/dra-tests\n\n# or save to custom directory path\ndra download --output ~/Downloads devmatteini/dra-tests\n```\n\nSelect and download an asset from a specific release\n\n```shell\ndra download --tag 0.1.1 devmatteini/dra-tests\n```\n\nSelect and download source code archives\n\n```shell\ndra download devmatteini/dra-tests\nRelease tag is 0.1.5\n? Pick the asset to download ›\n  helloworld_0.1.5.tar.gz\n❯ Source code (tar.gz)\n  Source code (zip)\n```\n\n### Install assets\n\nDownload and install an asset (on both interactive and non-interactive modes)\n\n```shell\ndra download --install devmatteini/dra-tests\n```\n\nSupported assets that can be installed are:\n\n- Debian packages (requires elevated privileges)\n- RPM packages (requires elevated privileges)\n- Tar archives with executable(s)\n- Zip files with executable(s)\n- 7-Zip files with executable(s) (requires `7z` cli to be installed and in your `PATH`)\n- Compressed executable files\n- Executable files\n- AppImage files\n\nYou can use `-I/--install-file \u003cINSTALL_FILE\u003e` option when a tar/zip archive contains many executables or\nwhen `dra` can't automatically detect which one to install:\n\n```shell\ndra download -s helloworld-many-executables-unix.tar.gz -I helloworld-v2 devmatteini/dra-tests\n```\n\nYou can also specify this option multiple times to install multiples executables\n\n```shell\ndra download -s helloworld-many-executables-unix.tar.gz -I helloworld-v2 -I random-script devmatteini/dra-tests\n```\n\n### Authentication\n\nIn order to download assets from private repositories and avoid rate limit\nissues ([60 requests per hour](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#primary-rate-limit-for-unauthenticated-users)\nis the default for unauthenticated users), `dra` must make authenticated requests to GitHub.\n\nYou can create\na [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)\nand then export one of the following environment variables:\n\n1. `DRA_GITHUB_TOKEN`\n2. `GITHUB_TOKEN`\n3. `GH_TOKEN`\n\nIf none of the above environment variables are set,\nthe [GitHub cli token](https://cli.github.com/manual/gh_auth_token) (if available) will be used as default value.\nYou need to install [GitHub cli](https://cli.github.com/) and then run `gh auth login`.\n\n#### Disable authentication\n\nIf you would like to disable GitHub authentication, you can export the environment variable\n`DRA_DISABLE_GITHUB_AUTHENTICATION=true`\n\n### Shell completion\n\nGenerate shell completion\n\n```shell\ndra completion bash \u003e dra-completion\nsource dra-completion\n```\n\nSee all supported shell with `dra completion -h`\n\n### Examples\n\nInstall an executable from a tar archive\n\n```shell\ndra download -s helloworld.tar.gz -i devmatteini/dra-tests\n./helloworld\n```\n\nInstall and move the executable to a custom directory\n\n```shell\ndra download -a -i -o ~/.local/bin/ devmatteini/dra-tests\n~/.local/bin/helloworld\n```\n\nInstall an executable file\n\n```shell\ndra download -s helloworld-unix -i devmatteini/dra-tests\n./helloworld-unix\n```\n\nInstall an executable from a compressed file\n\n```shell\ndra download -s helloworld-compressed-unix.bz2 -i devmatteini/dra-tests\n./helloworld-compressed-unix\n```\n\nInstall and rename the executable (useful when downloading an executable or compressed file)\n\n```shell\ndra download -s helloworld-unix -i -o helloworld devmatteini/dra-tests\n./helloworld\n```\n\nInstall a specific executable when many are available\n\n```shell\ndra download -s helloworld-many-executables-unix.tar.gz -I helloworld-v2 devmatteini/dra-tests\n./helloworld-v2\n```\n\nInstall multiple executables from a tar/zip archive\n\n```shell\ndra download -s helloworld-many-executables-unix.tar.gz -I helloworld-v2 -I random-script devmatteini/dra-tests\n./helloworld-v2\n./random-script\n```\n\n---\n\nFor more information on args/flags/options/commands run:\n\n```shell\ndra --help\ndra \u003ccommand\u003e --help\n```\n\n## Contributing\n\nTake a look at the [CONTRIBUTING.md](CONTRIBUTING.md) guidelines.\n\n### Found a Bug?\n\nIf you find a bug in the source code, you can help us\nby [submitting an issue](https://github.com/devmatteini/dra/issues/new) to our GitHub Repository. Even\nbetter, you can submit a Pull Request with a fix.\n\n### Missing a Feature?\n\nYou can request a new feature\nby [submitting a discussion](https://github.com/devmatteini/dra/discussions/new/choose) to\nour GitHub Repository.\nIf you would like to implement a new feature, please consider the size of the change and reach out to\nbetter coordinate our efforts and prevent duplication of work.\n\n## License\n\n`dra` is made available under the terms of the MIT License.\n\nSee the [LICENSE](LICENSE) file for license details.\n","funding_links":[],"categories":["Rust","rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmatteini%2Fdra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevmatteini%2Fdra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmatteini%2Fdra/lists"}