You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everyday Mac automations for pls, ready to ask for in plain words. Mac
settings, sound and music, the network, files and images, the clipboard, apps, Xcode and the simulator, Ghostty,
developer chores and reminders.
pls "it's too bright"
pls "free up port 3000"
pls "keep my mac awake for 2 hours"
pls "what's taking up space?"
pls "remind me in 20 minutes to check the oven"
Read before you trust. Each one is a short shell script or AppleScript, and none runs until you've looked at it
and turned it on.
Tested against the model. Each one's description, examples and params were checked against the on-device model
pls uses, so plain requests find it and fill its values correctly.
Get started
Install the collection, turn one on and ask for it:
pls collection add alexmx/pls-automations # everything starts off; answer n to review them later
pls collection enable my-ip # read one and turn it on
pls "what's my ip"
Then:
pls collection review # read what's off and turn on what you trust
pls collection update # get changes; what changed is off until you review it
pls collection disable focus # turn one off
An approval is for the files as you read them, so an update that changes one turns it off until you review it again.
If you have an automation of your own with the same id, yours wins, and this one is still there as
alexmx/pls-automations/<id>.
A few need more, listed in the Notes column: Homebrew, Xcode, your password for sudo, or a permission macOS asks
for the first time (Accessibility, Screen Recording, or "control this app" for the AppleScript ones)
focus and bluetooth need a Shortcut you build once; see below
Start work on a git branch in its own worktree, a folder next to the repo, and open it in a new Ghostty tab; a new branch starts from the default branch
Remove a repo's extra git worktrees whose branch is merged into the default branch, or whose remote branch is gone after a merge, and delete those branches; worktrees with changes are kept
Switch the running iOS simulators to dark or light mode, or change their text size (Dynamic Type), to check how an app's UI holds up; or show the current settings
“what's in this provisioning profile ~/Downloads/App.mobileprovision”
Show what's in an iOS or macOS provisioning profile (app id, team, type, expiry, devices, entitlements), or list the installed profiles and which have expired
Free the disk space Xcode piles up: DerivedData (also fixes stale builds), device support files, old simulators whose iOS version is no longer installed and simulator caches, and Swift package caches; archives are kept
Shut down or restart the Mac now or after some minutes, or cancel a pending one
asks first for shutdown or restart; runs in the background
Setting up focus and bluetooth
macOS has no command for Focus modes or Bluetooth, so these two run a Shortcut you build once in the Shortcuts app.
Until you do, they say so and stop.
Set Bluetooth: an If on Shortcut Input ison with Set Bluetooth: On, and OtherwiseSet Bluetooth: Off. (bluetooth reads the current state itself, so the Shortcut only ever gets on or off.)
Set Focus: Get Dictionary from Input, then Get Dictionary Value for mode and for minutes. For each
Focus you use, an If on mode (e.g. iswork) with Set Focus: Work, On — until Adjust Date (Current
Date + minutes minutes) if you want the time limit. For off, Set Focus actions that turn your Focus modes
off. The choices are do-not-disturb, work, personal, sleep, morning and reduce-interruptions; trim the
@pls.param mode line in automations/focus.sh to the ones you have.
Make one yours
Copy it into ~/.config/pls/automations and change it there: your copy wins, and updates leave it alone.
Contributing
Keep each automation self-contained (no paths into anyone's home, no files outside its own folder) and check it
before opening a pull request:
PLS_HOME=. pls doctor # no problems
PLS_HOME=. pls doctor --examples <id># every example picks it
python3 scripts/update-readme.py # refresh the table
The formats, and how to write descriptions the model routes well, are in the
use-pls skill.