xcopen
xcopen is a shortcut to open the Xcode workspace or project in the current directory.
xcopen will try to open the .xcworkspace
file of the directory. If one is not found, it will then look for a .xcodeproj
file.
xcopen
Before open -a Xcode "My Awesome App.xcworkspace"
xcopen
After xcopen
Installation
xcopen can be installed using Homebrew.
brew install macecchi/tap/xcopen
Usage
xcopen
That's all you need to open the workspace/project in the current directory. If you want to specify a different directory, just pass it as an argument:
xcopen /path/to/MyAwesomeApp/
You can also use the flag --beta
or simply -b
to open the project using Xcode-beta, if you have it installed:
xcopen --beta /path/to/MyAwesomeApp/
Specifying --default
or -d
will open the project with the default application:
xcopen --beta /path/to/MyAwesomeApp/
This can be useful if your Xcode installations contain a version number (e.g. when using xcode-install), in which case the first two options will not work.
Finally, the --path
or -p
flag can be used to specify the path to a specific Xcode app if necessary (the -d
and -b
flags are ignored if also passed)
xcopen --path /Applications/Xcode-14.1.0.app/
# or
xcopen --path /Applications/Xcode-14.1.0.app/ /path/to/MyAwesomeApp/
License
This project is licensed under the terms of the GNU GPL v3 license. See the LICENSE file.