From apple-notes-pack
Monitors Apple Notes changes on macOS via file system events, Shortcuts triggers, or JXA polling with osascript. Trigger: 'apple notes events'. Useful for automation lacking native webhooks.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin apple-notes-packThis skill is limited to using the following tools:
Apple Notes has no webhook API. Monitor changes using: (1) File system watching on the Notes database, (2) Apple Shortcuts automation triggers, or (3) Periodic polling via JXA.
Automates Apple Notes on macOS: create, read, list, search, and delete using JXA and AppleScript via osascript. For learning scripting or testing note access.
Manages Apple Notes on macOS: create, search, read, update, delete notes; list and organize folders/accounts via MCP tools. Use for notes-related tasks.
Manages Apple Notes on macOS via memo CLI: create, view, edit, delete, search, move, export notes. For terminal-based note CRUD and organization.
Share bugs, ideas, or general feedback.
Apple Notes has no webhook API. Monitor changes using: (1) File system watching on the Notes database, (2) Apple Shortcuts automation triggers, or (3) Periodic polling via JXA.
// 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" }
)) 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 => !currentMap.has(id));
lastSnapshot = currentMap;
return { added, modified, deleted };
}
// Poll every 60 seconds
setInterval(() => {
const changes = detectChanges();
if (changes.added.length || changes.modified.length || changes.deleted.length) {
console.log("Changes detected:", changes);
}
}, 60000);