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 library from Tuist.
OVERVIEW: XcodeProjectCLI
USAGE: xcp <subcommand>
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 <subcommand>' for detailed help.
brew install wojciech-kulik/tap/xcp-
Clone the repository.
-
Navigate to the project directory.
-
Build the project and install:
make install
-
Verify the installation:
xcp --version
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:
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()- Snippety - Snippets manager for macOS & iOS
- FlashSpace - Fast virtual workspace manager for macOS
- Smog Poland - Air quality monitoring app for Poland
- xcodebuild.nvim - Neovim plugin for building Xcode projects