Skip to content

CLI Reference

Complete documentation for all macprefs commands and flags.

Checks write access to user Preferences, runs a safe defaults write/delete smoke test, and warns if MDM profiles are present. No permanent changes are made.

Terminal window
macprefs preflight [--config <config>]
FlagDescriptionTier
-c, --config <config>Path to config JSON (optional, validates if provided)Free
--versionShow the version.Free
-h, --helpShow help information.Free

Exit codes:

  • 0 — All checks passed
  • 2 — One or more issues detected

Lists all preference domains, or keys within a specific domain.

Terminal window
macprefs list [--domain <domain>] [--format <format>]
FlagDescriptionTier
--domain <domain>Show keys within this domain instead of listing domainsFree
--format <format>Output format (tablejson) - json requires Pro tier
--versionShow the version.Free
-h, --helpShow help information.Free

Shows current values for preferences. Domain scope determined by license tier.

Terminal window
macprefs inspect [--domains <domains>] [--keys <keys>] [--format <format>]
FlagDescriptionTier
--domains <domains>Comma-separated domains to inspectFree
--keys <keys>Comma-separated keys to filterFree
--format <format>Output format (tablejson) - json requires Pro tier
--versionShow the version.Free
-h, --helpShow help information.Free

Exports macOS preferences to a JSON configuration file.

Terminal window
macprefs export <output-file> [--domains <domains>] [--baseline] [--no-progress]

Arguments:

  • <output-file> — Output JSON file path (required)
FlagDescriptionTier
--domains <domains>Comma-separated domains to include (overrides tier-based scope)Free
--baselineCompare against baseline (Pro only, v1.1)Pro
--no-progressSuppress progress output (for CI/scripting)Free
--versionShow the version.Free
-h, --helpShow help information.Free

Checks that a config file is valid JSON with correct structure.

Terminal window
macprefs validate [--config <config>] [--format <format>]
FlagDescriptionTier
-c, --config <config>Path to config JSONFree
--format <format>Output format (tablejson) - json requires Pro tier
--versionShow the version.Free
-h, --helpShow help information.Free

Shows what changes would be made without applying them. Read-only operation.

Terminal window
macprefs plan [--config <config>] [--format <format>] [--verbose] [--filter <filter>]
FlagDescriptionTier
-c, --config <config>Path to config JSONFree
--format <format>Output format (tablejson) - json requires Pro tier
-v, --verboseShow all changes in detailFree
--filter <filter>Filter changes: conflicts, additions, all (Pro required)Pro
--versionShow the version.Free
-h, --helpShow help information.Free

Exit codes:

  • 0 — No changes needed (in sync)
  • 2 — Changes detected (drift found)

Applies config changes. Creates snapshot before any changes.

Terminal window
macprefs apply [--config <config>] [--yes] [--rollback-on-fail] [--no-rollback-on-fail] [--verbose]
FlagDescriptionTier
-c, --config <config>Path to config JSONFree
--yesAuto-confirm apply (Pro tier, for CI/CD)Pro
--rollback-on-failRollback on failure (default: enabled)Free
--no-rollback-on-failDisable rollback on failureFree
--verboseVerbose outputFree
--versionShow the version.Free
-h, --helpShow help information.Free

Exit codes:

  • 0 — Changes applied successfully (or no changes needed)
  • 1 — Apply failed

Restores preferences to their state before an apply operation.

Terminal window
macprefs rollback [--run-id <run-id>]
FlagDescriptionTier
--run-id <run-id>Specific run ID to rollback (default: most recent)Free
--versionShow the version.Free
-h, --helpShow help information.Free

Manage license activation and status.

Terminal window
macprefs license <subcommand>
FlagDescriptionTier
--versionShow the version.Free
-h, --helpShow help information.Free

Subcommands: status, activate, deactivate


Opens the macprefs store to purchase or manage your license.

Terminal window
macprefs upgrade
FlagDescriptionTier
--versionShow the version.Free
-h, --helpShow help information.Free

Show version, license, and system information.

Terminal window
macprefs about
FlagDescriptionTier
--versionShow the version.Free
-h, --helpShow help information.Free

Displays your current license tier and available features.

Terminal window
macprefs license status
FlagDescriptionTier
--versionShow the version.Free
-h, --helpShow help information.Free

Activates a macprefs Pro license on this device. Prompts interactively if —key is omitted.

Terminal window
macprefs license activate [--key <key>]
FlagDescriptionTier
--key <key>License key (prompts interactively if omitted)Free
--versionShow the version.Free
-h, --helpShow help information.Free

Removes the license from this device, freeing an activation slot.

Terminal window
macprefs license deactivate [--yes]
FlagDescriptionTier
-y, --yesSkip confirmation promptFree
--versionShow the version.Free
-h, --helpShow help information.Free

FeatureFreePro+
Apple domains (com.apple.*, NSGlobalDomain)
JSON export format
Third-party app domains
Headless mode (—yes)
—filter flag (plan)
Semantic exit codes (2 for drift)
—run-id (rollback to specific run)
—baseline (export)

Documentation auto-synced from macprefs CLI help.