Skip to main content

@bixu/launchd

v2026.04.23.33

Manage macOS launchd daemons: lifecycle, observability, plist management, discovery, and reporting

Repository

https://github.com/bixu/swamp-launchd

Labels

macoslaunchddaemonplist

Contents

Quality score

How well-documented and verifiable this extension is.

Not yet scored.

A score will be generated the next time this extension is published. The owner can also trigger scoring manually.

Install

$ swamp extension pull @bixu/launchd

@bixu/launchdv2026.03.20.2launchd_daemon.ts

Global Arguments

ArgumentTypeDescription
labelstringThe launchd job label (e.g., com.example.mydaemon)
plistPath?stringPath to the plist file. If omitted, searches standard launchd directories.
domainenumThe launchd domain (system, gui, user)
loadLoad (bootstrap) the daemon into launchd
unloadUnload (bootout) the daemon from launchd
enableEnable the daemon (persists across reboots)
disableDisable the daemon (persists across reboots, does not unload)
startStart (kickstart) the daemon
ArgumentTypeDescription
forcebooleanForce restart even if already running (-k flag)
stopStop the daemon by sending SIGTERM
restartRestart the daemon (stop + start)
syncRefresh stored daemon state from launchctl
detailGet detailed daemon info: program, environment, mach services, limits
blameShow why and how the daemon was started
diagnoseDiagnose daemon issues: check exit codes, plist validity, loaded state
logsFetch daemon logs from macOS unified logging
ArgumentTypeDescription
linesnumberMax number of log lines to return
levelenumMinimum log level
sincestringTime window (e.g., 1h, 30m, 1d)
plistInfoParse and validate the plist file for this daemon
createPlistGenerate a new plist file for a launchd daemon
ArgumentTypeDescription
outputPathstringPath to write the plist file (relative to repo or absolute)
programArgumentsarrayCommand and arguments to run
runAtLoadboolean
keepAliveboolean
startInterval?numberRun every N seconds
startCalendarInterval?recordCron-like schedule (Hour, Minute, Weekday, etc.)
watchPaths?arrayPaths to watch for changes
environmentVariables?record
workingDirectory?string
standardOutPath?string
standardErrorPath?string
listList daemons loaded in the domain, filtered by status and pattern
ArgumentTypeDescription
outputPathstringPath to write the plist file (relative to repo or absolute)
programArgumentsarrayCommand and arguments to run
runAtLoadboolean
keepAliveboolean
startInterval?numberRun every N seconds
startCalendarInterval?recordCron-like schedule (Hour, Minute, Weekday, etc.)
watchPaths?arrayPaths to watch for changes
environmentVariables?record
workingDirectory?string
standardOutPath?string
standardErrorPath?string
vendorsReport daemons grouped by software vendor
ArgumentTypeDescription
statusenum
scanScan plist directories to discover all installed daemons (loaded or not)
ArgumentTypeDescription
patternstringFilter pattern for labels
orphansFind orphaned daemons: loaded but no plist on disk, or plist exists but not loaded
ArgumentTypeDescription
patternstringFilter pattern for labels
diffCompare plist on disk vs loaded state in launchd (drift detection)
healthCheck health of daemons with KeepAlive or RunAtLoad that should be running
ArgumentTypeDescription
patternstringFilter pattern for labels
processesShow CPU and memory usage for running daemon processes
ArgumentTypeDescription
patternstringFilter pattern for labels
startupReport all daemons configured to start at login/boot (RunAtLoad or KeepAlive)
ArgumentTypeDescription
patternstringFilter pattern for labels

Resources

daemon(infinite)— Launchd daemon state
detail(infinite)— Detailed daemon info from launchctl print
logs(1d)— Daemon log output from unified logging
plistInfo(infinite)— Parsed plist file contents and validation
list(infinite)— List of daemons matching filters
vendors(infinite)— Daemons grouped by software vendor
scan(infinite)— Discovered plist files on disk
orphans(infinite)— Orphaned daemons (loaded without plist, or plist not loaded)
health(infinite)— Health check of daemons expected to be running
processes(1h)— Resource usage of running daemon processes
startup(infinite)— Daemons configured to start at login/boot