# 使用 Homebrew, Nix 安装 xcp

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

## 安装

```sh
sudo av install brew:xcp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install xcp
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#xcp
```

  证据: nixpkgs package indexes: pkgs/by-name/xc/xcp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:xcp
- **软件包管理器:** Homebrew
- **版本:** 1.2.1
- **来源摘要:** Fast & lightweight command-line tool for managing Xcode projects, built in Swift
- **主页:** <https://github.com/wojciech-kulik/XcodeProjectCLI>
- **仓库:** <https://github.com/wojciech-kulik/XcodeProjectCLI>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- xcp (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

XcodeProjectCLI, installed as xcp, is a Swift command-line and library wrapper for making targeted edits to Xcode project files. It focuses on direct project maintenance tasks such as listing targets, moving groups and files, changing build settings, and managing asset catalog entries.

### 项目历史

The GitHub repository was created on 2025-10-28, with the first public release, v0.9.1, published on 2025-10-30 and v1.0.0 following on 2025-11-14. The README describes the project as a fast, lightweight CLI for managing Xcode projects, built entirely in Swift and powered by Tuist's XcodeProj library.

The author announced the tool on the Swift Forums in November 2025, explaining that it was initially built for the xcodebuild.nvim Neovim plugin but could be used generally to automate Xcode project-file work. The v1.0.0 release added support for relative .xcodeproj paths and build-setting get/set commands, moving the tool from basic structure manipulation toward broader project automation.

### 采用历史

Because xcp is newer and narrower than XcodeGen or xcodes, its adoption history is still early. Its visible niche is automation around existing .xcodeproj files, especially editor and scripting workflows where opening Xcode just to add a file, move a group, or tweak a build setting is unnecessary.

### 使用方式

Typical CLI usage calls xcp with subcommands for targets, groups, files, build settings, and assets. The same code can also be used as a Swift library, allowing macOS automation tools to open a project, manipulate groups or files, and save the pbxproj programmatically.

Compared with generators, xcp does not replace the .xcodeproj with a declarative spec. Its niche is smaller: script one operation against an existing project file, which is useful for editor integrations, refactoring scripts, and generated-file workflows.

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

xcp is significant as a small composable Unix-style tool for an otherwise GUI-heavy file format. For package catalogues it sits between low-level pbxproj libraries and high-level project generators: one executable, a focused command set, and an automation-friendly Swift library underneath.

### 时间线

- 2025-10-28: Repository created on GitHub.
- 2025-10-30: v0.9.1 first public release.
- 2025-11-14: v1.0.0 release added relative project paths and build-setting commands.
- 2025-11-19: Author presented XcodeProjectCLI in the Swift Forums Community Showcase.
- 2025-11-22: v1.2.1 release published.

### Related projects

- XcodeProj from Tuist is the underlying library named by the README as the foundation for XcodeProjectCLI.
- xcodebuild.nvim is related because the author said xcp was initially built for that Neovim-based iOS/macOS development workflow.

### 来源

- <https://forums.swift.org/t/xcodeprojectcli-lightweight-cli-tool-for-managing-xcode-projects/83311>
- <https://github.com/tuist/XcodeProj>
- <https://github.com/wojciech-kulik/XcodeProjectCLI>
- <https://github.com/wojciech-kulik/XcodeProjectCLI/releases>
- <https://github.com/wojciech-kulik/xcodebuild.nvim>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - xcp: normalized package name match | nixpkgs package indexes: pkgs/by-name/xc/xcp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/xcp.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xcp.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
