Automate App Store app installation on a new Mac by listing all your apps in a Brewfile and running one command to install everything at once.
Check which of your App Store apps have updates available from the terminal without opening the App Store application.
Uninstall an App Store app from a shell script as part of a larger Mac configuration automation.
You must already be signed in to the Mac App Store, mas can only install apps your Apple account has previously purchased, it cannot buy new paid apps.
mas is a small Mac utility that lets you control the Mac App Store from the terminal, the text-based command interface on your computer. Normally, installing or updating App Store apps requires you to open the App Store application and click through its interface. With mas, you can do the same things by typing short commands, which makes it practical to automate app installs as part of a larger setup process. Installing mas itself is a one-liner using Homebrew, a popular Mac package manager. Once installed, you get a set of commands: search finds apps by name, install puts them on your machine by their App Store ID number, update checks for and applies updates, outdated lists apps that have newer versions available, and uninstall removes apps. You can also look up details on any app, open its App Store page, or sign out of your Apple account from the command line. The tool was built for scripting and automation. A common use case is pairing mas with Homebrew Bundle, where a single text file called a Brewfile lists all the software you want on a Mac, and one command installs everything at once. This is popular for setting up a new Mac quickly or keeping multiple machines in sync. There are a few limits to be aware of. You cannot use mas to buy paid apps you have not already purchased through your Apple account. It can only install or reinstall apps that your account has previously obtained. Some commands also require you to be signed in to the App Store, and certain operations need administrator-level access on the computer. mas runs on macOS 13 and later. It works on both Intel and Apple Silicon Macs.
← mas-cli on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.