Repolode
mas-cli

mas-cli/mas

A command-line interface for the Mac App Store that lets you search, install, and update apps from scripts and the terminal.

Stars
12,417
Forks
300
Open issues
89
Last commit
7 days ago

What is it?

mas is a command-line interface for the Mac App Store, built for scripting and automation. It lets you search the App Store, list installed apps, check for outdated versions, and install or update apps without opening the App Store GUI.

Commands accept either numeric ADAM IDs or bundle IDs, and output can be plain tables, key-value pairs, or JSON for use in other tools. Installed-app data is read from Spotlight, so apps must be indexed for list and update commands to find them.

mas integrates with Homebrew Bundle, so apps can be included in a Brewfile and installed or updated with it, and it can also be used with Topgrade to update apps. Installing or updating apps requires an Apple Account signed in to the App Store and may require root privileges through sudo.

Key features

  • 01Search the Mac App Store and look up app details by term or ID.
  • 02List installed apps and check which have updates available.
  • 03Install, get, update, and uninstall apps from the terminal.
  • 04Output results as tables, key-value pairs, or JSON.
  • 05Accepts both ADAM IDs and bundle IDs.

Use cases

  • Scripting the provisioning of a new Mac with a fixed list of App Store apps.
  • Including App Store apps in a Homebrew Brewfile.
  • Checking and updating App Store apps as part of a maintenance script.

Quick start

  1. 1

    Install mas with Homebrew

    brew install mas
  2. 2

    Search for an app by name

    mas search Xcode
  3. 3

    List installed apps

    mas list

Things to know

  • Requires macOS; it only works with the Mac App Store.
  • Paid apps cannot be purchased through mas and must be bought in the App Store.
  • iOS and iPadOS apps are unsupported.

In collections

Topics

#macos#app-store#cli#homebrew#automation#software-update#mac-app-store#mas#osx

FAQ

What is mas?
A command-line interface for the Mac App Store that lets you search, install, and update apps from scripts and the terminal. mas is a command-line interface for the Mac App Store, built for scripting and automation. It lets you search the App Store, list installed apps, check for outdated versions, and install or update apps without opening the App Store GUI.
Is mas free to use? What license does it have?
mas is open source under the MIT license. Check the license terms before using it in commercial products.
Is mas still maintained?
Actively maintained. The last commit to mas was on Oct 30, 2026.
What can I use mas for?
Scripting the provisioning of a new Mac with a fixed list of App Store apps. Including App Store apps in a Homebrew Brewfile. Checking and updating App Store apps as part of a maintenance script.
How do I install mas?
Install mas with Homebrew: brew install mas Search for an app by name: mas search Xcode List installed apps: mas list
Where can I get mas?
The source code and installation instructions are on GitHub: https://github.com/mas-cli/mas

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects