Some times it would be very handy to check / update android sdk from command line. For automation pipelines it surely helps. Here is few commands that can be used to check or update android sdk from command line.
List Installed SDK details
haridas@haridas-HP-ProBook-4440s:~$ android list sdk
Refresh Sources:
Fetching https://dl.google.com/android/repository/addons_list-2.xml
Validate XML
Parse XML
Fetched Add-ons List successfully