-
-
Notifications
You must be signed in to change notification settings - Fork 10
The Support Companion application includes a Command Line Interface (CLI) to help you perform common operations such as checking the app version, viewing User Defaults settings, and resetting configurations.
To use the CLI, navigate to the application’s Resources folder:
cd /Applications/SupportCompanion.app/Contents/Resources/
./SupportCompanionCLI <command>
Displays a list of available commands and their descriptions.
Example:
./SupportCompanionCLI help
Outputs the installed app version.
Example:
./SupportCompanionCLI version
Output Example:
Support Companion Version: 1.2.3
Prints the current User Defaults settings configured for the app. This includes preferences like notification intervals, branding, or other app-specific configurations.
Example:
./SupportCompanionCLI prefs
Output Example:
Current UserDefaults values for com.github.macadmins.SupportCompanion:
{
NotificationTitle = "Support Companion";
NotificationInterval = 4;
BrandName = "Support Companion";
Mode = "Intune";
...
}
Resets User Defaults to their default values as specified in the app configuration. Note that configuration profiles (if applied) will override these values.
Example:
./SupportCompanionCLI reset
Output Example:
UserDefaults have been reset to their default values.
Trigger an action by name. Provide the action name as an argument.
Example:
./SupportCompanionCLI action "Run Munki Check"
Output battery information.
Example:
./SupportCompanionCLI battery
Output Example:
🔋 Battery Information
-----------------------
Health: 88% 🔋
Cycle Count: 48
Temperature: 33.0°C 🌡️
Charging Status: Not Charging
Time Remaining: N/A
Output device information.
Example:
./SupportCompanionCLI device
Output Example:
💻 Device Information
-----------------------
Hostname: Awesome Mac
Model: MacBook Pro (14-inch, Nov 2023)
Serial Number: 123456789
Processor: Apple M3 Pro
Memory: 36 GB
IP Address(es): 192.168.68.100
Last Reboot: 7 Hours
OS Version: 15.3.1
OS Build: 24D70
Output storage information.
Example:
./SupportCompanionCLI storage
Output Example:
💾 Storage Information
-----------------------
Storage Name: Macintosh HD
Usage: ▓▓▓▓▓░░░░░ 51.6%
FileVault: Enabled ✅
Output MDM information.
Example:
./SupportCompanionCLI mdm
Output Example:
🔒 MDM Information
-----------------------
Enrolled: Yes (User Approved)
ABM: Yes
MDM URL: i.manage.microsoft.com/DeviceGatewayProxy/ioshandler.ashx?Platform=MacMDM
Output user information.
Example:
./SupportCompanionCLI mdm
Output Example:
👤 User Information
-----------------------
Login: Geralt
Name: Geralt of Rivia
Home Directory: /Users/Geralt
Shell: /bin/zsh
Admin: Yes
Output Kerberos SSO information.
Example:
./SupportCompanionCLI kerberos
Output Example:
🎟 Kerberos SSO Information
-----------------------
Username: geroriv
Realm: KAER.MORHEN
Password Expires: 13 days
Last Password Change: 76 days
Last Local Password Change: 98 days
Output Platform SSO information.
Example:
./SupportCompanionCLI psso
Output Example:
🎟 Platform SSO Information
-----------------------
Login Frequency: 64800
Login Type: Secure Enclave
New User Autorization Mode: None
Registration Completed: false
SDK Version: Unknown
Shared Device Keys: true
User Authorization Mode: Unknown
- Configuration Profiles: If specific keys are set via a macOS configuration profile (e.g., using MDM), those settings will always take precedence over any User Defaults configured by the app or CLI.
- Permissions: Ensure you have proper permissions to execute the CLI from the Resources folder.