Apple Notes AI Search (macOS)

πŸ”’ Security & Privacy First

Your OpenAI API key and notes are never sent to any server other than OpenAI’s. This app runs fully locally on your Mac:

We value your trust. If you have concerns, please check the source code or raise issues in GitHub Issues.

SemanticSearch - Apple Notes AI Search

A macOS menu bar application that provides semantic search for Apple Notes using local embeddings and OpenAI's text-embedding-3-small model.

Download

πŸ‘‰ Download for macOS (DMG)

First run (not notarized): after dragging the app to Applications, right‑click SemanticSearch.app β†’ Open β†’ Open once.

Demo

SemanticSearch demo screenshot

Features

Architecture

Python Backend (app/)

SwiftUI Frontend (SemanticSearchMenuBar/)

Quick Start

Development Setup

# Create virtual environment
python3.11 -m venv venv_notes
source venv_notes/bin/activate
pip install -U pip
pip install -r requirements.txt

API Key Configuration

# .env at repo root
OPENAI_API_KEY=your_openai_api_key

Run the App

CLI Usage (Development)

# Interactive CLI
python3 app/cli.py

# Commands available:
# sync          - Scan and index notes
# sync all      - Full re-index
# watch         - Auto-sync on file changes
# list          - List indexed notes
# open <id>     - Open specific note
# refresh-meta all - Refresh metadata

Manual full backfill (CLI)

python3 -u "/Users/siddharthasehgal/Documents/Work/SearchNotes/SemanticSearchMenuBar/SemanticSearch/Resources/bridge.py" sync --days 3650 --full | tail -n 1

Packaging & Distribution

Build Distributable App

# Ensure venv is up-to-date
python3.11 -m venv venv_notes
venv_notes/bin/pip install -U pip
venv_notes/bin/pip install -r requirements.txt

# OpenAI API key
export OPENAI_API_KEY=your_openai_api_key
# or create a .env at repo root with: OPENAI_API_KEY=...
/bin/bash SemanticSearchMenuBar/Scripts/package.sh | cat

Optional Notarization

export NOTARIZE=1
export NOTARY_PROFILE=your_keychain_profile
bash SemanticSearchMenuBar/Scripts/package.sh

Auto-Start on Login

bash SemanticSearchMenuBar/Scripts/install_launch_agent.sh

Using the App (End Users)

Data Storage

Permissions Required

Reset Automation permission via CLI

# Reset Apple Events permissions for the app (bundle id)
tccutil reset AppleEvents okaysidd.SemanticSearch

# Then quit and relaunch the app; the next Notes action will prompt again

Notes:

Technical Details

Search Process

  1. User types query in menu bar interface
  2. Query is sent to Python backend via bridge
  3. Backend generates embedding for query
  4. Vector similarity search against indexed notes
  5. Results stream back with confidence scores
  6. Most relevant lines extracted from matching notes

Sync Process

  1. On first launch: Full scan of all notes
  2. Subsequent launches: Incremental sync since last run
  3. Background sync: Continuous monitoring for changes
  4. Smart caching: Only re-embed notes that have changed

Bridge Communication

Development

Project Structure

SearchNotes/
β”œβ”€β”€ app/                          # Python backend
β”‚   β”œβ”€β”€ notes.py                  # Core sync/search logic
β”‚   β”œβ”€β”€ vector_store.py           # Vector storage
β”‚   β”œβ”€β”€ cli.py                    # Command-line interface
β”‚   └── watcher.py                # File system monitoring
β”œβ”€β”€ SemanticSearchMenuBar/        # SwiftUI app
β”‚   β”œβ”€β”€ SemanticSearch.xcodeproj  # Xcode project
β”‚   β”œβ”€β”€ Bridge/                   # Swift-Python bridge
β”‚   β”œβ”€β”€ Views/                    # SwiftUI views
β”‚   └── Scripts/                  # Build and packaging scripts
└── requirements.txt              # Python dependencies

Building from Source

  1. Clone repository
  2. Set up Python environment (see Quick Start)
  3. Open Xcode project
  4. Build and run

License

This project is for personal use. Please ensure you have appropriate OpenAI API access and comply with Apple's developer guidelines for distribution.