# 使用 Homebrew 安装 snapcraft

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

## 安装

```sh
sudo av install brew:snapcraft
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install snapcraft
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:snapcraft
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/snapcraft>
- **版本:** 9.0.1
- **来源摘要:** Package any app for every Linux desktop, server, cloud or device
- **主页:** <https://snapcraft.io/>
- **仓库:** <https://github.com/canonical/snapcraft>
- **上游文档:** <https://snapcraft.io/>
- **许可证:** GPL-3.0-only
- **源码归档:** <https://github.com/canonical/snapcraft.git>
- **最后更新:** 2026-07-22T01:16:56Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- snapcraft (cli)
- snapcraftctl-compat (cli)
- snapcraft (别名)
- snapcraftctl-compat (别名)

## 依赖

- certifi
- cryptography
- libsodium
- libyaml
- lxc
- pydantic
- pygit2
- python@3.14
- snap
- xdelta

## macOS 提供的库

- libffi
- libxml2
- libxslt

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 9.0.1
- 管理器更新时间: 2026-07-22
- 本地数据: OK
- 上游仓库: https://github.com/canonical/snapcraft
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

Snapcraft is Canonical's command-line build tool for packaging and distributing applications as snaps. It centers on a project file named snapcraft.yaml and the Snap Store publishing workflow.

### 项目历史

The public Snapcraft repository was created in 2015. Its README describes Snapcraft as a command-line build tool that packages software into the snap container format and can register and upload revisions to the Snap Store.

### 采用历史

Snapcraft's adoption is tied to the Snap ecosystem: it is the build-side tool for developers producing snaps for Linux distributions, servers, cloud images, desktops, and IoT devices. The supplied package facts include a Homebrew formula, while the official README says Snapcraft itself is distributed as a snap and also through traditional package repositories.

### 使用方式

Developers run snapcraft init to create snapcraft.yaml, define build and runtime details in that project file, then use snapcraft pack, register, and upload for packaging and store publication.

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

Snapcraft matters to package nerds because it is both a package in package managers and a package-producing tool. It exposes the tradeoffs of self-contained app bundles, store revisions, cross-distribution Linux packaging, and project metadata in a single YAML file.

### 时间线

- 2015: Public GitHub repository created.
- 2015-2025: Official README copyright range identifies Canonical stewardship.
- 2026: Official documentation remains published at documentation.ubuntu.com.

### Related projects

- The official README connects Snapcraft to snap packages, the Snap Store, snapcraft.io, Ubuntu documentation, and Canonical's broader open documentation work.

### 来源

- <https://api.github.com/repos/canonical/snapcraft>
- <https://documentation.ubuntu.com/snapcraft/latest/>
- <https://documentation.ubuntu.com/snapcraft/latest/reference/snapcraft-yaml/>
- <https://github.com/canonical/snapcraft#readme>
- source_facts.package-manager


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: <project>/snapcraft.yaml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** snapcraft
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## 相关链接

- [Package publisher tools](https://pkg.so/zh-hans/package-publishers/) - Belongs to a package publishing or registry command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [snap](https://pkg.so/zh-hans/brew/snap/) - Runtime dependency declared by Homebrew.
- [create-dmg](https://pkg.so/zh-hans/brew/create-dmg/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [pyinstaller](https://pkg.so/zh-hans/brew/pyinstaller/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [melange](https://pkg.so/zh-hans/brew/melange/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [python-build](https://pkg.so/zh-hans/brew/python-build/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [nfpm](https://pkg.so/zh-hans/brew/nfpm/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [msitools](https://pkg.so/zh-hans/brew/msitools/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [cargo-bundle](https://pkg.so/zh-hans/brew/cargo-bundle/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [makepkg](https://pkg.so/zh-hans/brew/makepkg/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [charmcraft](https://pkg.so/zh-hans/brew/charmcraft/) - Both packages touch the same language runtime or ecosystem. Shared terms: build, certifi, cli, cryptography, developer.
- [auditwheel](https://pkg.so/zh-hans/brew/auditwheel/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, linux, packaging.
- [charm-tools](https://pkg.so/zh-hans/brew/charm-tools/) - Both packages touch the same language runtime or ecosystem. Shared terms: build, certifi, cli, cloud, cryptography.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
