macOS Utilities
Platform-specific power
macOS-specific utilities that make the platform shine. These only load on macOS systems.
Application Shortcuts
Quick access to common apps:
| Alias | Application |
|---|---|
code | Visual Studio Code |
subl | Sublime Text |
preview | Preview.app |
xcode | Xcode |
finder | Finder |
chrome | Google Chrome |
safari | Safari |
warp | Warp terminal |
Open apps from the command line. code . to open VS Code in current directory.
Finder Integration
finder — Open in Finder
Open directories in Finder:
finder . # Open current directory
finder ~/Downloads # Open specific pathThe macOS bridge between terminal and GUI.
ql — Quick Look
Preview files without opening them:
ql image.png # Preview image
ql document.pdf # Preview PDF
ql video.mp4 # Preview videoWorks with any file type that Quick Look supports (which is most things).
Hidden Files Toggle
showfiles # Show hidden files in Finder
hidefiles # Hide them againUseful when you need to see .git or .env files in Finder.
Clipboard
clip — Copy to Clipboard
Multiple input methods:
echo "text" | clip # Pipe to clipboard
clip "direct text" # Direct argument
cat file.txt | clip # File contents
pwd | clip # Current directory pathWrapper around pbcopy that's easier to remember.
paste — Paste from Clipboard
Alias for pbpaste:
paste # Output clipboard
paste > file.txt # Save clipboard to filecopy-path — Copy File Path
Copy absolute path of a file:
copy-path file.txt
# Copies: /Users/bliss/project/file.txtPerfect for sharing file locations.
System Control
Volume
mute # Mute audio
unmute # Unmute
set-volume 50 # Set to 50%
set-volume 100 # Maximum volumeControl audio without touching the volume keys.
Display
toggle-dark-mode # Switch between light and dark modeInstant theme switching.
Network
flushdns # Flush DNS cache
wifi-name # Get current WiFi SSIDflushdns fixes "this site can't be reached" 90% of the time.
System Info
macversion # Show macOS version
battery # Battery status (see System docs for detailed version)
list-devices # USB/Bluetooth/Thunderbolt devicesScreenshots
macOS screenshot utilities:
screenshot-area # Select area, save to file
screenshot-area-clipboard # Select area, copy to clipboard
screenshot-screen # Full screen to file
screenshot-window # Select window to file
screenshot-location # Get/set default save locationMore convenient than remembering keyboard shortcuts.
Screen Recording
screen-record output.mov # Record screen to file
gif-from-recording video.mov # Convert to GIF (requires ffmpeg)Record screencasts from the terminal.
Homebrew Services
brew-services — Interactive Manager
Interactive service management with fzf:
brew-services
# fzf selection of brew services
# Shows running/stopped status
# Select to toggle stateNo more remembering service names.
Direct Commands
brew-services-list # List all Homebrew services
brew-start postgres # Start a service
brew-stop postgres # Stop a service
brew-restart postgres # Restart a serviceManage databases, web servers, and other brew services.
App Store (mas)
Requires mas:
app-search "Xcode" # Search Mac App Store
app-install 497799835 # Install by ID (get ID from search)
app-list # List installed App Store appsInstall App Store apps from the terminal. Great for automation.
Developer Tools
xcode-select-install # Install Command Line Tools
vsc # Open VS Code in current directoryvsc is an alias for code .—muscle memory friendly.
Security
unquarantine — Remove Quarantine Flag
Remove the "downloaded from internet" flag:
unquarantine MyApp.app
# Removes quarantine attribute
# App can now run without security promptUseful for apps from unofficial sources. Use responsibly.
DMG Handling
extract-dmg — Mount & Extract
Mount a DMG, copy contents, unmount:
extract-dmg installer.dmg
# Mounts the DMG
# Copies contents to current directory
# Unmounts automaticallyAutomates DMG extraction workflow.
Karabiner Elements
Keyboard customization config in macos/karabiner.json:
- Caps Lock → Escape (tap) / Control (hold)
- Enhanced text editing shortcuts
- Custom application-specific shortcuts
See the karabiner.json config for full mappings.
Yabai Window Management
Tiling window manager (requires SIP disable on some macOS versions):
# Start/stop yabai
yabai --start-service
yabai --stop-service
# Config in macos/yabaircAuto-tile windows like a Linux WM. Game-changer for productivity.
skhd Hotkeys
Keyboard shortcuts for Yabai and other system control:
# Start/stop skhd
skhd --start-service
skhd --stop-service
# Config in macos/skhdrcCommon default bindings:
alt + h/j/k/l— Focus windows (vim-style)shift + alt + h/j/k/l— Move windowsalt + 1-9— Switch to space (desktop) 1-9alt + f— Toggle fullscreenalt + r— Rotate window tree
Check macos/skhdrc for full bindings.
Pro Tips
Learn Quick Look: ql is faster than opening files. Use it for quick file inspection.
Homebrew services: Keep databases (postgres, redis) managed by brew. Easy start/stop/restart.
Clipboard fu: Pipe command output to clip, edit in your editor, paste back. Super workflow.
Dark mode toggle: Map toggle-dark-mode to a keyboard shortcut for instant theme switching.
Flush DNS regularly: After changing network settings or having connection issues. flushdns is magic.
Yabai + skhd: If you're serious about window management, learn these. Vim-style window navigation is addictive.
Use mas for automation: Script your App Store installs. Great for setting up new machines.
Karabiner for keyboard customization: Caps Lock as Escape/Control is life-changing. Never go back to normal caps lock.