# 使用 Homebrew, apk, MacPorts, Nix, winget 安装 fetch

查看 fetch 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:fetch
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install fetch
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install fetch
```

  证据: MacPorts ports tree: net/fetch/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add fetch
```

  证据: Alpine Linux edge package indexes: fetch from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#fetch
```

  证据: nixpkgs package indexes: pkgs/by-name/fe/fetch/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- winget (92%):

```sh
winget install --id MattWhitwam.Fetch -e
```

  证据: Windows Package Manager source index: MattWhitwam.Fetch from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:fetch
- **软件包管理器:** Homebrew
- **版本:** 0.4.8
- **来源摘要:** Download assets from a commit, branch, or tag of GitHub repositories
- **主页:** <https://www.gruntwork.io/>
- **仓库:** <https://github.com/gruntwork-io/fetch>
- **最后更新:** 2026-07-26T11:37:56+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- fetch (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.4.8
## 项目历史与用法

Gruntwork's fetch is a release-asset and repository-content downloader for GitHub and GitLab repositories. It exists to turn a versioned repository reference into an installable file, directory, or binary asset with less shell scripting around API calls and authentication.

### 项目历史

The README explains the tool's origin in Gruntwork's need to publish scripts and binaries that clients could install at a specific version. The public repository was created in 2016, and the tool grew around the practical cases that were awkward with a bare curl or wget command: private repositories, JSON API responses, release assets, authentication, checksums, and semantic-version tag constraints.

### 采用历史

Official installation guidance treats Homebrew packages as third-party convenience packages and recommends GitHub Releases for release binaries. The tool's adoption story is therefore centered on infrastructure teams consuming versioned assets from Git hosting services rather than a large ecosystem of plugins or libraries.

### 使用方式

Common usage is a one-liner such as fetch --repo=... --tag=... --source-path=... /tmp/path. The CLI can select a branch, commit, tag, or tag constraint, download selected paths or release assets, verify SHA256 or SHA512 checksums, and use environment variables such as GITHUB_OAUTH_TOKEN or GITLAB_TOKEN for private repositories.

### 为什么软件包爱好者会关心

fetch is package-manager-adjacent: it is not a package manager, but it solves the same reproducibility itch for teams distributing small tools out of Git releases. Package nerds care because it codifies a common bootstrap pattern without requiring every installer script to hand-roll GitHub or GitLab API plumbing.

### 时间线

- 2016: Public GitHub repository created.
- 2016 onward: README positions fetch around downloading versioned scripts, folders, and release assets from GitHub repositories.
- README status note: GitLab support covers public, private, nested-group, and self-hosted repositories.

### Related projects

- fetch overlaps with curl, wget, GitHub Releases, GitLab releases, and semantic-version tooling, but focuses on authenticated, version-selected repository and release-asset downloads.

### 来源

- <https://github.com/gruntwork-io/fetch>
- <https://raw.githubusercontent.com/gruntwork-io/fetch/master/README.md>
- <https://api.github.com/repos/gruntwork-io/fetch>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 其他软件包管理器记录

- Nix - fetch: normalized package name match | nixpkgs package indexes: pkgs/by-name/fe/fetch/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - fetch - 14.0.0-r0: normalized package name match | Alpine Linux edge package indexes: fetch from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Portable fetch utility from FreeBSD | https://github.com/jrmarino/fetch-freebsd
- apk - fetch-dev - 14.0.0-r0: normalized package name match | Alpine Linux edge package indexes: fetch-dev from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Portable fetch utility from FreeBSD (development files) | https://github.com/jrmarino/fetch-freebsd
- apk - fetch-doc - 14.0.0-r0: normalized package name match | Alpine Linux edge package indexes: fetch-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Portable fetch utility from FreeBSD (documentation) | https://github.com/jrmarino/fetch-freebsd
- apk - libfetch - 14.0.0-r0: normalized package name match | Alpine Linux edge package indexes: libfetch from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Portable fetch utility from FreeBSD (libraries) | https://github.com/jrmarino/fetch-freebsd
- MacPorts - fetch: normalized package name match | MacPorts ports tree: net/fetch/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - MattWhitwam.Fetch: normalized package name match | Windows Package Manager source index: MattWhitwam.Fetch from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/fetch.yml](https://github.com/mxcl/pkgdb/blob/main/combined/fetch.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
