Use the Mac App Store from the Command Line

 

I try to stay away from the Mac App Store. Why? Because 1. I try to avoid proprietary software as much as pososible and for the most part that’s totally viable ( at least in my case ) and 2. This.

Your case might be different. And that’s ok. But, you might want to avoid using a slow and bloated piece of software like the Mac App Store while continuing to take advantage from what it can offer you.

Here’s where mas comes in – a simple command line interface for the Mac App Store…

INSTALLATION

Install mas via Homebrew with brew install mas

 

USAGE

To learn how to use mas, you can get a list of commands with mas help.

 

You can use tldr to check out a few examples of how to use mas.

 

NOTE: The sign in command will not work. Here’s the developer’s explanation

In macOS High Sierra (10.13) Apple removed the -[ISAccountService signInWithContext:replyBlock:] method from the StoreFoundation private Apple framework which this app relies on to authenticate users through the signin command. I have done a lot of digging and debugging but have not found another API that works to authenticate a user with the Mac App Store.

Users running older macOS versions (10.9-10.12) are unaffected.

WORKAROUND

Sign into the Mac App Store GUI app manually. Once signed in MAS app, the mas command should work fine.

 

And just to prove to you that I really try to avoid installing apps from the Mac App Store as much as possible, here’s the list that mas spits out of the installed Mac App Store apps on my machine.

 

For more info and troubleshooting check out the mas’ project page on Github.