Found this tool called
mas-cli which provides a command line interface to the Mac App Store. You can install via Homebrew:
$ brew install mas
You can list apps:
$ mas list 443987910 1Password (6.6.4) 587512244 Kaleidoscope (2.1.0) 405399194 Kindle (1.12.4e)
Or upgrade a specific app:
$ mas upgrade 405399194
Or you can update everywhere app (including Xcode):
$ mas upgrade
Don't forget the option to run multiple versions of Xcode side-by-side by getting it directly from Apple's Developers Website.
Learn more about cli-mas.