This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
pnpm build # Compile TypeScript to dist/
pnpm dev # Watch mode for development
pnpm typecheck # Type check without emitting
pnpm lint # Run oxlint
pnpm test # Run tests
pnpm test:watch # Run tests in watch modeDual-mode CLI/MCP tool for searching Apple Reminders:
src/
├── index.ts # Entry point - routes to CLI or MCP mode based on --mcp flag
├── cli.ts # Commander-based CLI (search, lists, pending, completed, etc.)
├── mcp.ts # MCP server exposing tools via @modelcontextprotocol/sdk
├── indexer.ts # Builds search indexes from ~/Library/Group Containers/group.com.apple.reminders/
├── searcher.ts # Queries indexes with fuzzy matching via MiniSearch
├── formatter.ts # Terminal output formatting with chalk
└── types.ts # Shared types and Apple date conversion utilities
Data flow:
indexer.tsreads Apple's Reminders SQLite databases (multiple Data-*.sqlite files)- Creates two indexes in
~/.reminders/: FTS5 SQLite for exact search, MiniSearch JSON for fuzzy matching searcher.tsqueries MiniSearch for fuzzy results, or SQLite directly for filtered queries
Key dependencies:
better-sqlite3: Read Apple Reminders DB and create FTS5 indexminisearch: Fuzzy search with typo tolerance@modelcontextprotocol/sdk: MCP server for Claude Code integration
reminders index # Build or update search index
reminders search <query> # Fuzzy search reminders
reminders lists # Show all lists with counts
reminders list <name> # Show reminders in a list
reminders pending # Show pending reminders
reminders completed # Show recently completed
reminders flagged # Show flagged reminders
reminders due # Show reminders due soon
reminders stats # Show index statistics
reminders --mcp # Start as MCP serverWhen running as MCP server (--mcp flag), exposes these tools:
search_reminders: Fuzzy search with optional filtersget_pending_reminders: Get incomplete remindersget_completed_reminders: Get recently completedget_flagged_reminders: Get flagged remindersget_due_reminders: Get reminders due within N dayslist_reminder_lists: List all lists with countsget_list_reminders: Get reminders in a specific listget_reminder_stats: Get index statistics
When asked to "bump version to X" or "tag vX.Y.Z":
- Update
package.jsonversion field to the new version - Commit:
git add package.json && git commit -m "chore: bump version to X.Y.Z" - Tag:
git tag vX.Y.Z - Push:
git push && git push origin vX.Y.Z
First-time setup:
- Create GitHub repo and push code
- Add NPM_TOKEN secret to GitHub repo settings
- Create
.github/workflows/publish.ymlfor automated publishing