{"id":50932,"date":"2026-02-05T14:17:58","date_gmt":"2026-02-05T19:17:58","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=50932"},"modified":"2026-02-05T14:17:58","modified_gmt":"2026-02-05T19:17:58","slug":"aequery","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/02\/05\/aequery\/","title":{"rendered":"AEQuery"},"content":{"rendered":"<p><a href=\"https:\/\/markalldritt.com\/?p=1368\">Mark Alldritt<\/a> (<a href=\"https:\/\/mstdn.ca\/@alldritt\/116015149016938083\">Mastodon<\/a>):<\/p>\n<blockquote cite=\"https:\/\/markalldritt.com\/?p=1368\">\n<p>I&rsquo;ve released a new command-line tool called AEQuery. It queries scriptable macOS applications using XPath-like expressions, translating them directly into Apple Events.<\/p>\n<p>The short version: you describe what you want using a slash-delimited path, and AEQuery resolves the SDEF terminology, constructs the Apple Events, and returns the results as JSON.<\/p>\n<p>[&#8230;]<\/p>\n<p>The code is on <a href=\"https:\/\/github.com\/alldritt\/aequery\">GitHub<\/a>. There&rsquo;s also a discussion thread on <a href=\"https:\/\/www.macscripter.net\/t\/aequery-a-command-line-tool-for-querying-scriptable-applications-using-an-xpath-like-expressions\/77708\">MacScripter<\/a> if you&rsquo;ve got questions or feedback.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/01\/03\/jq-and-xmlstarlet\/\">jq and XmlStarlet<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/06\/09\/plutil-enhanced-in-catalina\/\">plutil Enhanced in Catalina<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Mark Alldritt (Mastodon): I&rsquo;ve released a new command-line tool called AEQuery. It queries scriptable macOS applications using XPath-like expressions, translating them directly into Apple Events. The short version: you describe what you want using a slash-delimited path, and AEQuery resolves the SDEF terminology, constructs the Apple Events, and returns the results as JSON. [&#8230;] The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-02-05T19:18:02Z","apple_news_api_id":"612737ce-cee7-456d-a987-8d80edb26b27","apple_news_api_modified_at":"2026-02-05T19:18:02Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AYSc3zs7nRW2ph42A7bJrJw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[159,507,30,2742,74,71,866],"class_list":["post-50932","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-applescript","tag-json","tag-mac","tag-macos-tahoe-26","tag-opensource","tag-programming","tag-xml"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/50932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=50932"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/50932\/revisions"}],"predecessor-version":[{"id":50933,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/50932\/revisions\/50933"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=50932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=50932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=50932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}