<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>File Search on Jingyuan</title>
        <link>https://jingyuan-zheng.github.io/tags/file-search/</link>
        <description>Recent content in File Search on Jingyuan</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-US</language>
        <copyright>Jingyuan Zheng</copyright>
        <lastBuildDate>Thu, 22 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jingyuan-zheng.github.io/tags/file-search/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>MacHunt for Mac: Find Files with a Native Swift Search App</title>
            <link>https://jingyuan-zheng.github.io/p/machunt-native-file-search/</link>
            <pubDate>Mon, 10 Aug 2026 00:00:00 +0000</pubDate>
            <guid>https://jingyuan-zheng.github.io/p/machunt-native-file-search/</guid>
            <description>&lt;img src=&#34;https://jingyuan-zheng.github.io/img/machunt-native-file-search/search.png&#34; alt=&#34;Featured image of post MacHunt for Mac: Find Files with a Native Swift Search App&#34; /&gt;&lt;p&gt;MacHunt is a local file-search app for macOS that indexes file and folder metadata and presents the results in a native SwiftUI and AppKit interface.&lt;/p&gt;&#xA;&lt;p&gt;When you remember part of a filename but not its folder, a focused result table can be more useful than opening one Finder window after another. &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/MacHunt_SwiftUI&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MacHunt&amp;rsquo;s Swift beta&lt;/a&gt; brings filename search, filters, Quick Look, and file actions into one window (see Figure 1).&lt;/p&gt;&#xA;&lt;p&gt;The repository is a fork of &lt;a class=&#34;link&#34; href=&#34;https://github.com/dacj4n/MacHunt&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;dacj4n/MacHunt&lt;/a&gt;. The original Tauri, React, and Rust version remains in the root; this guide covers the native Mac version in &lt;code&gt;swift_beta/&lt;/code&gt;. It is labelled Beta, so start with folders you use regularly and see how its search fits your files.&lt;/p&gt;&#xA;&lt;div class=&#34;post-figure&#34;&gt;&#xA;&lt;img src=&#34;https://jingyuan-zheng.github.io/img/machunt-native-file-search/search.png&#34; alt=&#34;MacHunt native Swift beta search results&#34;&gt;&#xA;&lt;div class=&#34;caption&#34;&gt;Figure 1: The native beta combines filename results, metadata columns, and filters. Screenshot from the project repository.&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;install-the-native-beta&#34;&gt;Install the native beta&#xA;&lt;/h2&gt;&lt;p&gt;Download the Swift beta DMG from &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/MacHunt_SwiftUI/releases&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Releases&lt;/a&gt;, open it, and drag MacHunt to Applications. The published beta targets Apple silicon and requires macOS 14 or later. It is ad-hoc signed and not notarized, so review the release instructions if macOS blocks the first launch.&lt;/p&gt;&#xA;&lt;p&gt;The app can build its initial index. Choose the folders you actually want to search and review exclusions before indexing everything. A larger scope means more initial scanning, and permissions can prevent some paths from being read.&lt;/p&gt;&#xA;&lt;p&gt;If you mainly want work documents, index that folder first and exclude caches or downloads you never search. Settings shows the index count, live monitoring, and file categories (see Figure 2). Check a smaller collection before widening the scope.&lt;/p&gt;&#xA;&lt;div class=&#34;post-figure&#34;&gt;&#xA;&lt;img src=&#34;https://jingyuan-zheng.github.io/img/machunt-native-file-search/settings.png&#34; alt=&#34;MacHunt settings showing index status and file categories&#34;&gt;&#xA;&lt;div class=&#34;caption&#34;&gt;Figure 2: Check indexing status and categories in Settings. Screenshot from the project repository.&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;For a command-line full-disk build with progress, the README provides:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/Applications/MacHunt.app/Contents/Helpers/machunt&amp;#34;&lt;/span&gt; build --path /&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;Quit the app before that CLI build, wait for completion, then reopen it. The command targets the whole filesystem; it is optional, not a prerequisite for trying a smaller folder collection.&lt;/p&gt;&#xA;&lt;h2 id=&#34;search-filter-then-preview&#34;&gt;Search, filter, then preview&#xA;&lt;/h2&gt;&lt;p&gt;Start with a distinctive part of the filename. Narrow the results by path, category, size, or date. The beta supports filename fragments, wildcard or regular-expression patterns, approximate spelling, and case-sensitive search. You can edit its built-in file categories or add your own.&lt;/p&gt;&#xA;&lt;p&gt;A useful workflow is to find a candidate, press Space for Quick Look, and reveal it in Finder only when you need its surrounding folder (see Figure 3). Files you repeatedly return to can be pinned across launches. Familiar columns, sorting, and multiple selection help when checking several files. Move to Trash is also available in the action menu, so check the path before using it.&lt;/p&gt;&#xA;&lt;div class=&#34;post-figure&#34;&gt;&#xA;&lt;img src=&#34;https://jingyuan-zheng.github.io/img/machunt-native-file-search/quick-look.png&#34; alt=&#34;System Quick Look preview from MacHunt&#34;&gt;&#xA;&lt;div class=&#34;caption&#34;&gt;Figure 3: Use the system Quick Look panel to inspect a result before opening it.&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;know-what-the-index-contains&#34;&gt;Know what the index contains&#xA;&lt;/h2&gt;&lt;p&gt;MacHunt indexes metadata such as names, paths, dates, sizes, Finder tags, and cloud status. It does not index file contents. If the clue you remember is a sentence inside a document, filename search cannot substitute for a content-search index.&lt;/p&gt;&#xA;&lt;p&gt;The index stays locally in &lt;code&gt;~/Library/Caches/MacHuntSwift/index.db&lt;/code&gt;. FSEvents maintains incremental changes, while configurable roots and exclusions let you control scope. A complete rebuild creates a replacement database before switching away from the previous completed index.&lt;/p&gt;&#xA;&lt;p&gt;Online-only iCloud files are another distinction: indexing does not intentionally download their contents, but opening or previewing a result may cause macOS to fetch the file. “Local index” does not mean every result is already available offline.&lt;/p&gt;&#xA;&lt;h2 id=&#34;work-through-a-missing-report-example&#34;&gt;Work through a missing-report example&#xA;&lt;/h2&gt;&lt;p&gt;Suppose you remember &lt;code&gt;budget&lt;/code&gt; but cannot tell whether the report is in Downloads or a project folder. Search that fragment first and inspect the Path column. If many matches appear, restrict the search to your work directory and a document category. Sort by date or size to make unrelated exports easier to distinguish.&lt;/p&gt;&#xA;&lt;p&gt;Select a candidate and press Space to check its title and content. Open it when ready, or Reveal in Finder to inspect nearby attachments. Pin a frequently revisited reference afterward. Clear filenames still matter when several projects or versions appear in the same search.&lt;/p&gt;&#xA;&lt;p&gt;If a fragment returns nothing, try another mode deliberately. A wildcard can help when you remember the extension; fuzzy matching can help with partial letters. Change one condition at a time. Combining path, category, and size restrictions immediately can filter out the file you wanted.&lt;/p&gt;&#xA;&lt;h2 id=&#34;use-the-same-index-from-terminal&#34;&gt;Use the same index from Terminal&#xA;&lt;/h2&gt;&lt;p&gt;The embedded CLI shares the app’s index. These commands inspect its state, search Documents for &lt;code&gt;budget&lt;/code&gt; as JSON, and search a filename pattern. A complete executable path avoids requiring a separate PATH setup:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;cli&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/Applications/MacHunt.app/Contents/Helpers/machunt&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$cli&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$cli&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; search --path &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/Documents&amp;#34;&lt;/span&gt; --json budget&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$cli&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; search --pattern &lt;span class=&#34;s1&#34;&gt;&amp;#39;*.swift&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;Omit &lt;code&gt;--json&lt;/code&gt; for ordinary reading; retain it when another script needs structured results. Quote &lt;code&gt;*.swift&lt;/code&gt; so your shell does not expand it into local filenames before MacHunt receives it. These are searches against the existing index, not new full-disk scans.&lt;/p&gt;&#xA;&lt;h2 id=&#34;check-scope-before-rebuilding&#34;&gt;Check scope before rebuilding&#xA;&lt;/h2&gt;&lt;p&gt;For a known missing file, check index roots, exclusions, hidden-file settings, and active filters. For an external disk, confirm it is connected and accessible in Finder. An indexed path does not prove that its volume is currently online or that a cloud file is downloaded.&lt;/p&gt;&#xA;&lt;p&gt;Try the exact filename with simple settings before changing the index. If it still does not appear, inspect index status and directory permissions. Distinguishing an unscanned location from an over-filtered result is more useful than immediately rebuilding the entire disk.&lt;/p&gt;&#xA;&lt;h2 id=&#34;for-developers-and-command-line-workflows&#34;&gt;For developers and command-line workflows&#xA;&lt;/h2&gt;&lt;p&gt;The bundled CLI shares the native index with the app and supports structured JSON output. Use the embedded executable by its full path unless you have deliberately added it to your shell&amp;rsquo;s PATH.&lt;/p&gt;&#xA;&lt;p&gt;To build the native version yourself:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/Jingyuan-Zheng/MacHunt_SwiftUI.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; MacHunt_SwiftUI/swift_beta&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;swift &lt;span class=&#34;nb&#34;&gt;test&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;scripts/build-app.sh release&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;The source build requires Xcode with Swift 6.2 or later. The old root-level Tauri build is a different path; check which implementation you are building before following commands.&lt;/p&gt;&#xA;&lt;p&gt;For a related Finder usability improvement, see &lt;a class=&#34;link&#34; href=&#34;https://jingyuan-zheng.github.io/p/finder-folder-sizes/&#34; &gt;displaying folder sizes&lt;/a&gt;. Current features and beta limitations are documented in the &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/MacHunt_SwiftUI#readme&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;README&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
