Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pyinfra-dev/pyinfra/llms.txt

Use this file to discover all available pages before exploring further.

Manage launchd services.

Functions

launchd.service

Manage the state of launchd managed services.
launchd.service(
    service,
    running=True,
    restarted=False,
    command=None,
)

Examples

from pyinfra.operations import launchd

# Manage a launchd service on macOS
launchd.service(
    name="Ensure ssh is running",
    service="com.openssh.sshd",
    running=True,
)

Build docs developers (and LLMs) love