A fully local macOS search tool for files and folders, with both CLI and native GUI (Tauri + React). No HTTP backend service is required.
- GUI:
v0.2.5 - CLI/Core:
v0.2.5
- Added conditional automatic
VACUUMafter rebuild to keep long-term DB size growth under control. - Added settings switch for rebuild-time auto
VACUUM(enabled by default), with GUI persistence. - The number of search results displayed is limited to 500.
- Build / rebuild local index
- Search by substring or wildcard pattern
- File-only / folder-only filtering
- Path-prefix filtering
watchmode with FSEvents incremental updatesoptimize --vacuumfor DB maintenance
- Instant local search (no server)
- Regex toggle + case-sensitive toggle
- Path filter: manual input + suggestion dropdown + Finder picker
- Auto watcher start on app launch
- Build / rebuild controls
- Multi-tab category filter (all/files/folders/documents/images/media/code/archives)
- Click-to-sort on table headers (name/path/type/size/modified)
- Draggable column splitters with persisted widths
- Single/multi selection (
Shiftrange,Cmdadditive) - Keyboard row navigation (
ArrowUp/ArrowDown) - Space-triggered Quick Look preview (multi-selection supported)
- Double-click to open files/folders
- Context menu actions:
- Open
- Open With... (Finder / QSpace Pro / Terminal / WezTerm)
- Copy name / path
- Copy all selected names / paths
- Move to Trash
- Theme settings (system/light/dark)
- Language settings (zh/en)
- Global shortcut settings for show/hide window
- Startup settings: launch at login + silent startup (applies to auto-launch only)
- Index maintenance settings: enable/disable auto
VACUUMafter rebuild - Excluded-directory settings:
- Exact directory rules + regex/wildcard rules
- Finder picker for exact rules
- Rules are persisted and applied during build/rebuild
- Core: Rust
- CLI: Clap
- GUI frontend: React 18 + TypeScript + Vite
- GUI container: Tauri 2
- Global shortcut:
tauri-plugin-global-shortcut - Storage: SQLite (
rusqlite, WAL mode) - In-memory index:
DashMap<String, Vec<PathBuf>> - Scanner: WalkDir + Crossbeam channels
- Watcher: macOS FSEvents (CoreServices)
src/: shared core engine used by both CLI and GUIsrc-tauri/: Tauri backend commands and window/menu lifecyclesrc/App.tsx: GUI application logic and interactions
- macOS 10.15+
- Rust 1.70+
- Node.js 18+
- npm 9+
git clone https://github.com/dacj4n/MacHunt.git
cd MacHuntcargo build --release
./target/release/machunt --helpnpm install
npm run tauri devnpm run build
npm run tauri build- Only builds frontend assets (TypeScript + Vite)
- Outputs static files to
dist/ - Does not compile Rust backend
- Does not produce
.app/.dmg
- Builds the full desktop app package
- Runs
beforeBuildCommandinsrc-tauri/tauri.conf.jsonfirst (currentlynpm run build) - Compiles Rust code under
src-tauri/ - Generates installable artifacts such as
.app/.dmg
Use the following command to generate multi-size app icons from a 1024x1024 source image:
npm run tauri icon src-tauri/icons/app-icon-1024.pngNotes:
- The source image should be square, preferably
1024x1024. - This command generates platform icon assets under
src-tauri/icons/. - After regeneration,
npm run tauri buildwill bundle the updated icons automatically (as referenced bysrc-tauri/tauri.conf.json).
Syntax:
machunt [OPTIONS] [QUERY] [COMMAND]Top-level options:
-p, --path <PATH>: path prefix filter (.means none)-r, --regex: wildcard pattern mode--folder: folders only--file: files only--logs: write logs to~/.machunt/logs[QUERY]: search query when no subcommand is used
Selection rule:
- no
--fileand no--folder=> include both files and folders - only
--file=> files only - only
--folder=> folders only
Subcommands:
machunt build [OPTIONS]-p, --path <PATH>: build only this scope--rebuild: clear old index first--include-dirs <true|false>: include directories (defaulttrue)
machunt watch- Starts FSEvents watcher
- Replays from last EventID when available
- Enters interactive search loop
machunt optimize [--vacuum]- Always runs WAL checkpoint
- Optional
--vacuumto reclaim DB file space
Wildcard rules (--regex):
*=> any chars except/**=> any chars including/?=> one char except/{a,b}=>aorb
- DB:
~/.machunt/data/index.db - GUI settings:
~/.machunt/gui/settings.json(shortcut + launch-at-login + silent-start + auto-vacuum-on-rebuild + excluded-directory rules) - Exclude directory rules: stored in
~/.machunt/gui/settings.json(excludeExactDirs/excludePatternDirs) - Logs:
~/.machunt/logs/
Common reasons:
- Large file count (often millions)
- Directory indexing enabled by default
- Long path strings dominate storage
dirs + filesrelational structure still stores large cardinality- WAL files (
index.db-wal) can temporarily become large during writes
Maintenance:
machunt optimize --vacuumMIT