Generate launchd plists without the friction
mklaunchd is the macOS equivalent of mkunit for systemd. It removes the friction between "I have an idea for a background service" and "it is actually running." Take a Python script, Rust binary, Go service, or bash script and have it running as a launchd background service in under a minute.
mklaunchd creates the file and hands off to standard tooling. After generating a plist it prints the exact launchctl commands for you to run yourself — it does not wrap or replace launchctl.
brew tap uradical/mklaunchd
brew install mklaunchd# Generate a plist interactively
mklaunchd generate
# Generate from flags and write
mklaunchd generate \
--label io.uradical.myservice \
--binary /usr/local/bin/myservice \
--scope user-agent \
--write --yes
# Print to stdout for piping
mklaunchd generate \
--label io.uradical.myservice \
--binary /usr/local/bin/myservice \
--stdout
# Validate plist XML
mklaunchd validate ~/Library/LaunchAgents/io.uradical.myservice.plist
# Run deeper checks
mklaunchd doctor io.uradical.myservice
mklaunchd doctor --all
# Translate an exit code
mklaunchd error 78After generate writes the plist, mklaunchd prints something like:
✓ Plist written to ~/Library/LaunchAgents/io.uradical.myservice.plist
-- Next steps
launchctl bootstrap gui/501 ~/Library/LaunchAgents/io.uradical.myservice.plist
launchctl print gui/501/io.uradical.myservice
launchctl list | grep io.uradical.myservice
To stop the service:
launchctl bootout gui/501/io.uradical.myservice
Any executable named mklaunchd-<command> on PATH is automatically available as a subcommand:
brew install yourname/mklaunchd-monitor
mklaunchd monitor io.uradical.myserviceSee docs/plugins.md for the plugin authoring guide.
man mklaunchdOr visit uradical.io/tools/mklaunchd.
git clone https://github.com/uradical/mklaunchd
cd mklaunchd
make installRequires macOS 13+ and Xcode 15+.
MIT
