Is there a nice pattern for installing xcode comma...
# fleet
j
Is there a nice pattern for installing xcode command line tools on managed apple machines?
đź‘€ 1
m
Hello James! Thanks for reaching out. To get xcode command line tools on a mac, you can use the command
xcode-select --install
in terminal. One thing to consider is you will likely be prompted to accept a license agreement after install. Let me know if that helps or if there is a more specific way you were looking to install CLT.
j
Well yeah that's how you normally do it. But I want to do it via fleet
Either via some sort of "Add software" flow; or I guess a script? A naive script running
xcode-select --install
wouldn't work I assume as if it pops a dialogue the end user would be confused (and they might decline/cancel!)
s
What do you need it installed for? Apple has some pretty strong protections around user awareness, so it might be a matter of educating your users why they are seeing the prompt. But there are also alternatives, so again why are you trying to get it installed?
j
Not with fleet though? Like same as we deploy e.g. chrome via fleet; we want to have those command line utils installed.
s
You said your users might decline/cancel, so I assumed you wanted the tools installed for some administrative reason. If your users want the tools, why would they then cancel? And they could also trigger the install themselves.
If we need a specific tool, e.g.,
python
, for an admin task, we install that tool specifically via its own package. Only users who do software dev really want the whole suite of Xcode CLI tools, and we just manually install it for them or show them how to trigger it.
Checking my computer, I have over 130 different executables in
/Library/Developer/CommandLineTools/usr/bin/
alone, so it's not really like installing Chrome... it's more like installing all of Microsoft Office, albeit a smaller footprint.
j
They might click decline/cancel because they don't understand the dialogue. As their IT admin I want to just have it preinstalled.
s
m
Appreciate the conversation in this thread, I think it’s important to consider all the ways users have to interact with their devices. As mentioned above, I think having the user opt-in to the installer with the hope that they will have the mindset that “something is being installed” will likely lead to them understanding (at least at a base level) the dialogue box that pops up at the end of install as being part of the process. I’m adding a couple links from our documentation regarding a number of different ways you can deploy software as it might be a good jumping off point but let me know if this works for you or if you end up going down a different route! https://fleetdm.com/guides/software-self-service#basic-article https://fleetdm.com/guides/policy-automation-run-script#basic-article https://fleetdm.com/guides/macos-setup-experience#bootstrap-package (initially linked the wrong article, these should be more aligned with the issue, sorry!)