apple-notes-sdk-patterns

Featured

Apply production-ready patterns for Apple Notes JXA/AppleScript automation. Trigger: "apple notes patterns".

AI & Automation 2,926 stars 433 forks Updated yesterday 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 SDK Patterns ## Overview Production patterns for Apple Notes automation: JXA wrapper class, error handling, batch operations, and cross-account support. ## Instructions ### Step 1: JXA Client Wrapper (Node.js) ```typescript // src/notes-client.ts import { execSync } from "child_process"; class AppleNotesClient { private runJxa(script: string): string { const escaped = script.replace(/'/g, "\\'"); return execSync(`osascript -l JavaScript -e '${escaped}'`, { encoding: "utf8", timeout: 30000, }).trim(); } listNotes(folder?: string, limit: number = 50): Array<{ id: string; title: string; modified: string }> { const script = folder ? `const Notes = Application("Notes"); const f = Notes.defaultAccount.folders().find(f => f.name() === "${folder}"); (f ? f.notes() : []).slice(0, ${limit}).map(n => JSON.stringify({id: n.id(), title: n.name(), modified: n.modificationDate().toISOString()})).join("\\n")` : `const Notes = Application("Notes"); Notes.defaultAccount.notes().slice(0, ${limit}).map(n => JSON.stringify({id: n.id(), title: n.name(), modified: n.modificationDate().toISOString()})).join("\\n")`; return this.runJxa(script).split("\n").filter(Boolean).map(l => JSON.parse(l)); } createNote(title: string, body: string, folder?: string): string { const folderPart = folder ? `let f = account.folders().find(f => f.name() === "${folder}"); if (!f) { f = Notes.Folder({name: "${folder}"}); account.folders....

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category