### Build and install FSearch CLI Source: https://github.com/zeusinsight/findersearch/blob/main/vendor/fsearch/README.md Builds the release binary and installs it to ~/.local/bin/fsearch. Then shows example commands for name search and content search. ```bash cargo build --release && ./target/release/fsearch install # -> ~/.local/bin/fsearch fsearch fsearch main # find files by name fsearch 'ext:rs grep:apply_dir' # search inside files ``` -------------------------------- ### Package FinderSearch as a disk image Source: https://github.com/zeusinsight/findersearch/blob/main/docs/USAGE.md Run this script to create a disk image containing the app, an Applications shortcut, installation instructions, and a SHA-256 checksum. The image is written to dist/ and labeled with the build architecture. ```shell ./scripts/package-dmg.sh ``` -------------------------------- ### FSearch query examples Source: https://github.com/zeusinsight/findersearch/blob/main/vendor/fsearch/README.md Shows various query syntaxes for filtering by folder, type, size, modification time, extension, regex, symbol, globs, and git status. ```bash fsearch 'readme in:~/Developer' # inside a folder fsearch 'type:image size:>5mb mtime:<7d' fsearch 'ext:rs regex:fn\s+\w+_dir' # regex inside files fsearch 'sym:apply_dir' # where it's defined fsearch 'src/**/*.{c,h} !test/ init' # globs, in or out fsearch 'git:modified in:~/Developer/app' ``` -------------------------------- ### Use FSearch as a Rust crate Source: https://github.com/zeusinsight/findersearch/blob/main/vendor/fsearch/README.md Shows how to start the engine and perform a search using the fsearch crate. ```rust let engine = fsearch::Engine::start(fsearch::Options { dir: fsearch::default_dir(&home), home: home.clone(), skip: None })?; let hits = engine.search(&fsearch::Query::parse("fsearch main", &home)?)?; ``` -------------------------------- ### Run reindex script Source: https://github.com/zeusinsight/findersearch/blob/main/docs/USAGE.md Run this script after changing permissions to rebuild the index. It stops the project's daemon and moves the old index to a timestamped backup. It refuses to run if a running app or daemon from another installation is detected. ```sh python3 scripts/reindex.py ``` -------------------------------- ### Build and run FinderSearch Source: https://github.com/zeusinsight/findersearch/blob/main/docs/USAGE.md Run these commands from the repository root to build the app and open it. The build script compiles the vendored engine and native app, embeds the helper and license, and verifies the ad-hoc signature. Quit and reopen the app after rebuilding. ```shell ./scripts/build.sh open dist/FinderSearch.app ``` -------------------------------- ### Verify engine integration with Python script Source: https://github.com/zeusinsight/findersearch/blob/main/CONTRIBUTING.md After launching the app and waiting for indexing, run this script to verify real engine integration. Requires a running daemon and permission to index the home folder. ```sh python3 scripts/verify_engine.py ``` -------------------------------- ### Run benchmark script Source: https://github.com/zeusinsight/findersearch/blob/main/docs/benchmarks/README.md Command to reproduce the benchmark from the repo root. Requires Python 3, Swift development tools, and working Spotlight indexing. Aborts if index is unavailable or results are unequal. ```sh python3 scripts/benchmark_search.py --files 10000 --runs 30 --output docs/benchmarks/search.json ``` -------------------------------- ### Build FinderSearch from source with build.sh Source: https://github.com/zeusinsight/findersearch/blob/main/README.md Clone the repository, run the build script, and open the built app. Requires macOS 15+, Xcode 16+ or compatible Command Line Tools, and Rust 1.85+ / Cargo. The build bundles fsearch automatically. ```sh git clone https://github.com/zeusinsight/FinderSearch.git cd FinderSearch ./scripts/build.sh open dist/FinderSearch.app ``` -------------------------------- ### Run release tests and build script Source: https://github.com/zeusinsight/findersearch/blob/main/CONTRIBUTING.md Run the test suite in release mode and execute the build script. These are the primary checks before submitting changes. ```sh swift test -c release ./scripts/build.sh ``` -------------------------------- ### Run Swift tests and verify engine Source: https://github.com/zeusinsight/findersearch/blob/main/docs/USAGE.md Run the Swift test suite in release configuration and execute the engine verification script. Engine checks require a running app/daemon and an indexed home folder; they create and remove isolated fixtures. ```sh swift test -c release python3 scripts/verify_engine.py ``` -------------------------------- ### Format Swift code with swift-format Source: https://github.com/zeusinsight/findersearch/blob/main/CONTRIBUTING.md Format the Swift codebase in place and then lint it strictly. Requires swift-format in your toolchain. The root .swift-format config defines the formatting. ```sh swift format format --in-place --recursive Package.swift Sources Tests swift format lint --strict --recursive Package.swift Sources Tests ``` -------------------------------- ### FSearch JSON API over socket Source: https://github.com/zeusinsight/findersearch/blob/main/vendor/fsearch/README.md JSON lines protocol for querying, grepping, opening files, and listing recent files. Used over the Unix socket or via fsearch stdio. ```json {"q": "fsearch main", "limit": 20, "offset": 20} {"op": "grep", "pattern": "apply_dir", "in": "~/Developer", "context": 2} {"q": "main.rs", "boost": true, "near": "~/Developer/app/src/lib.rs", "git": true} {"op": "open", "path": "~/Developer/app/src/main.rs"} {"op": "recent", "in": "~/Developer/app"} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.