These utilities list app locations in macOS
The Swift (68.2 ms) and Objective-C (78.4 ms) implementations try to mimic
mdfind's (29.1 ms) behavior, but run slower than it.
Note
This utility is only intended to run in macOS.
When you are building applist, ensure you have either:
- A Swift compiler
- An Objective-C compiler.
If you have brew installed, just run:
$ brew install Neved4/tap/applistOtherwise, first clone the repo:
$ git clone https://github.com/Neved4/applistTo build all variants, go to the project directory and run:
$ make allAlternatively, to build the Objective-C version run:
$ clang -framework Cocoa -o applist-objc applist.mmFor the Swift version, run:
$ swiftc -O applist.swift -o applist-swiftDone!
Alternatively, if you'd rather not install or compile anything, feel free to
add it as a function to your shell .profile:
applist() {
mdfind "kMDItemContentType == 'com.apple.application-bundle'"
}$ applist | grep "Docker.app"
/Applications/Docker.appThis comes handy for manual Homebrew reinstalls that lie outside the default install path:
$ brew reinstall --cask docker --applist $(applist | grep Docker)All programs were benchmarked with hyperfine under arm64:
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
applist-sh |
29.1 ± 1.7 | 27.2 | 33.7 | 1.00 |
applist-objc |
68.2 ± 3.5 | 63.7 | 81.5 | 2.34 ± 0.18 |
applist-swift |
78.4 ± 4.2 | 71.0 | 89.9 | 2.69 ± 0.21 |
For other shell functions like applist, check out apputils.
applist is licensed under the terms of the MIT License.
See the LICENSE file for details.