Awesome
launchk
A Cursive TUI that makes XPC queries & helps manage launchd jobs.
Should work on macOS 10.10+ according to the availability sec. in the docs.
<img src="https://user-images.githubusercontent.com/396039/120085936-6700a180-c0aa-11eb-8606-31dc6a3cbe99.gif" width="600">Install
Binaries are available via brew tap:
brew tap mach-kernel/pkgs
brew install mach-kernel/pkgs/launchk
Features
Use :
to enter command mode, /
to enter filtering mode, and any of sguadl
for filtering by [system, global, user, agent, daemon, loaded]. Ctrl-U
to clear, Tab
to complete, Enter
to submit.
- Poll XPC for jobs and display changes as they happen
- Filter by
LaunchAgents
andLaunchDaemons
in scopes (fsnotify watched):- System (/System/Library/)
- Global (/Library)
- User (~/)
load
unload
dumpstate
(opens in$PAGER
)dumpjpcategory
(opens in$PAGER
)procinfo
(opens in$PAGER
, does not require root!)edit
plist in$EDITOR
with support for binary plistscsrinfo
show all CSR flags and their values
xpc-sys
While building launchk, XPC convenience glue was placed in xpc-sys
.
Credits
A big thanks to these open source projects and general resources:
- block Obj-C block support, necessary for any XPC function taking
xpc_*_applier_t
- Cursive
- tokio
- plist
- notify
- bitflags
- libc
- lazy_static
- xcrun
- Apple Developer XPC services
- Apple Developer XPC API reference
- MOXIL / launjctl
- geosnow - A Long Evening With macOS' sandbox
- Bits of launchd - @5aelo
- Audit tokens explained (e.g. ASID)
- objc.io XPC guide
- Fortinet XPC RE article
- This HN comment re history
- The various source links found in comments, from Chrome's sandbox and other headers with definitions for private API functions.
- After all, it is Apple's launchd :>)
Everything else (C) David Stancu & Contributors 2021