Registry / devops / fetch-github-release

fetch-github-release

JSON →
library1.0.0jsnpmunverified

fetch-github-release (v1.0.0) downloads the correct binary asset from a GitHub release for your current platform. It automates fetching platform-specific binaries from GitHub releases, supporting filtering by filename patterns. Minimal dependencies, Node >=10 required. Use it to avoid manual downloads in CI or build scripts.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM-only since v1.0.0; named export

import { fetchLatestRelease } from 'fetch-github-release'

Named export for fetching a specific version

import { fetchRelease } from 'fetch-github-release'

Default export also available for fetchLatestRelease

import fetchLatestRelease from 'fetch-github-release'

Downloads binary from GitHub releases using owner/repo and a filter function.

import { fetchLatestRelease } from 'fetch-github-release'; import { writeFileSync } from 'fs'; const asset = await fetchLatestRelease({ owner: 'cli', repo: 'cli', filter: (asset) => asset.name.includes('linux-amd64'), // auth: process.env.GITHUB_TOKEN ?? '' }); writeFileSync(asset.name, asset.data); console.log(`Downloaded ${asset.name}`);
Debug
Known footguns
gotchaIf filter is not provided, the first asset is returned, which may not be the correct platform binary.
gotchaRequires Node >=10; will fail on older Node versions with syntax errors.
gotchaGitHub API rate limits apply; unauthenticated requests are limited to 60/hour.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
gptbot
3
ahrefsbot
1
Resources