Skip to content

Instantly share code, notes, and snippets.

@jesselawson
Created December 8, 2024 18:59
Show Gist options
  • Save jesselawson/763875a2fe3a7579db8e2be4c9056f25 to your computer and use it in GitHub Desktop.
Save jesselawson/763875a2fe3a7579db8e2be4c9056f25 to your computer and use it in GitHub Desktop.
Copy and paste this into your Mac terminal to get a list of Apple UTIs understood by your system
plutil -convert json -o - /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist | jq -r '.UTExportedTypeDeclarations[] | select(type=="object") | "UTI: \(.UTTypeIdentifier // "Unknown")\nDescription: \(.UTTypeDescription // "No description")\n" + if .UTTypeConformsTo then "Conforms to:\n" + (if (.UTTypeConformsTo | type) == "array" then .UTTypeConformsTo[] else .UTTypeConformsTo end | " - \(.)\n") else "" end + if .UTTypeTagSpecification then "Tags:\n" + (.UTTypeTagSpecification | to_entries[] | if (.value | type) == "array" then " \(.key):\n" + (.value[] | " - \(.)\n") else " \(.key): \(.value)\n" end) else "" end + "----------------------------------------\n"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment