✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

xcs (Xcode script)

Update

xcs2 (the next generation of this tool) is available here

Intro

While building/cleaning Xcode project from command line is trivial task (hint: xcodebuild), managing the project content used to be the hard one. xcs is supposed to solve this problem: it provides a minimal set of tasks for adding/removing files for existing Xcode projects.

Installation

You’ll need two gems: thor and rb-appscript. And then run

thor install https://github.com/gonzoua/xcs/raw/master/xcs.thor

Tasks

Get full list of tasks using command

thor xcs:help
  • xcs:add File [Group] Add file to a group. By default adds to “Source”
  • xcs:help [TASK] Describe available tasks or one specific task
  • xcs:list [–verbose] List project contents
  • xcs:mkgroup Group Create new subgroup in root group
  • xcs:rm Group/File Remove file reference from a project
  • xcs:rmgroup Group Remove Group

Sample usage

Just cd to your project directory and run

thor xcs:list

You’ll get something like this:

Using /Users/gonzo/Projects/EPUBToolkit/EPUBToolkit.xcodeproj
EPUBToolkit/
  EPUBFile.h
  EPUBFile.m
  Source/
    main.m
  Documentation/
    EPUBToolkit.1
  Products/
    EPUBToolkit
  Frameworks/
    Foundation.framework
  Other Sources/
    EPUBToolkit-Prefix.pch

Create a file and add it to project, to group FooSources

echo '#import "Foo.h"' > Foo.m
thor xcs:mkgroup FooSources
thor xcs:add Foo.m FooSources

Limitations

  • Only first-level groups are supported
  • No targets support

Ideas

Ideas are welcome. Open issue or drop me a line at gonzo@bluezbox.com
Pull requests are even more welcome.

Contributors

Oleksandr Tymoshenko

License

See LICENSE

Featured Templates

View More
AI Agents
AI Video Generator
249 1348 5.0
Customer service
Multi-language AI Translator
135 646
Data Analysis
Pharmacy Admin Panel
238 1704
AI Characters
Sarcastic AI Chat Bot
128 1440
Customer service
AI-Powered Product List Manager
147 625

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.