بنقرة واحدة
osascript-audio
// 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.
// 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.
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).
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.
| name | osascript-audio |
| description | 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. |
System audio control via AppleScript volume commands and system_profiler.
All scripts are pure Python — no JXA needed for basic audio control.
AppleScript volume settings returns a record with all four levels:
output volume — speaker/headphone volume (0–100)input volume — microphone level (0–100)alert volume — system alert sounds (0–100)output muted — booleanGet current volume levels or set output volume (0–100):
uv run scripts/volume.py
uv run scripts/volume.py --set 75
uv run scripts/volume.py --set 0
Mute, unmute, or toggle output audio — --status to check current state:
uv run scripts/mute.py --toggle
uv run scripts/mute.py --on
uv run scripts/mute.py --off
uv run scripts/mute.py --status
List all audio input/output devices via system_profiler SPAudioDataType:
uv run scripts/audio-devices.py
-- get all levels
get volume settings
-- set output volume
set volume output volume 75
-- mute / unmute
set volume with output muted
set volume without output muted