Installing an app from Play Store using the command line Is it possible to install an app from Play Store using the command line and if yes, how?

What I am trying to accomplish is something similar to using adb install file.apk but instead of an apk file the target would be a package name of a Play Store app (for e.g. adb install com.spotify.mobile.android.ui).

Is something like this possible?
I was looking for the same answer, i can't find a single command to do this, but i found few options that could be useful in such cases:

A. download the .apk to your computer and install the apk from it (just google 'apk downloder' and find one suitable for you):

adb install com.myapp.apk


B. open playstore app from adb and point it to your package, this will look like this:

adb shell am start -a android.intent.action.VIEW -d 'market://details?id=com.myapp'


(i'm sure it can be automated to simulate the neccesarry clicks and install the app, but this requires much more work)

none are as easy as just installing from computer cmd, but that what we have now.