Skip to content

manikanda-kumar/locate

Repository files navigation

Locate Icon

Locate for Mac

Lightning-fast file search for macOS
Find any file instantly with full-text search, advanced filters, and global hotkey access.

macOS 15.0+ Swift 6 Status License


✨ Features

Instant Search

  • Full-text search powered by SQLite FTS5
  • Results in under 100ms
  • Search as you type with live results

Advanced Filters

  • Filter by file type (Documents, Images, Code)
  • Filter by size (>1MB, >10MB, >100MB)
  • Filter by date (Last 24h, 7 days, 30 days)
  • Regex pattern matching
  • Case-sensitive search

Always Available

  • Global hotkey: ⌥Space to search anytime
  • Menu bar quick search
  • Keyboard-driven interface

Powerful Indexing

  • Index multiple folders
  • Configurable exclusion patterns
  • Automatic reindexing (1-24 hour intervals)
  • Progress tracking
  • Graceful handling of unreadable files

Beautiful UI

  • Native SwiftUI interface
  • First-launch onboarding wizard
  • Full Disk Access guidance
  • Comprehensive settings

Secure by Design

  • SQL injection protection via parameterized queries
  • Protected database directory (700 permissions)
  • Concurrent operation guards

🚀 Quick Start

For Users

  1. Download the latest DMG from Releases
  2. Open DMG and drag Locate to Applications
  3. Launch Locate
  4. Follow the onboarding wizard to select folders
  5. Press ⌥Space anytime to search!

For Developers

# Clone and build
git clone <repo-url>
cd locate

# Set up app icon (choose one)
brew install librsvg && ./scripts/generate-icon.sh
# OR: See docs/icon-setup.md for other methods

# Build and run
cd Locate
swift build
.build/debug/Locate

📋 Requirements

  • macOS 15.0 or later
  • Swift 6 toolchain (for building from source)
  • Full Disk Access (optional, for indexing protected folders)

📚 Documentation

All documentation is in docs/:

Release & Distribution:

Testing & QA:

Planning:

⌨️ Keyboard Shortcuts

  • ⌥Space - Show search window (global)
  • ⌘F - Focus search field
  • ⌘R - Rebuild index
  • ⌘, - Open Settings
  • Return / ⌘O - Open selected file
  • Escape / ⌘W - Close window

🛠️ CLI Tool

The included LocateCLI provides command-line access:

Build Index

swift run LocateCLI build-index /path/to/folder [--batch 500]
# Database defaults to ~/Library/Application Support/Locate/locate.db

Search

swift run LocateCLI search "query" [--ext swift,md] [--limit 50] [--min-size 1024]

Examples

# Index home directory
swift run LocateCLI build-index ~

# Find Swift files
swift run LocateCLI search Package --ext swift --limit 10

# Find large files
swift run LocateCLI search data --min-size 10485760

🏗️ Architecture

LocateCore - Search & indexing engine

  • SQLite database with FTS5 full-text search
  • Database stored in ~/Library/Application Support/Locate/ (macOS convention)
  • Async file scanning with exclusions
  • Batched inserts for performance
  • Hardened against unreadable files and SQL injection

LocateViewModel - Application state

  • Observable search state with @Observable
  • Settings persistence via UserDefaults
  • Permission management

Locate - SwiftUI interface

  • Main search interface
  • Settings with 4 tabs (Folders, Exclusions, Indexing, Privacy)
  • Onboarding wizard
  • Menu bar quick search
  • Global hotkey manager

⚡ Performance

Targets:

  • Indexing: 10k files in < 30 seconds
  • Search: Results in < 100ms
  • Memory: < 50MB idle, < 200MB during indexing
  • UI: Always responsive, no lag

🧪 Development

Running Tests

cd Locate
swift test

Building for Release

./scripts/release.sh 1.0.0

See docs/release.md for detailed release process.

🎨 Icon

The app icon features a blue glass macOS-style design with folder and magnifying glass elements. To generate the icon:

brew install librsvg
./scripts/generate-icon.sh

See docs/icon-setup.md for other methods.

📄 License

MIT License - see LICENSE file for details.

🙏 Credits

Built with Swift Package Manager, SQLite FTS5, and macOS SDK. Icon: Custom blue glass design for macOS.


Status: ✅ v1.1.0 production-ready | Hardened & tested

About

locate ui for mac

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •