@@ -38,28 +38,26 @@ Detailed documentation is available via `man mas` & `mas --help`.
3838
3939<!-- markdownlint-disable line-length-->
4040<!-- editorconfig-checker-disable-->
41- | Command | Functionality | Requires |
42- | :---------------------------| :----------------------------------------------| :----------------------------------------------------------------------------------------------------------------------|
43- | ` search <term>… ` | Search for App Store apps by name | |
44- | ` lookup <id>… ` | Output App Store app details | |
45- | ` info <id>… ` | ` lookup ` alias | |
46- | ` list [<id>…] ` | Output installed apps | [ spotlight] ( #spotlight ) |
47- | ` outdated [<id>…] ` | Output outdated apps | [ spotlight] ( #spotlight ) , [ account] ( #app-store-apple-account-requirements ) for ` --accurate ` |
48- | ` get <id>… ` | [ Get free apps] ( #paid-apps ) , install any apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account for ` get ` ] ( #app-store-apple-account-requirements-for-get ) |
49- | ` purchase <id>… ` | ` get ` alias | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account for ` get ` ] ( #app-store-apple-account-requirements-for-get ) |
50- | ` install <id>… ` | Install already gotten or purchased apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) |
51- | ` lucky <term>… ` | Install first app from ` search <term>… ` | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) |
52- | ` update [<id>…] ` | Update outdated apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) |
53- | ` upgrade [<id>…] ` | ` update ` alias | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) |
54- | ` uninstall (<id>…\|--all) ` | Uninstall apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) |
55- | ` signout ` | Sign out Apple Account from App Store | |
56- | ` open [<id>] ` | Open app App Store page | |
57- | ` home <id>… ` | Open app web pages | |
58- | ` seller <id>… ` | Open seller app web pages | |
59- | ` vendor <id>… ` | ` seller ` alias | |
60- | ` reset ` | Reset App Store processes | |
61- | ` config ` | Output config | |
62- | ` version ` | Output version | |
41+ | Command | Functionality | Notes | Aliases |
42+ | :------------------------------| :----------------------------------------------| :------------------------------------------------------------------------------------------------------------| :-----------|
43+ | ` search <term>… ` | Search for App Store apps | [ json] ( #json-app-output ) | |
44+ | ` lookup <id>… ` | Output App Store app details | [ json] ( #json-app-output ) | ` info ` |
45+ | ` list [<id>…] ` | Output installed apps | [ spotlight] ( #spotlight ) , [ json] ( #json-app-output ) | |
46+ | ` outdated [<id>…] ` | Output outdated apps | [ spotlight] ( #spotlight ) , [ json] ( #json-app-output ) | |
47+ | ` outdated --accurate [<id>…] ` | Output outdated apps | [ spotlight] ( #spotlight ) , [ account] ( #app-store-apple-account-requirements ) , [ json] ( #json-app-output ) | |
48+ | ` get <id>… ` | [ Get free apps] ( #paid-apps ) , install any apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements-for-get ) | ` purchase ` |
49+ | ` install <id>… ` | Install gotten or purchased apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) | |
50+ | ` lucky <term>… ` | Install first matching app | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) | |
51+ | ` update [<id>…] ` | Update outdated apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) | ` upgrade ` |
52+ | ` update --accurate [<id>…] ` | Update outdated apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) | ` upgrade ` |
53+ | ` uninstall (<id>…\|--all) ` | Uninstall apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) | |
54+ | ` signout ` | Sign out from App Store | | |
55+ | ` open [<id>] ` | Open app App Store page | | |
56+ | ` home <id>… ` | Open app web pages | | |
57+ | ` seller <id>… ` | Open seller app web pages | | ` vendor ` |
58+ | ` reset ` | Reset App Store processes | | |
59+ | ` config ` | Output config | [ json] ( #json-config-output ) | |
60+ | ` version ` | Output version | | |
6361<!-- editorconfig-checker-enable-->
6462<!-- markdownlint-enable line-length-->
6563
@@ -98,6 +96,8 @@ Detailed documentation is available via `man mas` & `mas --help`.
9896| Action | Command |
9997| :------------------------------------------------------------------------| :-----------------------------|
10098| Build | ` Scripts/build ` or Xcode 26+ |
99+ | Set up zsh wrapper | ` Scripts/setup_libexec ` |
100+ | Run zsh wrapper | ` Scripts/mas ` |
101101| Test ([ Swift Testing] ( https://developer.apple.com/xcode/swift-testing ) ) | ` Scripts/test ` |
102102<!-- editorconfig-checker-enable-->
103103<!-- markdownlint-enable line-length-->
@@ -130,6 +130,41 @@ ADAM IDs can be found via:
130130 - e.g., ` 497799835 ` from
131131 < https://apps.apple.com/us/app/xcode/id497799835?mt=12 >
132132
133+ ## JSON App Output
134+
135+ ` list ` , ` outdated ` & ` search ` normally output tabular data, with a few fields
136+ for each app on its own row.
137+
138+ ` lookup ` normally outputs fields as key-value pairs—one per line—in a contiguous
139+ block for each app, with a blank line between apps.
140+
141+ If ` --json ` is supplied, these commands output a stream of JSON objects—one per
142+ app—each containing all fields provided by Apple for that app.
143+
144+ Many of the JSON keys provided by Apple are poorly named, so they are mapped to
145+ better names by an algorithm.
146+
147+ <!-- editorconfig-checker-disable-->
148+ Mapped JSON keys are [ sorted] (
149+ https://developer.apple.com/documentation/foundation/nsstring/compareoptions/numeric
150+ ).
151+ <!-- editorconfig-checker-enable-->
152+
153+ Each JSON key should be unique within an object; if duplicate keys exist in an
154+ object, their relative ordering in the input is preserved in the output.
155+
156+ If Apple renames or adds JSON keys, suboptimal JSON keys might be output until
157+ the mapping is updated.
158+
159+ ## JSON Config Output
160+
161+ ` config ` normally outputs settings as key-value pairs, one per line.
162+
163+ If ` --json ` is supplied, ` config ` outputs all settings in a single JSON object.
164+
165+ Since the JSON keys are defined by mas, they are guaranteed to be unique &
166+ correct.
167+
133168## Spotlight
134169
135170` list ` , ` outdated ` , ` get ` , ` install ` , ` lucky ` , ` update ` & ` uninstall ` obtain
0 commit comments