Experimental. Shouldn't be considered production ready yet.
A standalone CLI for reading and creating notes in Apple Notes.
Uses JXA (JavaScript for Automation) for list/search/create and direct SQLite + protobuf access for low-level operations (dump).
Human-readable text output by default; pass --json for structured JSON.
./install.shThis creates ~/bin/nanotes. Make sure ~/bin is in your PATH.
Requires Deno 2+.
Grant Automation access for your terminal to control Notes.app:
- System Settings > Privacy & Security > Automation
- Enable your terminal app -> Notes
If the toggle does not appear, run nanotes folders once and allow the system prompt.
Full Disk Access is required for dump (reads NoteStore.sqlite directly).
List all folders with account name and note count.
nanotes folders
nanotes folders --jsonList notes sorted by modification date (newest first).
nanotes list
nanotes list --folder "Work" --limit 10
nanotes list --jsonShow notes modified recently. Default window is 3 days.
nanotes recent
nanotes recent --since 24h
nanotes recent --since 1w --folder "Work"
nanotes recent --content # include note bodies
nanotes recent --jsonShow notes modified today (since midnight).
nanotes today
nanotes today --content
nanotes today --jsonShow full note content. Default output is plaintext.
nanotes show --id "x-coredata://UUID/ICNote/p1234"
nanotes show --id "x-coredata://UUID/ICNote/p1234" --json
nanotes show --id "x-coredata://UUID/ICNote/p1234" --json --html--html returns the raw HTML body instead of plaintext. Only meaningful with --json.
Search notes by title (case-insensitive).
nanotes search "Shopping"
nanotes search "recipe" --folder "Cooking" --limit 5
nanotes search "recipe" --jsonList attachments on a note.
nanotes attachments --id "x-coredata://UUID/ICNote/p1234"
nanotes attachments --id "x-coredata://UUID/ICNote/p1234" --jsonFull lossless JSON dump of a note: decoded protobuf, metadata, and attachment info. Always outputs JSON.
nanotes dump --id "x-coredata://UUID/ICNote/p1234"Create a new note. --title is required.
nanotes create --title "Meeting Notes" --body "Discussion points..."
nanotes create --title "Ideas" --folder "Work" --json| Flag | Description |
|---|---|
--json |
Output JSON instead of human-readable text |
[
{
"name": "Notes",
"id": "x-coredata://UUID/ICFolder/p1",
"container": "iCloud",
"noteCount": 42
}
][
{
"id": "x-coredata://UUID/ICNote/p1234",
"title": "Shopping List",
"folder": "Notes",
"created": "2026-03-04T10:30:00.000Z",
"modified": "2026-03-04T14:15:00.000Z"
}
]{
"id": "x-coredata://UUID/ICNote/p1234",
"title": "Shopping List",
"folder": "Notes",
"created": "2026-03-04T10:30:00.000Z",
"modified": "2026-03-04T14:15:00.000Z",
"passwordProtected": false,
"body": "Milk\nEggs\nBread"
}[
{
"name": "photo.jpg",
"id": "x-coredata://UUID/ICAttachment/p5678",
"contentIdentifier": "ABC123"
}
]{
"id": "x-coredata://UUID/ICNote/p9999",
"title": "New Note",
"folder": "Notes",
"created": "2026-03-04T16:00:00.000Z"
}See NOTES-INTERNALS.md for documentation of the Apple Notes storage format, protobuf schema, CRDT entries, and sync procedure.
See TEST.md for integration test instructions.
To use as a Claude Code skill:
cd ~/.claude/skills
git clone https://github.com/shareup/nanotes.gitdeno task check # Type-check
deno task test # Run protobuf round-trip tests
deno task run -- foldersMIT