Unload a user agent:
launchctl unload <.plist file path>
Or just use LaunchControl
Remove a user agent:
trash <.plist file path>
This assumes the trash command exists.
Get domain name of an app:
mdls -name kMDItemCFBundleIdentifier -raw <app path>
Get all preferences for a certain domain:
defaults read <domain>
Get a certain preference value:
defaults read <domain> <preference>
Write (or update) a preference value:
defaults write <domain> <preference> <type> <value>
Get UTI (Uniform Type Identifier) of a file:
mdls -name kMDItemContentType -raw <file path>