CLI softwareupdate does not find updates
The CLI tool softwareupdate is only for OS X updates provided through Apple's software update catalog, or whichever .sucatalog is set in preferences for catalogs provided by OS X Server's Software Update service.

This update catalog does not contain details for Mac App Store apps, such as Xcode.



You can restrict the Mac App Store to only show softwareupdate updates by running the following Terminal command:

defaults write com.apple.appstore restrict-store-softwareupdate-only -bool yes


You can read more about the softwareupdate CLI tool in the man page.