Stock macOS command line programs

Is there a way for a cross-platform developer who's not using macOS themselves to see which command line programs are included in a stock macOS install (without Xcode command line tools), by OS version?

Even for a Mac developer, is there any way other than collecting everything executable in /usr/bin on a fresh install?

I’m not aware of any definitive index of command-line tools installed by OS version [1].

Having said that, this rarely comes up because we discourage folks from using a command-line tool as an API. Rather, we recommend that they call the API that underlies the tool. Of course, there are some tasks that don’t have a matching API )-:

Why is this important to you?

Finally, you wrote:

is there any way other than collecting everything executable in /usr/bin on a fresh install?

That won’t work for a couple of reasons. The obvious one is that command-line tools can be installed in locations other than /usr/bin. The less obvious one is that many command-line tools are trampolines for tools that embedded inside Xcode. For example, /usr/bin/nm is present on a customer release of macOS 12 but is just a trampoline that prompts you to install the developer tools:

% nm
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] If I need to know whether a specific tool is available on a specific OS release, I spin up my VM for that release.

Stock macOS command line programs
 
 
Q