{
  "id": "launchctl",
  "name": "launchctl",
  "description": "Interface to launchd on macOS.",
  "executables": [
    "launchctl"
  ],
  "platforms": [
    "macos"
  ],
  "commands": {
    "format": 1,
    "label": "launchctl",
    "description": "Inspect and restart launchd services. Load/unload and system changes are left out.",
    "quality": "ai-draft",
    "base": "fig:launchctl",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "list"
        ],
        "label": "List services",
        "description": "List services or show one.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/launchctl.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "label",
            "label": "Label",
            "description": "Leave empty to list all.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List",
            "fields": [
              "label"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "label"
            ]
          }
        ]
      },
      {
        "path": [
          "print"
        ],
        "label": "Print service",
        "description": "Print a description of a domain or service.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/launchctl.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "service",
            "label": "Service or domain target",
            "description": "e.g. gui/501/com.example.app.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "print",
            "label": "Print",
            "fields": [
              "service"
            ],
            "required": [
              "service"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "service"
            ]
          }
        ]
      },
      {
        "path": [
          "kickstart"
        ],
        "label": "Start service",
        "description": "Force an existing service to start.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/launchctl.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "service",
            "label": "Service target",
            "description": "e.g. gui/501/com.example.app.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "kill",
            "label": "Kill first",
            "type": "boolean",
            "option": [
              "-k"
            ],
            "effect": "exec",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "pid",
            "label": "Print PID",
            "type": "boolean",
            "option": [
              "-p"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "restart",
            "label": "Restart service",
            "set": {
              "kill": [
                true
              ]
            },
            "fields": [
              "service",
              "pid"
            ],
            "required": [
              "service"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "service",
              "pid"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "kill"
            ]
          }
        ]
      }
    ]
  }
}
