I read What\'s new in Xcode 6. The article introduces some new feature about Xcode 6, and it says:
Command Line Xcode’s debugger includes an inter
Command Line
Xcode’s debugger includes an inter
open Terminal,
$sudo xcode-select -switch /Applications/Xcode6-Beta6.app/Contents/Developer
sudo xcode-select -switch /Applications/Xcode6-Beta6.app/Contents/Developer
Notice: The Xcode6-Beta6.app should be replaced to appropriate version you installed
Xcode6-Beta6.app
Then put this line alias swift='xcrun swift' to ~/.bash_profile
alias swift='xcrun swift'
~/.bash_profile
And,
$source ~/.bash_profile
source ~/.bash_profile
$swift
swift
There you go!