Command Line Arguments - macadmins/nudge GitHub Wiki
- Version
- Debug UI Mode
- Demo Mode
- Simple Mode
- JSON URL
- Force Screenshot Icon
- Bundle Mode
- Print Profile Configuration
- Print JSON Configuration
- Simulate OS Version
- Simulate Hardware ID
- Simulate Date
- Disable Random Delay
- Custom SOFA Feed URL
Launch Nudge using your configuration options
Run this with no options to see how Nudge will behave when run by the default LaunchAgent. (Note that there is a delay by default, see Disable Random Delay)
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge
Version (-version)
Use the -version argument to determine the installed version of Nudge:
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-version
Debug UI Mode (-debug-ui-mode)
This shows both simpleMode and standardMode together in a single Nudge window. (It is unlikely that anyone other than developers of Nudge will utilize this feature.)
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-debug-ui-mode
Demo Mode (-demo-mode)
In order to trigger Nudge in demo mode, simply pass the -demo-mode argument:
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-demo-mode
This will open Nudge in the English localization and allow you to test the buttons, as well as Light/Dark mode.
If you'd like to trigger simpleMode in Demo mode, chain the both -demo-mode and -simple-mode arguments:
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-demo-mode \
-simple-mode
Simple Mode (-simple-mode)
If you'd like to force Simple Mode (and don't want to use the built in preferences configuration), simply pass the -simple-mode argument:
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-simple-mode
JSON URL (-json-url)
In order to download a JSON from a website, simple pass the -json-url argument:
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-json-url \
"https://raw.githubusercontent.com/macadmins/nudge/Example%20Assets/com.github.macadmins.Nudge.json"
While the -json-url argument is mainly designed for web urls, passing file:// urls are also possible. This may be useful if you don't want to deploy a JSON to /Library/Preferences or simply want to test another JSON file.
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-json-url \
"file:///path/to/your.json"
Note: Spaces must be converted to %20, just as a standard url. This is required both for web and local assets.
Force Screenshot Icon (-force-screenshot-icon)
By default, if you do not pass a screenshot in the Nudge preferences, the Big Sur icon embedded within Nudge.app will not render. To force this behavior, pass the -force-screenshot-icon argument:
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-force-screenshot-icon
Bundle Mode (-bundle-mode)
Argument to launch Nudge with a built-in JSON; not for use in production.
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-bundle-mode
Print Profile Configuration (-print-profile-config)
Argument to print out the current profile preferences applied to nudge. (Nudge will not run when passing this argument.)
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-print-profile-config
Print JSON Configuration (-print-json-config)
Argument to print out the current JSON preferences applied to nudge. (Nudge will not run when passing this argument.)
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-json-url \
"file:///Users/`id -n -u`/Downloads/com.github.macadmins.Nudge.json" \
-print-json-config
Simulate OS Version (-simulate-os-version)
To test the UI, pass an OS version to this argument to override the check for the currently installed version.
Added in Nudge 2.0
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-simulate-os-version "14.4.1"
Simulate Hardware ID (-simulate-hardware-id)
To test unsupported device workflows, pass a device ID of hardware that does not support the required OS version.
Added in Nudge 2.0
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-simulate-hardware-id "J516cAP"
Simulate Date (-simulate-date)
To test a date and time other than the current date and time. Use the format "YYYY-MM-ddTHH:mm:ssZ".
Added in Nudge 2.0
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-simulate-date "2024-08-01T08:00:00Z"
Disable Random Delay (-disable-random-delay)
For testing, include this argument to avoid the random delay which is now enabled by default in Nudge 2.0
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-disable-random-delay
Custom SOFA Feed URL (-custom-sofa-feed-url)
To ease SOFA testing, you can now pass -custom-sofa-feed-url as an argument to override the built-in preferences and/or custom profile/json.
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge \
-custom-sofa-feed-url "file:///Users/Shared/macos_data_feed.json"