Mac App Store¶
- ID
mas- Home page
- Version requirement
>= 7
- Platforms
🍎 macOS
- Operations
installed·outdated·search·install·upgrade·upgrade_all·remove- purl types
pkg:mas- Brewfile entry
mas, in Brewfile backups- CLI name
mas- Issues and PRs
- Source
mas drives the Mac App Store from the command line.
Packages are Mac App Store applications, keyed by the numeric adamID Apple
assigns each title (the id in an App Store link). mpm reads and writes
that ID; the display name rides along only as a label.
Every query reads --json output, the supported programmatic interface
since the >=7.0.0 floor added --json to list, outdated and
search. It sidesteps the column-alignment ambiguities of the tabular
listing, where an app name carrying parentheses or padding whitespace would
derail a positional parser.
Note
mas prints one JSON object per app, concatenated rather than wrapped
in an array, and leaves control characters (embedded newlines,
U+2028) unescaped inside name and description strings (mas-cli/mas#1248). mpm decodes the buffer
one object at a time with strict=False so each object ends at its own
closing brace instead of splitting on those bytes. The bug is fixed
upstream for the (still unreleased) 7.1.0, so this workaround can be
retired once the requirement floor rises to >=7.1.0.
Note
mas self-escalates: it asks for root itself when a store mutation
needs it, so mpm never wraps install, upgrade or uninstall in
its own sudo.
What mpm adds to mas¶
Through mpm, mas gains --exact and --extended search, to narrow to exact names or match descriptions.
Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover mas alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your mas commands, in mpm¶
You already know mas: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
List outdated packages |
|
|
Search for a package |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✓ |
|
|
✓ |
|
|
||
|
✓ |
exact and extended search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
||
|
||
|
Selecting and configuring mas¶
Deselect mas for a single run with --no-mas, or persist the choice in your configuration:
[mpm]
mas = false
Keep it enabled but tune how mpm drives it with a per-manager override:
[mpm.managers.mas]
timeout = 900
mpm config-template mas prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around mas, one mpm command each:
Snapshot and clone a machine:
mpm --mas dump mas.toml, thenmpm restore mas.tomlon the next one.Export a Brewfile entry instead:
mpm --mas dump --brewfile Brewfile.Export a compliance SBOM:
mpm --mas sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
See privilege escalation for the full policy.
Cooldown¶
State of Mac App Store’s release-age gating, from the cooldown support table:
Status: ❌ None
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: Curated app stores and archives
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.
Version probe¶
The version is extracted from the output of mas version with:
r"(?P<version>\S+)"
Reference traces¶
Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know Mac App Store well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ mas list --json
{"adamID":1569813296,"bundleID":"com.1password.1password-safari","name":"1Password for Safari","version":"2.3.5"}
{"adamID":1295203466,"bundleID":"com.microsoft.rdc.macos","name":"Microsoft Remote Desktop","version":"10.7.6"}
{"adamID":409183694,"bundleID":"com.apple.iWork.Keynote","name":"Keynote","version":"12.0"}
$ mas outdated --json
{"adamID":409183694,"name":"Keynote","newVersion":"12.0","version":"11.0"}
{"adamID":1176895641,"name":"Spark","newVersion":"2.11.21","version":"2.11.20"}
Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --mas installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.
Changelog¶
6.5.0(2026-05-25)Bump minimum required
masversion from1.8.7to7.0.0, switchinstalled,outdated, andsearchto parse--jsonoutput, updatehomepage_urltohttps://github.com/mas-cli/mas, and drop the explicitsudowrapper aroundmas uninstall.
5.19.0(2024-11-14)Implement
removeoperation.Bump minimal requirement to
1.8.7.Reactivate
mastests.
5.3.0(2022-06-25)Fix parsing of variable-length output in
installedandoutdatedoperations.
3.1.0(2020-04-02)Retrieve version in search results.
Bump minimal version to
1.6.1.
2.4.0(2017-01-28)Fix upgrade of
maspackages. Closes #32.
1.10.0(2016-10-04)Let
masreport its own version.Bump minimal requirement of
masto 1.3.1.Fetch currently installed version from
mas. Closes #4.Fix parsing of
maspackage versions after the 1.3.1 release.
1.5.0(2016-07-25)Add support for
mas.