apple-notes-webhooks-events

Featured

Monitor Apple Notes changes using file system events and Shortcuts triggers. Trigger: "apple notes events".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Apple Notes Webhooks & Events ## Overview Apple Notes has no webhook, pub/sub, or event streaming API. To detect changes, you must build your own event system using one of three approaches: (1) JXA polling that compares note snapshots at intervals, (2) file system events (FSEvents) on the NoteStore.sqlite database file for near-real-time change detection, or (3) Apple Shortcuts automations that trigger scripts when specific conditions are met. Each approach has different latency, reliability, and resource consumption tradeoffs. ## Approach 1: JXA Polling (Recommended) ```typescript // src/events/notes-watcher.ts import { execSync } from "child_process"; interface NoteSnapshot { id: string; title: string; modified: string; } let lastSnapshot: Map<string, string> = new Map(); function detectChanges(): { added: string[]; modified: string[]; deleted: string[] } { const current = JSON.parse(execSync( `osascript -l JavaScript -e 'JSON.stringify(Application("Notes").defaultAccount.notes().map(n => ({id: n.id(), title: n.name(), modified: n.modificationDate().toISOString()})))'`, { encoding: "utf8", timeout: 30000 } )) as NoteSnapshot[]; const currentMap = new Map(current.map(n => [n.id, n.modified])); const added = current.filter(n => !lastSnapshot.has(n.id)).map(n => n.title); const modified = current.filter(n => lastSnapshot.has(n.id) && lastSnapshot.get(n.id) !== n.modified ).map(n => n.title); const deleted = [...lastSnapshot.keys()].filter(id...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category