A Nushell module that wraps common macOS automation primitives (osascript, pbcopy/pbpaste, say, shortcuts, pmset, open) into idiomatic, pipeline-friendly Nushell commands with completions.
Pure Nushell — no external dependencies beyond the macOS system tools that ship with the OS.
- macOS
- Nushell 0.90+ (anything recent should work)
Clone the repo somewhere on your machine:
git clone https://github.com/kiil/nushell-macify.git ~/nushell-macifyThen load the module from your config.nu:
use ~/nushell-macify/macifyOr import individual submodules:
use ~/nushell-macify/macify notify
use ~/nushell-macify/macify clipboardThe top-level macify module re-exports the following submodules.
macify notify "Build finished"
macify notify "Tests failed" --title "CI" --sound SosumiSound name is tab-completed from the standard system sounds.
Wrapper around say(1). Accepts text as an argument or from the pipeline.
macify say "Hello world"
"piped text" | macify say --voice Samantha --rate 200
macify say "save me" --output out.aiffVoice completions are populated from say -v '?'.
macify clipboard # get clipboard contents
macify clipboard "hello" # set
"piped" | macify clipboard # set from pipe
macify clipboard get
macify clipboard set "hello"
macify clipboard clearmacify dialog ask "What's your name?" --title "Hi" --default "World"
macify dialog ask "Password:" --hidden
macify dialog confirm "Proceed?" # -> true / false
macify dialog alert "Something happened"
macify dialog choose ["red" "green" "blue"] --prompt "Pick a color"
macify dialog choose ["a" "b" "c"] --multiple
macify dialog file # -> POSIX path
macify dialog folderCancellation returns null (or false for confirm).
macify volume get # 0-100
macify volume 50 # set (positional)
50 | macify volume # set from pipe
macify volume set 75
macify volume mute
macify volume unmute
macify volume toggle
macify volume muted? # -> boolmacify frontapp # name of frontmost app
macify frontapp list # all visible app names
macify frontapp activate "Safari"
macify frontapp quit "TextEdit"
macify frontapp hide "Finder"App-name arguments are tab-completed from /Applications.
Auto-detects which browser is frontmost (Safari, Chrome, Arc, Brave, Edge), with a --browser override.
macify browser # { browser, url, title, content } of front tab
macify browser --reader # Safari: toggle Reader View first for cleaner content
macify browser url
macify browser title
macify browser content # innerText of active tab
macify browser content --reader # Safari only
macify browser tabs # all tabs in front window
macify browser open "https://example.com"
macify browser open "https://example.com" --browser "Arc"Note: Safari requires "Allow JavaScript from Apple Events" to be enabled in the Develop menu for tab introspection.
macify shortcut list
macify shortcut "My Shortcut"
"input text" | macify shortcut "My Shortcut"
macify shortcut "My Shortcut" --output result.txt
macify shortcut view "My Shortcut"macify darkmode # -> bool, is dark mode on?
macify darkmode toggle
macify darkmode on
macify darkmode offmacify power lock
macify power display-sleep
macify power sleep
macify power logout # shows confirmation dialog
macify power restart # shows confirmation dialog
macify power shutdown # shows confirmation dialogNotify when a long-running command finishes:
cargo build; macify notify $"Build done at (date now | format date '%H:%M')"Speak the title of whatever you're looking at in the browser:
macify browser title | macify sayPick a file via dialog and copy its path:
macify dialog file | macify clipboardToggle dark mode at sunset, with a notification:
macify darkmode toggle
macify notify $"Dark mode: (macify darkmode)"MIT