{
  "id": "networksetup",
  "name": "networksetup",
  "description": "Configuration tool for network settings in System Settings.",
  "executables": [
    "networksetup"
  ],
  "platforms": [
    "macos"
  ],
  "commands": {
    "format": 1,
    "label": "Network settings",
    "description": "Inspect a network service, set its DNS servers, or switch Wi-Fi power. Run it with sudo where macOS requires it.",
    "quality": "ai-draft",
    "base": "fig:networksetup",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "-getinfo"
        ],
        "label": "Show service info",
        "description": "IP address, subnet mask, router and hardware address of a service.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "service",
            "label": "Network service",
            "type": "string",
            "position": 0,
            "min": 1,
            "suggestions": [
              {
                "value": "Wi-Fi",
                "label": "Wi-Fi"
              },
              {
                "value": "Ethernet",
                "label": "Ethernet"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "info",
            "label": "Show info",
            "fields": [
              "service"
            ],
            "required": [
              "service"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "service"
            ]
          }
        ]
      },
      {
        "path": [
          "-setdnsservers"
        ],
        "label": "Set DNS servers",
        "description": "Use \"empty\" in place of a server to clear all DNS entries.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "service",
            "label": "Network service",
            "type": "string",
            "position": 0,
            "min": 1,
            "suggestions": [
              {
                "value": "Wi-Fi",
                "label": "Wi-Fi"
              },
              {
                "value": "Ethernet",
                "label": "Ethernet"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dns",
            "label": "DNS servers",
            "type": "string",
            "position": 1,
            "multiple": true,
            "min": 1,
            "suggestions": [
              {
                "value": "empty",
                "label": "empty"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "dns",
            "label": "Set DNS",
            "fields": [
              "service",
              "dns"
            ],
            "required": [
              "service",
              "dns"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "service",
              "dns"
            ]
          }
        ]
      },
      {
        "path": [
          "-setairportpower"
        ],
        "label": "Wi-Fi power",
        "description": "Turn Wi-Fi power on or off for a hardware port.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "port",
            "label": "Hardware port",
            "type": "string",
            "position": 0,
            "min": 1,
            "suggestions": [
              {
                "value": "en0",
                "label": "en0"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "state",
            "label": "Power",
            "type": "enum",
            "position": 1,
            "min": 1,
            "choices": [
              {
                "value": "on",
                "label": "on"
              },
              {
                "value": "off",
                "label": "off"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "power",
            "label": "Set Wi-Fi power",
            "fields": [
              "port",
              "state"
            ],
            "required": [
              "port",
              "state"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "port",
              "state"
            ]
          }
        ]
      }
    ]
  }
}
