# 使用 Homebrew, apt, scoop, winget 安装 swift

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

## 安装

```sh
sudo av install brew:swift
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install swift
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install python3-swift
```

  证据: Debian stable package indexes: python3-swift from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

### Windows

- Scoop (92%):

```sh
scoop install main/swift
```

  证据: Scoop official bucket manifest trees: bucket/swift.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Swift.Toolchain -e
```

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

## 软件包事实

- **软件包键:** brew:swift
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/swift>
- **版本:** 6.3.2
- **来源摘要:** High-performance system programming language
- **主页:** <https://www.swift.org>
- **仓库:** <https://github.com/swiftlang/swift>
- **上游文档:** <https://docs.swift.org/swift-book/documentation/the-swift-programming-language>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/swiftlang/swift/archive/refs/tags/swift-6.3.2-RELEASE.tar.gz>
- **最后更新:** 2026-06-28T04:23:36Z
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- sourcekit-lsp (cli)
- sourcekitd-repl (cli)
- swift (cli)
- swift-api-checker.py (cli)
- swift-api-digester (cli)
- swift-api-dump.py (cli)
- swift-ast-script (cli)
- swift-autolink-extract (cli)
- swift-build (cli)
- swift-build-sdk-interfaces (cli)
- swift-build-tool (cli)
- swift-cache-tool (cli)
- swift-compatibility-symbols (cli)
- swift-def-to-strings-converter (cli)
- swift-demangle (cli)
- swift-driver (cli)
- swift-experimental-sdk (cli)
- swift-frontend (cli)
- swift-help (cli)
- swift-legacy-driver (cli)
- swift-package (cli)
- swift-package-collection (cli)
- swift-package-registry (cli)
- swift-plugin-server (cli)
- swift-reflection-dump (cli)
- swift-run (cli)
- swift-scan-test (cli)
- swift-sdk (cli)
- swift-serialize-diagnostics (cli)
- swift-symbolgraph-extract (cli)
- swift-synthesize-interface (cli)
- swift-test (cli)
- swiftc (cli)
- swiftc-legacy-driver (cli)
- sourcekit-lsp (别名)
- sourcekitd-repl (别名)
- swift (别名)
- swift-api-checker.py (别名)
- swift-api-digester (别名)
- swift-api-dump.py (别名)
- swift-ast-script (别名)
- swift-autolink-extract (别名)
- swift-build (别名)
- swift-build-sdk-interfaces (别名)
- swift-build-tool (别名)
- swift-cache-tool (别名)
- swift-compatibility-symbols (别名)
- swift-def-to-strings-converter (别名)
- swift-demangle (别名)
- swift-driver (别名)
- swift-experimental-sdk (别名)
- swift-frontend (别名)
- swift-help (别名)
- swift-legacy-driver (别名)
- swift-package (别名)
- swift-package-collection (别名)
- swift-package-registry (别名)
- swift-plugin-server (别名)
- swift-reflection-dump (别名)
- swift-run (别名)
- swift-scan-test (别名)
- swift-sdk (别名)
- swift-serialize-diagnostics (别名)
- swift-symbolgraph-extract (别名)
- swift-synthesize-interface (别名)
- swift-test (别名)
- swiftc (别名)
- swiftc-legacy-driver (别名)

## 依赖

- python@3.14
- zstd

## 构建依赖

- cmake
- ninja

## macOS 提供的库

- curl
- libedit
- libxml2
- ncurses
- sqlite

## 安装行为

- post-install 钩子: 未定义
- 注意事项: An Xcode toolchain has been installed to: $HOMEBREW_PREFIX/opt/swift/Swift-6.3.xctoolchain This can be symlinked for use within Xcode: ln -s $HOMEBREW_PREFIX/opt/swift/Swift-6.3.xctoolchain ~/Library/Developer/Toolchains/Swift-6.3.xctoolchain
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 6.3.2
- 管理器更新时间: 2026-06-28
- 本地数据: OK
- 上游仓库: https://github.com/swiftlang/swift
- 检测到的最新版本: swift-6.3.2-RELEASE (当前)
## 项目历史与用法

Swift is an open-source, general-purpose programming language and toolchain centered on a compiler, standard library, package manager, debugger, and associated developer tools.

### 项目历史

Swift.org says Swift was published as open source on December 3, 2015, together with supporting libraries, debugger, and package manager, under the Apache 2.0 license with a Runtime Library Exception. The current swiftlang/swift GitHub repository is the main source repository for the Swift programming language.

### 采用历史

Swift began with Apple-platform development but Swift.org documents open-source builds for macOS, Linux, and Windows. The site emphasizes Swift as suitable for systems programming, apps, and cloud services, and its documentation page treats the package manager, standard library, core libraries, LLDB, and DocC as parts of the public ecosystem.

### 使用方式

Package-manager users interact with Swift through the `swift` toolchain: `swift build`, `swift test`, `swift run`, and package manifests named `Package.swift`. Swift.org describes Swift Package Manager as integrated with the build system to download, compile, and link dependencies into products.

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

Swift is important to package nerds because the language distribution includes its own build and package-management story rather than treating dependency resolution as an external add-on. Homebrew, winget, Scoop, and other package managers distribute toolchains or formulae, while SwiftPM defines the package format used by many of the surrounding Swift CLI tools in this batch.

### 时间线

- 2015-10: Public swiftlang/swift GitHub repository created.
- 2015-12-03: Swift language, libraries, debugger, and package manager published as open source on Swift.org.
- 2019-03-25: Swift 5 released, a major stability milestone documented on Swift.org.
- Current docs: Swift Package Manager manages distribution and use of Swift packages through `Package.swift` manifests.

### Related projects

- Swift.org documents the Swift compiler, standard library, core libraries, Swift Package Manager, LLDB, SourceKit-LSP, DocC, and the Swift book as related pieces of the ecosystem.

### 来源

- <https://api.github.com/repos/swiftlang/swift>
- <https://docs.swift.org/swiftpm/documentation/packagemanagerdocs/>
- <https://formulae.brew.sh/api/formula/swift.json>
- <https://www.swift.org/about/>
- <https://www.swift.org/blog/swift-5-released/>
- <https://www.swift.org/documentation/>


## 安全说明

broad file, network, media, or database tool signal. generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- broad file, network, media, or database tool signal
- generalized runtime or code generation 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: Package.swift
## 源数据库详情

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

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

- Debian apt - python3-swift - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: python3-swift from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - Python 3 libraries | https://github.com/openstack/swift
- Debian apt - swift - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - common files | https://github.com/openstack/swift
- Debian apt - swift-account - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift-account from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - account server | https://github.com/openstack/swift
- Debian apt - swift-container - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift-container from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - container server | https://github.com/openstack/swift
- Debian apt - swift-doc - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - documentation | https://github.com/openstack/swift
- Debian apt - swift-drive-audit - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift-drive-audit from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - drive audit | https://github.com/openstack/swift
- Debian apt - swift-object - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift-object from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - object server | https://github.com/openstack/swift
- Debian apt - swift-object-expirer - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift-object-expirer from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - object-expirer | https://github.com/openstack/swift
- Debian apt - swift-proxy - 2.35.1-0+deb13u1: normalized package name match | Debian stable package indexes: swift-proxy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | distributed virtual object store - proxy server | https://github.com/openstack/swift
- Ubuntu apt - python3-swift - 2.33.0-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-swift from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | distributed virtual object store - Python 3 libraries | https://opendev.org/openstack/swift
- Ubuntu apt - swift - 2.33.0-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: swift from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | distributed virtual object store - common files | https://opendev.org/openstack/swift
- Ubuntu apt - swift-account - 2.33.0-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: swift-account from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | distributed virtual object store - account server | https://opendev.org/openstack/swift
- Ubuntu apt - swift-container - 2.33.0-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: swift-container from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | distributed virtual object store - container server | https://opendev.org/openstack/swift
- Ubuntu apt - swift-doc - 2.33.0-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: swift-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | distributed virtual object store - documentation | https://opendev.org/openstack/swift
- Ubuntu apt - swift-object - 2.33.0-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: swift-object from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | distributed virtual object store - object server | https://opendev.org/openstack/swift
- Ubuntu apt - swift-object-expirer - 2.33.0-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: swift-object-expirer from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | distributed virtual object store - object expirer | https://opendev.org/openstack/swift


## 相关链接

- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/zh-hans/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [python@3.14](https://www.automicvault.com/zh-hans/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/zh-hans/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/zh-hans/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/zh-hans/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [go](https://www.automicvault.com/zh-hans/pkg/brew/go/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language, toolchain.
- [nim](https://www.automicvault.com/zh-hans/pkg/brew/nim/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language, systems-programming.
- [rust](https://www.automicvault.com/zh-hans/pkg/brew/rust/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language, systems-programming.
- [algol68g](https://www.automicvault.com/zh-hans/pkg/brew/algol68g/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [ats2-postiats](https://www.automicvault.com/zh-hans/pkg/brew/ats2-postiats/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [ballerina](https://www.automicvault.com/zh-hans/pkg/brew/ballerina/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [chapel](https://www.automicvault.com/zh-hans/pkg/brew/chapel/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [coconut](https://www.automicvault.com/zh-hans/pkg/brew/coconut/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [hy](https://www.automicvault.com/zh-hans/pkg/brew/hy/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, programming.

## Combined YAML source

View the package source record on GitHub. [combined/swift.yml](https://github.com/automic-vault/db/blob/main/combined/swift.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
