@@ -38,13 +38,13 @@ Detailed documentation is available via `man mas` & `mas --help`.
3838
3939<!-- markdownlint-disable line-length-->
4040<!-- editorconfig-checker-disable-->
41- | Command | Functionality | Requirements | Aliases |
41+ | Command | Functionality | Notes | Aliases |
4242| :------------------------------| :----------------------------------------------| :------------------------------------------------------------------------------------------------------------| :-----------|
43- | ` search <term>… ` | Search for App Store apps | | |
44- | ` lookup <id>… ` | Output App Store app details | | ` info ` |
45- | ` list [<id>…] ` | Output installed apps | [ spotlight] ( #spotlight ) | |
46- | ` outdated [<id>…] ` | Output outdated apps | [ spotlight] ( #spotlight ) | |
47- | ` outdated --accurate [<id>…] ` | Output outdated apps | [ spotlight] ( #spotlight ) , [ account] ( #app-store-apple-account-requirements ) | |
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 ) | |
4848| ` get <id>… ` | [ Get free apps] ( #paid-apps ) , install any apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements-for-get ) | ` purchase ` |
4949| ` install <id>… ` | Install gotten or purchased apps | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) | |
5050| ` lucky <term>… ` | Install first matching app | [ spotlight] ( #spotlight ) , [ root] ( #root-privileges ) , [ account] ( #app-store-apple-account-requirements ) | |
@@ -56,7 +56,7 @@ Detailed documentation is available via `man mas` & `mas --help`.
5656| ` home <id>… ` | Open app web pages | | |
5757| ` seller <id>… ` | Open seller app web pages | | ` vendor ` |
5858| ` reset ` | Reset App Store processes | | |
59- | ` config ` | Output config | | |
59+ | ` config ` | Output config | [ json ] ( #json-config-output ) | |
6060| ` version ` | Output version | | |
6161<!-- editorconfig-checker-enable-->
6262<!-- markdownlint-enable line-length-->
@@ -96,6 +96,8 @@ Detailed documentation is available via `man mas` & `mas --help`.
9696| Action | Command |
9797| :------------------------------------------------------------------------| :-----------------------------|
9898| Build | ` Scripts/build ` or Xcode 26+ |
99+ | Set up zsh wrapper | ` Scripts/setup_libexec ` |
100+ | Run zsh wrapper | ` Scripts/mas ` |
99101| Test ([ Swift Testing] ( https://developer.apple.com/xcode/swift-testing ) ) | ` Scripts/test ` |
100102<!-- editorconfig-checker-enable-->
101103<!-- markdownlint-enable line-length-->
@@ -128,6 +130,41 @@ ADAM IDs can be found via:
128130 - e.g., ` 497799835 ` from
129131 < https://apps.apple.com/us/app/xcode/id497799835?mt=12 >
130132
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+
131168## Spotlight
132169
133170` list ` , ` outdated ` , ` get ` , ` install ` , ` lucky ` , ` update ` & ` uninstall ` obtain
0 commit comments