Skip to content
Tobias Almén edited this page Mar 26, 2025 · 3 revisions

CLI Documentation for Support Companion

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.


Usage

To use the CLI, navigate to the application’s Resources folder:

cd /Applications/SupportCompanion.app/Contents/Resources/
./SupportCompanionCLI <command>

Available Commands

help

Displays a list of available commands and their descriptions.

Example:

./SupportCompanionCLI help

version

Outputs the installed app version.

Example:

./SupportCompanionCLI version

Output Example:

Support Companion Version: 1.2.3

prefs

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";
    ...
}

reset

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.

action

Trigger an action by name. Provide the action name as an argument.

Example:

./SupportCompanionCLI action "Run Munki Check"

battery

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

device

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

storage

Output storage information.

Example:

./SupportCompanionCLI storage

Output Example:

💾 Storage Information
-----------------------
Storage Name:  Macintosh HD
Usage:         ▓▓▓▓▓░░░░░ 51.6%
FileVault:     Enabled ✅

mdm

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

user

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

kerberos

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

psso

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

Additional Notes

  • 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.
Clone this wiki locally