[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6698":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":19,"lastSyncTime":35,"discoverSource":36},6698,"mas","mas-cli\u002Fmas","mas-cli",":package: Mac App Store command-line interface","",null,"Swift",12222,295,96,83,0,5,67,2,42.41,"MIT License",false,"main",true,[26,27,28,29,5,30,31],"app-store","homebrew","mac-app-store","macos","osx","software-update","2026-06-12 02:01:28","\u003C!--editorconfig-checker-disable-->\n\u003C!--markdownlint-disable-next-line first-line-h1-->\n[![current version](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fmas-cli\u002Fmas.svg?style=for-the-badge)](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Freleases\u002Flatest)\n[![supported OS: macOS 13+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSupported_OS-macOS_13%2B-teal?style=for-the-badge)](Package.swift)\n[![license: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-750014.svg?style=for-the-badge)](LICENSE)\n[![language: Swift 6.2](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-Swift_6.2-F05138.svg?style=for-the-badge)](https:\u002F\u002Fwww.swift.org)\n[![build, test & lint status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fmas-cli\u002Fmas\u002Fbuild-test.yaml?label=build,%20test%20%26%20lint&style=for-the-badge)](\n  https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Factions\u002Fworkflows\u002Fbuild-test.yaml?query=branch%3Amain\n)\n[![dependencies status](https:\u002F\u002Fimg.shields.io\u002Flibrariesio\u002Fgithub\u002Fmas-cli\u002Fmas?style=for-the-badge)](Package.swift)\n\u003C!--editorconfig-checker-enable-->\n\n\u003Ch1 align=\"center\">\n\n![mas](mas.png)\n\n\u003C\u002Fh1>\n\nmas is a command-line interface for the Mac App Store designed for scripting &\nautomation.\n\n## Installation\n\n\u003C!--markdownlint-disable line-length-->\n\u003C!--editorconfig-checker-disable-->\n| Provider                                                                      | Method                         | mas                                                                                                                                                                                                                                         | macOS             |\n|:------------------------------------------------------------------------------|:-------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|\n| [Homebrew](https:\u002F\u002Fbrew.sh) [Core](https:\u002F\u002Fgithub.com\u002FHomebrew\u002Fhomebrew-core) | `brew install mas`             | [![Homebrew Core](https:\u002F\u002Frepology.org\u002Fbadge\u002Fversion-for-repo\u002Fhomebrew\u002Fmas-mac-app-store.svg?header=)](https:\u002F\u002Fformulae.brew.sh\u002Fformula\u002Fmas)                                                                                                | 14+ (recommended) |\n| [Homebrew](https:\u002F\u002Fbrew.sh) [Tap](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fhomebrew-tap)    | `brew install mas-cli\u002Ftap\u002Fmas` | [![Homebrew Tap](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdynamic\u002Fjson?url=https%3A%2F%2Fapi.github.com%2Frepos%2Fmas-cli%2Fhomebrew-tap%2Freleases%2Flatest&query=%24.name&label=&color=4c1)](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fhomebrew-tap\u002Freleases\u002Flatest) | 13+               |\n| [MacPorts](https:\u002F\u002Fwww.macports.org\u002Finstall.php)                              | `sudo port install mas`        | [![MacPorts](https:\u002F\u002Frepology.org\u002Fbadge\u002Fversion-for-repo\u002Fmacports\u002Fmas-mac-app-store.svg?header=)](https:\u002F\u002Fports.macports.org\u002Fport\u002Fmas\u002Fdetails\u002F)                                                                                             | 13+               |\n| [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Freleases)                    | Installers & source archives   | All                                                                                                                                                                                                                                         | Release-dependent |\n\u003C!--editorconfig-checker-enable-->\n\u003C!--markdownlint-enable line-length-->\n\n## Commands\n\nDetailed documentation is available via `man mas` & `mas --help`.\n\n\u003C!--markdownlint-disable line-length-->\n\u003C!--editorconfig-checker-disable-->\n| Command                       | Functionality                                 | Notes                                                                                                       | Aliases    |\n|:------------------------------|:----------------------------------------------|:------------------------------------------------------------------------------------------------------------|:-----------|\n| `search \u003Cterm>…`              | Search for App Store apps                     | [json](#json-app-output)                                                                                    |            |\n| `lookup \u003Cid>…`                | Output App Store app details                  | [json](#json-app-output)                                                                                    | `info`     |\n| `list [\u003Cid>…]`                | Output installed apps                         | [spotlight](#spotlight), [json](#json-app-output)                                                           |            |\n| `outdated [\u003Cid>…]`            | Output outdated apps                          | [spotlight](#spotlight), [json](#json-app-output)                                                           |            |\n| `outdated --accurate [\u003Cid>…]` | Output outdated apps                          | [spotlight](#spotlight), [account](#app-store-apple-account-requirements), [json](#json-app-output)         |            |\n| `get \u003Cid>…`                   | [Get free apps](#paid-apps), install any apps | [spotlight](#spotlight), [root](#root-privileges), [account](#app-store-apple-account-requirements-for-get) | `purchase` |\n| `install \u003Cid>…`               | Install gotten or purchased apps              | [spotlight](#spotlight), [root](#root-privileges), [account](#app-store-apple-account-requirements)         |            |\n| `lucky \u003Cterm>…`               | Install first matching app                    | [spotlight](#spotlight), [root](#root-privileges), [account](#app-store-apple-account-requirements)         |            |\n| `update [\u003Cid>…]`              | Update outdated apps                          | [spotlight](#spotlight), [root](#root-privileges), [account](#app-store-apple-account-requirements)         | `upgrade`  |\n| `update --accurate [\u003Cid>…]`   | Update outdated apps                          | [spotlight](#spotlight), [root](#root-privileges), [account](#app-store-apple-account-requirements)         | `upgrade`  |\n| `uninstall (\u003Cid>…\\|--all)`    | Uninstall apps                                | [spotlight](#spotlight), [root](#root-privileges)                                                           |            |\n| `signout`                     | Sign out from App Store                       |                                                                                                             |            |\n| `open [\u003Cid>]`                 | Open app App Store page                       |                                                                                                             |            |\n| `home \u003Cid>…`                  | Open app web pages                            |                                                                                                             |            |\n| `seller \u003Cid>…`                | Open seller app web pages                     |                                                                                                             | `vendor`   |\n| `reset`                       | Reset App Store processes                     |                                                                                                             |            |\n| `config`                      | Output config                                 | [json](#json-config-output)                                                                                 |            |\n| `version`                     | Output version                                |                                                                                                             |            |\n\u003C!--editorconfig-checker-enable-->\n\u003C!--markdownlint-enable line-length-->\n\n## Integrations\n\n\u003C!--markdownlint-disable line-length-->\n\u003C!--editorconfig-checker-disable-->\n| Tool                                                             | Functionality                                                               |\n|:-----------------------------------------------------------------|:----------------------------------------------------------------------------|\n| [Homebrew Bundle](https:\u002F\u002Fdocs.brew.sh\u002FBrew-Bundle-and-Brewfile) | Include installed apps in `Brewfile`; get, install & update `Brewfile` apps |\n| [Topgrade](https:\u002F\u002Fgithub.com\u002Ftopgrade-rs\u002Ftopgrade)              | Update apps                                                                 |\n\u003C!--editorconfig-checker-enable-->\n\u003C!--markdownlint-enable line-length-->\n\n## Known Issues\n\n\u003C!--markdownlint-disable line-length-->\n\u003C!--editorconfig-checker-disable-->\n| Issue                                                                          | Solution                                                                                                                                                                    |\n|:-------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Manage system software (macOS, Safari…)                                        | Use [`softwareupdate`](https:\u002F\u002Fwww.unix.com\u002Fman-page\u002Fosx\u002F8\u002Fsoftwareupdate)                                                                                                  |\n| [Inconsistent app data](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Fissues\u002F387)             | Wait hours – days (the App Store uses eventual consistency)                                                                                                                 |\n| [Cannot purchase paid apps](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Fissues\u002F558)         | \u003Ca id=\"paid-apps\">\u003C\u002Fa>Purchase paid apps directly in the App Store; submit a PR                                                                                             |\n| [iOS & iPadOS apps are unsupported](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Fissues\u002F321) | Submit a PR                                                                                                                                                                 |\n| [Hangs](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Fissues\u002F1222)                            | [Index apps in Spotlight](#spotlight); [open a bug report](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Fissues\u002Fnew?template=01-bug-report.yaml) if hangs persist                          |\n| Undetected installed apps                                                      | [Index apps in Spotlight](#spotlight)                                                                                                                                       |\n| `This redownload is not available for this Apple Account…` error               | Sign in the correct Apple Account to the App Store, or&nbsp;uninstall&nbsp;the&nbsp;app&nbsp;&amp;&nbsp;get&nbsp;it&nbsp;with&nbsp;the&nbsp;current&nbsp;Apple&nbsp;Account |\n| Other bugs                                                                     | [Subscribe to an existing](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Fissues), or [open a new](https:\u002F\u002Fgithub.com\u002Fmas-cli\u002Fmas\u002Fissues\u002Fnew?template=01-bug-report.yaml), bug report       |\n\u003C!--editorconfig-checker-enable-->\n\u003C!--markdownlint-enable line-length-->\n\n## Development\n\n\u003C!--markdownlint-disable line-length-->\n\u003C!--editorconfig-checker-disable-->\n| Action                                                                  | Command                      |\n|:------------------------------------------------------------------------|:-----------------------------|\n| Build                                                                   | `Scripts\u002Fbuild` or Xcode 26+ |\n| Set up zsh wrapper                                                      | `Scripts\u002Fsetup_libexec`      |\n| Run zsh wrapper                                                         | `Scripts\u002Fmas`                |\n| Test ([Swift Testing](https:\u002F\u002Fdeveloper.apple.com\u002Fxcode\u002Fswift-testing)) | `Scripts\u002Ftest`               |\n\u003C!--editorconfig-checker-enable-->\n\u003C!--markdownlint-enable line-length-->\n\n## App IDs\n\nApp Store apps each have 2 unique IDs:\n\n| Type      | Format  | Example (for Xcode) |\n|:----------|:--------|:--------------------|\n| ADAM ID   | Integer | 497799835           |\n| Bundle ID | String  | com.apple.dt.Xcode  |\n\nmas commands accept both types of app IDs as arguments.\n\nBy default, all-digit app IDs are considered ADAM IDs; other app IDs are\nconsidered bundle IDs.\n\n`--bundle` forces all-digit app IDs to also be considered bundle IDs.\n\nADAM IDs can be found via:\n\n- `mas search \u003Cterm>…`\n- `mas list`\n- The App Store:\n  1. Open an app's App Store page.\n  2. Open the page's Share Sheet.\n  3. Choose `Copy`.\n  4. Extract the ADAM ID from the URL in the copied text. e.g., `497799835` from\n     `https:\u002F\u002Fapps.apple.com\u002Fus\u002Fapp\u002Fxcode\u002Fid497799835?mt=12`.\n\n## JSON App Output\n\n`list`, `outdated` & `search` normally output tabular data, with a few fields\nfor each app on its own row.\n\n`lookup` normally outputs fields as key-value pairs—one per line—in a contiguous\nblock for each app, with a blank line between apps.\n\nIf `--json` is supplied, these commands output a stream of JSON objects—one per\napp—each containing all fields provided by Apple for that app.\n\nMany of the keys provided by Apple are poorly named, so they are mapped to\nbetter names by an algorithm.\n\n\u003C!--editorconfig-checker-disable-->\nMapped keys are [sorted](\n  https:\u002F\u002Fdeveloper.apple.com\u002Fdocumentation\u002Ffoundation\u002Fnsstring\u002Fcompareoptions\u002Fnumeric\n).\n\u003C!--editorconfig-checker-enable-->\n\nEach key should be unique within an object; if duplicate keys exist in an\nobject, their relative ordering in the input is preserved in the output.\n\nFor tabular output, if an object contains duplicate keys, the last value is\nused.\n\nIf Apple renames or adds keys, suboptimal keys might be output until the mapping\nis updated.\n\n## JSON Config Output\n\n`config` normally outputs settings as key-value pairs, one per line.\n\nIf `--json` is supplied, `config` outputs all settings in a single JSON object.\n\nSince the keys are defined by mas, they are guaranteed to be unique & correct.\n\n## Spotlight\n\n`list`, `outdated`, `get`, `install`, `lucky`, `update` & `uninstall` obtain\ndata for installed apps from the Spotlight Metadata Service (MDS).\n\nSpotlight indexing thus must be enabled & valid for folders containing App Store\napps.\n\nCheck if an app is properly indexed in Spotlight via:\n\n```console\n## General format:\n$ mdls -rn kMDItemAppStoreAdamID \u003Cpath-to-app>\n## Outputs the ADAM ID if the app is indexed.\n## Outputs nothing if the app is not indexed.\n\n## Example:\n$ mdls -rn kMDItemAppStoreAdamID \u002FApplications\u002FXcode.app\n497799835\n```\n\nIf an app is indexed in Spotlight, find the path to the app from its ADAM ID\nvia:\n\n```shell\nmdfind 'kMDItemAppStoreAdamID = \u003Cadam-id>'\n```\n\nIf any App Store apps are not properly indexed, index via:\n\n\u003C!--markdownlint-disable line-length-->\n\u003C!--editorconfig-checker-disable-->\n```shell\n# Individual app (if the omitted apps are known). e.g., for Xcode:\nmdimport \u002FApplications\u002FXcode.app\n\n# All apps:\nvol=\"$(\u002Fusr\u002Flibexec\u002FPlistBuddy -c \"Print :PreferredVolume:name\" ~\u002FLibrary\u002FPreferences\u002Fcom.apple.appstored.plist 2>\u002Fdev\u002Fnull)\"\nmdimport \u002FApplications ${vol:+\"\u002FVolumes\u002F${vol}\u002FApplications\"}\n\n# All volumes:\nsudo mdutil -Eai on\n```\n\u003C!--editorconfig-checker-enable-->\n\u003C!--markdownlint-enable line-length-->\n\n## Root Privileges\n\n`get`, `install`, `lucky`, `update` & `uninstall` require root privileges.\n\nIf run without root privileges, mas requests them as necessary.\n\nmas uses existing valid sudo credentials, falling back to prompting for the\nmacOS user password, which is piped directly to a sudo process; the password is\nnever visible to, nor stored by, mas.\n\nAny sudo credentials used or established by mas remain valid after mas finishes,\npursuant to the user-configured sudo timeout.\n\n## App Store Apple Account Requirements\n\n`get`, `install`, `lucky`, `update` & `outdated --accurate` require an Apple\nAccount signed in to the App Store.\n\n## App Store Apple Account Requirements for `get`\n\n`get` requires an Apple Account signed in to the App Store.\n\nEven when an Apple Account is already signed in to the App Store, the system\nsecurity settings might require authenticating the Apple Account for each app\nbeing gotten.\n\nIf `System Settings` > `Touch ID & Password` > `Use Touch ID for purchases in\niTunes Store, App Store and Apple Books` is:\n\n- `Enabled`: You must authenticate (via Touch ID or Apple Account password) for\n  each app being gotten.\n- `Disabled`: If `System Settings` > `Apple Account` > `Media & Purchases` >\n  `Free Downloads` is:\n  - `Always Require`: You must authenticate (via Apple Account password) for\n    each app being gotten.\n  - `Never Require`: Apps are gotten without additional authentication.\n\n**Note:** App Store authentication is separate from any macOS user\nauthentication required to grant root privileges to get apps.\n\n## Outdated-App Detection\n\nIn `outdated` & `update`, the determination of whether an app is outdated is\nconfigurable via 2 settings:\n\n- [Minimum macOS Check](#minimum-macos-check)\n- [Accuracy](#accuracy)\n\n### Concepts & Constraints\n\nA **release** is a build of an app distributed to users.\n\nA **version** is a label that orders a release relative to all other releases of\nthe same app.\n\nThe [iTunes Search API](https:\u002F\u002Fperformance-partners.apple.com\u002Fsearch-api)\nreports app data only for the latest release of which it is aware; eventual\nconsistency delays can prevent the API from knowing about the latest release\navailable from the App Store.\n\n### Minimum macOS Check\n\n- `--check-min-os` (default): Filters outdated apps to include only those for\n  which the release reported by the\n  [iTunes Search API](https:\u002F\u002Fperformance-partners.apple.com\u002Fsearch-api) is\n  compatible with your current macOS.\n- `--no-check-min-os`: Does not filter outdated apps. This is useful only when\n  multiple newer releases are available, with some compatible with your current\n  macOS, but the latest incompatible. With this setting, an app whose latest\n  release is newer than the installed release but incompatible with your current\n  macOS will:\n  - `outdated`: Be reported as outdated, which avoids false negatives, but could\n    cause false positives.\n  - `update`: Display a dialog offering to install the newest release compatible\n    with your current macOS, which might be the installed, or a newer (but not\n    the latest), release.\n\n### Accuracy\n\nThe 2 outdated-app-detection modes are selectable via mutually exclusive flags:\n\n\u003C!--markdownlint-disable line-length-->\n\u003C!--editorconfig-checker-disable-->\n| Feature          | `--inaccurate` (default)                                                         | `--accurate`                                 |\n|:-----------------|:---------------------------------------------------------------------------------|:---------------------------------------------|\n| **Method**       | Query the [iTunes Search API](https:\u002F\u002Fperformance-partners.apple.com\u002Fsearch-api) | Initiate App Store download to read metadata |\n| **Accuracy**     | Potential false positives or negatives                                           | No false positives or negatives              |\n| **Speed**        | Fast (~7ms per app)                                                              | Slow (~175ms per app)                        |\n| **Requirements** | [iTunes Search API](https:\u002F\u002Fperformance-partners.apple.com\u002Fsearch-api)           | Apple Account signed in to the App Store     |\n| **Dialogs**      | Only if `--no-check-min-os`                                                      | Various potential dialogs                    |\n| **Hangs**        | None                                                                             | If checking 100+ apps in quick succession    |\n\u003C!--editorconfig-checker-enable-->\n\u003C!--markdownlint-enable line-length-->\n\n#### `--inaccurate` (default)\n\nThe inaccurate mode is optimized to:\n\n- Be fast.\n- Avoid hangs.\n- Avoid dialogs (as long as `--no-check-min-os` is not supplied).\n- Report outdated apps owned by any Apple Account without requiring an Apple\n  Account signed in to the App Store (apps can be updated, however, only for an\n  Apple Account signed in to the App Store).\n\nIt compares an installed app's version with the version reported by the\n[iTunes Search API](https:\u002F\u002Fperformance-partners.apple.com\u002Fsearch-api) as\n[Semantic Versions](https:\u002F\u002Fsemver.org), with build metadata adjudicating ties.\n\nThis mode suffers from potential false positives & negatives:\n\n- **Inconsistent versions:** For certain apps, the iTunes Search API\n  consistently reports a different version for the same release than is reported\n  by all other App Store systems & by installed apps, causing false positives or\n  negatives.\n- **Eventual consistency delays:** Lags between the App Store & the iTunes\n  Search API can cause false negatives.\n\n#### `--accurate`\n\nThe accurate mode is optimized to avoid false positives & negatives at the\nexpense of speed, potential hangs & potential dialogs.\n\nIt initiates a download of an installed app's latest release from the App Store\nto obtain the correct latest version from the download metadata. Subsequent\nbehavior depends on the command:\n\n- `outdated`: Each download is immediately cancelled; an app is reported as\n  outdated if its version differs from the download metadata version.\n- `update`: The download is cancelled iff the installed version is the same as\n  the download metadata version. Otherwise, the update is allowed to complete.\n\nThis mode:\n\n- Connects to the\n  [iTunes Search API](https:\u002F\u002Fperformance-partners.apple.com\u002Fsearch-api) iff\n  `--no-check-min-os` is not supplied.\n- Requires an Apple Account signed in to the App Store.\n- Opens a dialog:\n  - If no Apple Account is signed in to the App Store.\n  - For each app owned by a different Apple Account.\n  - For each app no longer available from the App Store.\n  - If `--no-check-min-os` is supplied, for each app for which the release\n    reported by the iTunes Search API is incompatible with your current macOS.\n- Can hang: Initiating downloads for dozens of apps is safe, but for hundreds of\n  apps can cause the App Store to stop responding. This is likely due to Apple\n  rate limiting, for which the exact thresholds, durations & ramifications are\n  currently unknown.\n\n## License\n\nLicensed under the [MIT license](LICENSE).\n\nOriginally created by Andrew Naylor\n([@argon on GitHub](https:\u002F\u002Fgithub.com\u002Fargon) |\n[@argon on X](https:\u002F\u002Fx.com\u002Fargon)).\n","mas 是一个用于 Mac App Store 的命令行接口，专为脚本编写和自动化设计。它允许用户通过终端来管理应用程序的安装、更新和查询等操作，支持批量处理和自动化流程。项目采用 Swift 语言开发，确保了与 macOS 系统的高度兼容性，并且通过 Homebrew 或 MacPorts 可以轻松安装。适用于需要对 Mac App Store 中的应用程序进行自动化管理的场景，如企业 IT 管理员批量部署软件、开发者自动测试环境搭建等。","2026-06-11 03:08:25","top_language"]