This script open .xcodeproj or .xcworkspace via Xcode on command line.
Download and install script file
$ cd ~/Downloads/
$ curl -sO https://raw.githubusercontent.com/mothule/xc_launcher/master/xc
$ chmod 711 xc
$ mv xc your_script_dir_path
$ ln -s your_script_dir_path/xc /usr/local/bin/
If no argument is specified, the Xcode project will be searched in the current directory.
$ cd your/xcode/project/directory
$ xc
If you pass a directory path as the first argument, the Xcode project in that directory will be searched and opened.
$ xc your/xcode/project/directory
MIT License