com um clique
osascript-apps
// Script macOS apps via AppleScript/JXA: Mail, Calendar (EventKit attendees), Notes, Reminders, Finder (disk/file info), and Spotlight/mdfind (full-text and metadata search across the file system).
// Script macOS apps via AppleScript/JXA: Mail, Calendar (EventKit attendees), Notes, Reminders, Finder (disk/file info), and Spotlight/mdfind (full-text and metadata search across the file system).
Control macOS system audio via osascript. Use when getting or setting system volume, toggling mute, listing audio input/output devices, or checking which device is the default output.
Automate Google Chrome with osascript/JXA. Use when listing/focusing/closing/navigating/reloading tabs, muting tabs, managing windows, executing JavaScript, scraping page content, extracting links, filling forms, reading localStorage/cookies/audio state, or reading Chrome history/bookmarks/downloads/extensions/profiles.
Read and write the macOS clipboard with full type support. Use when reading clipboard text, HTML, RTF, images, or file paths (Finder copy); writing rich content; detecting clipboard changes via changeCount; or intercepting content between copy and paste.
Read macOS app SQLite databases directly. Use when reading iMessage chat history, Chrome browsing history, Safari history, or any local app SQLite DB. Always copy the DB before querying — most apps lock the file while running.
Create and manage macOS LaunchAgents and LaunchDaemons. Use when setting up background automation, scheduled tasks, file watchers (WatchPaths), interval polling, or persistent daemons that survive logout or reboot.
Inspect macOS network state. Use when getting current WiFi SSID, signal strength, and channel; listing all network interfaces with IP/MAC addresses; or watching for network connect/disconnect events via Darwin notifications.
App scripting with confirmed-working patterns for Mail, Calendar, Finder, Notes, Reminders, and Spotlight. All scripts are Python with AppleScript/JXA embedded as strings.
| App | API | What's accessible |
|---|---|---|
| AppleScript dictionary | Inbox, search, attachments, accounts, all message properties | |
| Calendar | AppleScript (surface) | Title, dates, location, status |
| Calendar | EventKit ObjC (full depth) | + Attendees, organizer, recurrence, alarms |
| Finder | AppleScript dictionary | Disk volumes, file metadata, desktop contents |
| Spotlight | mdfind via shell | Full-text search, metadata queries across indexed files |
| Notes | AppleScript dictionary | Note titles, body, creation/modification dates |
| Reminders | AppleScript dictionary | Title, completed state, due date, list |
| Shortcuts | AppleScript (minimal) | Name, ID, action count only — content is opaque |
run shortcut returns missing value unless shortcut has accepts input: true AND ends with "Stop and Output" action.unknown indexing state. Check with mdutil -s /path.kTCCServiceAddressBook. First use may prompt.Read recent Mail inbox messages with full properties:
uv run scripts/mail-read.py
uv run scripts/mail-read.py 20
Search Mail inbox by subject or sender keyword:
uv run scripts/mail-search.py "invoice"
uv run scripts/mail-search.py "from:boss@example.com"
Today's (or next N days') calendar events via EventKit ObjC — includes attendees:
uv run scripts/calendar-today.py
uv run scripts/calendar-today.py 7
Search files by name, content, kind, or date via mdfind:
uv run scripts/spotlight-search.py "budget 2024"
uv run scripts/spotlight-search.py "kind:pdf date:today"
Disk volumes with capacity/free space, or metadata for a specific path:
uv run scripts/finder-info.py
uv run scripts/finder-info.py ~/Documents/report.pdf
Read recent Apple Notes titles and dates — --filter by title keyword:
uv run scripts/notes-read.py
uv run scripts/notes-read.py 20 "meeting"
Read incomplete (or all) reminders from default list or a named list:
uv run scripts/reminders-read.py
uv run scripts/reminders-read.py --all
uv run scripts/reminders-read.py --list "Groceries"
get properties, Finder, Shortcuts limits