# 使用 Homebrew, MacPorts 安装 cask

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

## 安装

```sh
sudo av install brew:cask
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cask
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cask
```

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

## 软件包事实

- **软件包键:** brew:cask
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cask>
- **版本:** 0.9.1
- **来源摘要:** Emacs dependency management
- **主页:** <https://cask.readthedocs.io/>
- **仓库:** <https://github.com/cask/cask>
- **上游文档:** <https://cask.readthedocs.io/>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://github.com/cask/cask/archive/refs/tags/v0.9.1.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cask (cli)
- cask (别名)

## 依赖

- coreutils
- emacs

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.9.1
- 本地数据: OK
- 上游仓库: https://github.com/cask/cask
- 检测到的最新版本: v0.9.1 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

Cask is an Emacs Lisp project-management and dependency tool centered on a project-local `Cask` file. It helped Emacs package authors declare dependencies, run commands in an isolated package environment, and build packages from the command line.

### 项目历史

The public repository was created in 2012 and later moved under the cask GitHub organization. Official documentation describes Cask as dependency management for Emacs and documents a small domain-specific language for package metadata and dependencies.

### 采用历史

Cask became part of the Emacs package-author toolchain during the period when package.el, MELPA, and CI workflows were becoming common. Its presence in Homebrew and MacPorts made it easy for package maintainers to install the same command-line tool used in project automation.

Homebrew analytics show continued use despite the project's age, with 27,894 stable installs in the last 365 days in the formula API.

### 使用方式

A project declares dependencies in a file named `Cask`; users then run commands such as `cask install`, `cask exec`, `cask emacs`, `cask build`, and `cask package`. The DSL reference covers package metadata and dependency declarations.

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

Cask matters to package nerds because it brought Bundler-style dependency declarations and repeatable command execution to Emacs Lisp projects, making Emacs packages easier to test and publish from CI and shell scripts.

### 时间线

- 2012: Public GitHub repository created.
- 2010s: Cask documented as an Emacs dependency-management CLI with a project-local DSL.
- 2026: Homebrew packages v0.9.1 and reports continuing install activity.

### Related projects

- Emacs package.el and MELPA are the broader package ecosystem that Cask projects usually target.
- Homebrew and MacPorts distribute the Cask command-line tool on macOS.

### 来源

- <https://api.github.com/repos/cask/cask>
- <https://github.com/cask/cask>
- <https://cask.readthedocs.io/>
- <https://cask.readthedocs.io/en/latest>
- <https://formulae.brew.sh/api/formula/cask.json>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## 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: Cask
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cask
- **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

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

- MacPorts - cask: normalized package name match | MacPorts ports tree: devel/cask/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [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.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [coreutils](https://pkg.so/zh-hans/brew/coreutils/) - Runtime dependency declared by Homebrew.
- [emacs](https://pkg.so/zh-hans/brew/emacs/) - Runtime dependency declared by Homebrew.
- [corral](https://pkg.so/zh-hans/brew/corral/) - Shares pkgdb curated category or tags: cli, dependency-manager, developer-tools, package-management.
- [pipx](https://pkg.so/zh-hans/brew/pipx/) - Shares pkgdb curated category or tags: cli, developer-tools, package-management.
- [mint](https://pkg.so/zh-hans/brew/mint/) - Shares pkgdb curated category or tags: cli, dependency-manager, developer-tools, package-management.
- [composer](https://pkg.so/zh-hans/brew/composer/) - Shares pkgdb curated category or tags: cli, dependency-manager, developer-tools, package-management.
- [conan](https://pkg.so/zh-hans/brew/conan/) - Shares pkgdb curated category or tags: cli, dependency-manager, developer-tools, package-management.
- [rpm](https://pkg.so/zh-hans/brew/rpm/) - Shares pkgdb curated category or tags: cli, developer-tools, package-management.
- [libsolv](https://pkg.so/zh-hans/brew/libsolv/) - Shares pkgdb curated category or tags: cli, developer-tools, package-management.
- [ocicl](https://pkg.so/zh-hans/brew/ocicl/) - Shares pkgdb curated category or tags: cli, developer-tools, package-management.

## Combined YAML source

View the package source record on GitHub. [combined/cask.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cask.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
- external package-manager database matches
- cross-ecosystem install command graph
