# 使用 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
- **版本:** 0.9.1
- **来源摘要:** Emacs dependency management
- **主页:** <https://cask.readthedocs.io/>
- **仓库:** <https://github.com/cask/cask>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cask (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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
## 其他软件包管理器记录

- 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


## 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
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
