https://github.com/wojciech-kulik/XcodeProjectCLI
A lightweight command-line tool for managing Xcode projects, built entirely in Swift. Also available as a Swift Package.
https://github.com/wojciech-kulik/XcodeProjectCLI
cli swift xcode xcodeproj
Last synced: 1 day ago
JSON representation
A lightweight command-line tool for managing Xcode projects, built entirely in Swift. Also available as a Swift Package.
- Host: GitHub
- URL: https://github.com/wojciech-kulik/XcodeProjectCLI
- Owner: wojciech-kulik
- License: mit
- Created: 2025-10-28T18:08:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-05-19T10:35:57.000Z (about 2 months ago)
- Last Synced: 2026-06-08T10:29:07.849Z (27 days ago)
- Topics: cli, swift, xcode, xcodeproj
- Language: Swift
- Homepage:
- Size: 673 KB
- Stars: 149
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Notice: NOTICE.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
[](https://formulae.brew.sh/formula/xcp)
[](https://github.com/wojciech-kulik/XcodeProjectCLI/releases)
[](#)
[](https://github.com/wojciech-kulik/XcodeProjectCLI/actions/workflows/build-and-test.yml)
[](https://codecov.io/gh/wojciech-kulik/XcodeProjectCLI)
# XcodeProjectCLI
A fast, lightweight command-line tool for managing Xcode projects, built entirely in Swift.
Easily integrate it into your development workflow or automate complex refactoring tasks with just a few commands.
💚 Powered by the excellent [XcodeProj](https://github.com/tuist/XcodeProj) library from [Tuist](https://github.com/tuist).
## 🚀 Features
```
OVERVIEW: XcodeProjectCLI
USAGE: xcp
OPTIONS:
--version Show the version.
-h, --help Show help information.
TARGET SUBCOMMANDS:
list-targets List project targets.
set-target Set target for existing file.
GROUP SUBCOMMANDS:
add-group Add group.
delete-group Delete group.
move-group Move group.
rename-group Rename group.
FILE SUBCOMMANDS:
add-file Add file to specified targets.
delete-file Delete file.
move-file Move file.
rename-file Rename file.
BUILD SETTINGS SUBCOMMANDS:
get-build-setting Get build setting.
set-build-setting Set build setting.
ASSETS SUBCOMMANDS:
add-image-asset Add image asset.
add-data-asset Add data asset.
add-color-asset Add color asset.
list-assets List all assets.
move-asset Move asset.
delete-asset Delete asset.
See 'xcp help ' for detailed help.
```
## 📦 Installation
```bash
brew install xcp
```
## 🛠️ Building from Source
1. Clone the repository.
2. Navigate to the project directory.
3. Build the project and install:
```bash
make install
```
4. Verify the installation:
```bash
xcp --version
```
## ⚙️ Use as a Library
You can also use XcodeProjectCLI as a library in your macOS Swift projects, enabling you to create your own automations.
Here's a simple example of how to integrate it:
```swift
import XcodeProject
let projectPath = "/path/to/YourProject.xcodeproj"
let xcodeProject = try Project(xcodeProjectPath: projectPath)
// Sample operation:
try project.groups.addGroup("path/relative/to/xcodeproj/NewGroup".asInputPath)
try project.save()
```
## 🤓 My Other Projects
- [Snippety](https://snippety.app) - Snippets manager for macOS & iOS
- [FlashSpace](https://github.com/wojciech-kulik/FlashSpace) - Fast virtual workspace manager for macOS
- [Smog Poland](https://smog-polska.pl) - Air quality monitoring app for Poland
- [xcodebuild.nvim](https://github.com/wojciech-kulik/xcodebuild.nvim) - Neovim plugin for building Xcode projects
[xcodebuild.nvim]: https://github.com/wojciech-kulik/xcodebuild.nvim