# 使用 Homebrew, MacPorts 安装 sourcekitten

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

## 安装

```sh
sudo av install brew:sourcekitten
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sourcekitten
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install SourceKitten
```

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

## 软件包事实

- **软件包键:** brew:sourcekitten
- **软件包管理器:** Homebrew
- **版本:** 0.38.0
- **来源摘要:** Framework and command-line tool for interacting with SourceKit
- **主页:** <https://github.com/jpsim/SourceKitten>
- **仓库:** <https://github.com/jpsim/SourceKitten>
- **最后更新:** 2026-07-26T22:32:47Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- sourcekitten (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

SourceKitten is a Swift framework and command-line tool for interacting with Apple's SourceKit service, exposing source structure, syntax, completion, indexing, module information, and documentation extraction as JSON-friendly CLI subcommands.

### 项目历史

The GitHub repository was created in August 2014. The README describes SourceKitten as a framework and CLI that links to `sourcekitd.framework` to parse Swift ASTs, extract comment docs for Swift or Objective-C projects, get Swift syntax data, and issue raw SourceKit requests.

The changelog shows continuous tracking of Swift and Xcode evolution: Swift 3-era API changes, Swift 4 and Swift 5 requirements, SwiftPM and Xcode documentation support, Bazel support, and syntax/declaration kind updates through Swift 6.

### 采用历史

The README lists many projects built with SourceKitten, including SwiftLint, Jazzy, Sourcery, SourceKittenDaemon, SourceDocs, Cuckoo, IBAnalyzer, and Taylor. That list makes SourceKitten infrastructure for a broad slice of Swift developer tooling.

### 使用方式

The `sourcekitten` CLI provides subcommands including `complete`, `doc`, `format`, `index`, `module-info`, `request`, `structure`, `syntax`, and `version`. It can be installed with Homebrew, Swift Package Manager, Bazel, Make, or a release package.

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

Package nerds care because SourceKitten turns a platform-private compiler service into a packageable Unix-style CLI and library. It is the substrate behind linters, documentation generators, mock generators, editor completion bridges, and other Swift ecosystem tools.

### 时间线

- 2014: SourceKitten repository created.
- 2015: 0.3.0-era public releases were being published.
- 2016: 0.15.0 adapted APIs for Swift 3 and Xcode 8.
- 2019: 0.30.0 required Swift 5.1 or higher.
- 2022: 0.33.0 added Bazel build support and Xcode 14 documentation support.
- 2025: 0.37.0 added Swift 6 compiler and syntax/declaration support.
- 2026: 0.37.3 continued dependency maintenance.

### Related projects

- SwiftLint, Jazzy, Sourcery, SourceDocs, Cuckoo, IBAnalyzer, Taylor, and SourceKittenDaemon are listed by the README as projects built with SourceKitten.
- SourceKit and `sourcekitd.framework` are the Apple tooling components SourceKitten communicates with.

### 来源

- <https://github.com/jpsim/SourceKitten#readme>
- <https://github.com/jpsim/SourceKitten/blob/main/CHANGELOG.md>
- <https://github.com/jpsim/SourceKitten/releases>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- MacPorts - SourceKitten: normalized package name match | MacPorts ports tree: devel/SourceKitten/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/sourcekitten.yml](https://github.com/mxcl/pkgdb/blob/main/combined/sourcekitten.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
