Skip to content
Tobias Almén edited this page Dec 4, 2024 · 2 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.

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.