XCFolder is a powerful command-line tool that converts Xcode virtual groups into actual directories, reorganizing your project structure to align with Xcode groups and enabling seamless integration with modern Xcode project generation tools like Tuist and XcodeGen.
84
stars
37
commits
Swift
primary language
Dec 29, 2025
updated
XCFolder is a powerful command-line tool that converts Xcode virtual groups into actual directories(associated folder), reorganizing your project structure to align with Xcode groups and enabling seamless integration with modern Xcode project generation tools like Tuist and XcodeGen.
.yaml and .yml configuration filesgit clone https://github.com/ZhgChgLi/XCFolder.git
./Configuration.yaml:
# Paths to ignore when scanning for source files
ignorePaths:
- "Pods"
- "Frameworks"
- "Products"
# File types to ignore when scanning for source files
ignoreFileTypes:
- "wrapper.framework" # Frameworks
- "wrapper.pb-project" # Xcode project files
#- "wrapper.application" # Applications
#- "wrapper.cfbundle" # Bundles
#- "wrapper.plug-in" # Plug-ins
#- "wrapper.xpc-service" # XPC services
#- "wrapper.xctest" # XCTest bundles
#- "wrapper.app-extension" # App extensions
# Whether to move files only, without changing .xcodeproj settings
moveFileOnly: false
# Use git mv by default instead of filesystem move
gitMove: true
cd ./XCFolder
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml --is-non-interactive-mode
If you want to run XCFolder without checking for uncommitted git changes (useful during development):
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml --skip-safety-check
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml --is-non-interactive-mode --skip-safety-check
swift run XCFolder ./TestProject/DCDeviceTest.xcodeproj ./Configuration.yaml
❌ Error: There are uncommitted changes in the repository)git mv command will be used to move files to ensure the git file log is fully recorded.
LIBRARY_SEARCH_PATHS, to see if manual adjustments are needed..xcodeproj XCode project file, you can directly use XCodeGen or Tuist to regenerate the project files..yaml and .yml file extensions for configuration files--skip-safety-check: Bypass git uncommitted changes check for faster development workflowsThe entire project is written in Swift and runs as an SPM command-line tool.
You can modify the source code by opening Package.swift if needed.
If you find this library helpful, please consider starring the repo or recommending it to your friends.
Feel free to open an issue or submit a fix/contribution via pull request. :)
35 commits
2 commits
Swift
99.3%
XCFolder is a powerful command-line tool that converts Xcode virtual groups into actual directories, reorganizing your project structure to align with Xcode groups and enabling seamless integration with modern Xcode project generation tools like Tuist and XcodeGen.
84
stars
37
commits
Swift
primary language
Dec 29, 2025
updated
XCFolder is a powerful command-line tool that converts Xcode virtual groups into actual directories(associated folder), reorganizing your project structure to align with Xcode groups and enabling seamless integration with modern Xcode project generation tools like Tuist and XcodeGen.
.yaml and .yml configuration filesgit clone https://github.com/ZhgChgLi/XCFolder.git
./Configuration.yaml:
# Paths to ignore when scanning for source files
ignorePaths:
- "Pods"
- "Frameworks"
- "Products"
# File types to ignore when scanning for source files
ignoreFileTypes:
- "wrapper.framework" # Frameworks
- "wrapper.pb-project" # Xcode project files
#- "wrapper.application" # Applications
#- "wrapper.cfbundle" # Bundles
#- "wrapper.plug-in" # Plug-ins
#- "wrapper.xpc-service" # XPC services
#- "wrapper.xctest" # XCTest bundles
#- "wrapper.app-extension" # App extensions
# Whether to move files only, without changing .xcodeproj settings
moveFileOnly: false
# Use git mv by default instead of filesystem move
gitMove: true
cd ./XCFolder
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml --is-non-interactive-mode
If you want to run XCFolder without checking for uncommitted git changes (useful during development):
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml --skip-safety-check
swift run XCFolder YOUR_XCODEPROJ_FILE.xcodeproj ./Configuration.yaml --is-non-interactive-mode --skip-safety-check
swift run XCFolder ./TestProject/DCDeviceTest.xcodeproj ./Configuration.yaml
❌ Error: There are uncommitted changes in the repository)git mv command will be used to move files to ensure the git file log is fully recorded.
LIBRARY_SEARCH_PATHS, to see if manual adjustments are needed..xcodeproj XCode project file, you can directly use XCodeGen or Tuist to regenerate the project files..yaml and .yml file extensions for configuration files--skip-safety-check: Bypass git uncommitted changes check for faster development workflowsThe entire project is written in Swift and runs as an SPM command-line tool.
You can modify the source code by opening Package.swift if needed.
If you find this library helpful, please consider starring the repo or recommending it to your friends.
Feel free to open an issue or submit a fix/contribution via pull request. :)
35 commits
2 commits
Swift
99.3%