mas-cli / mas

:package: Mac App Store command line interface
MIT License
10.88k stars 275 forks source link

💬 Better messaging when an app hasn't been purchased #218

Open phatblat opened 5 years ago

phatblat commented 5 years ago

Is your feature request related to a problem? Please describe. It is (barely) documented that mas is not able to install apps from the MAS that haven't been purchased. The README does call out that the lucky command can't be used to purchase an app, but this isn't made clear that it also applies to the install command.

Please note that this command will not allow you to install (or even purchase) an app for the first time: it must already be in the Purchased tab of the App Store

However, there is no messaging from the tool to this limitation. Additionally, the experience of attempting to install an app not yet purchased is confusing.

$ mas search speedtest
  1066718511  Speed Test         (3.01)
  1153157709  Speedtest by Ookla (1.5)
  1149339197  Speed Test PRO     (2.0)
   429207498  SpeedTask          (1.1.1)

$ mas search ookla
  1153157709  Speedtest by Ookla (1.5)

$ mas info 1153157709
Speedtest by Ookla 1.5 [0.0]
By: Ookla
Released: May 27, 2018
Minimum OS: 10.11
Size: 13.1 MB
From: https://itunes.apple.com/us/app/speedtest-by-ookla/id1153157709?mt=12&uo=4

$ mas install 1153157709
No downloads
Error: No downloads began

If the MAS app is not open, a lone dialog appears:

screen shot 2019-02-06 at 6 15 08 pm

The lucky command behaves similarly.

$ mas lucky ookla
No downloads
Error: No downloads began

Describe the solution you'd like I would be ideal if one could purchase apps through mas - at least free ones. I can see a lot of potential issues with actually spending money through mas including Apple not being happy.

Describe alternatives you've considered Short of actually completing a purchase, mas really should give the right message to the user to indicate that they need to go to the MAS app and purchase the app.

I would like to see an error message like the following:

Error: You have not purchased on this account (AccountID).

Perhaps, this could be followed with a suggestion to use the open command to deep link into the MAS app to complete the purchase.

$ mas open 1153157709
screen shot 2019-02-06 at 6 16 33 pm

Additional context

Note that if the MAS app is already open, the error dialog appears as a sheet sliding in from the top (at least that's how it behaves on Mojave):

screen shot 2019-02-06 at 6 20 48 pm
rgoldberg commented 1 month ago

Should mas install be changed to automatically purchase free apps? Should a --purchase switch be added to mas install to support purchasing apps that aren't free? If so, mas purchase would basically be an alias for mas install --purchase.