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 } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts" license = "MIT" [[commands.subcommand]] path = ["-getinfo"] label = "Show service info" description = "IP address, subnet mask, router and hardware address of a service." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts" license = "MIT" [[commands.subcommand.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"] [[commands.subcommand.task]] id = "info" label = "Show info" fields = ["service"] required = ["service"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["service"] [[commands.subcommand]] path = ["-setdnsservers"] label = "Set DNS servers" description = "Use \"empty\" in place of a server to clear all DNS entries." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts" license = "MIT" [[commands.subcommand.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"] [[commands.subcommand.field]] id = "dns" label = "DNS servers" type = "string" position = 1 multiple = true min = 1 suggestions = [{ value = "empty", label = "empty" }] sources = ["fig"] [[commands.subcommand.task]] id = "dns" label = "Set DNS" fields = ["service", "dns"] required = ["service", "dns"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["service", "dns"] [[commands.subcommand]] path = ["-setairportpower"] label = "Wi-Fi power" description = "Turn Wi-Fi power on or off for a hardware port." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/networksetup.ts" license = "MIT" [[commands.subcommand.field]] id = "port" label = "Hardware port" type = "string" position = 0 min = 1 suggestions = [{ value = "en0", label = "en0" }] sources = ["fig"] [[commands.subcommand.field]] id = "state" label = "Power" type = "enum" position = 1 min = 1 choices = [{ value = "on", label = "on" }, { value = "off", label = "off" }] sources = ["fig"] [[commands.subcommand.task]] id = "power" label = "Set Wi-Fi power" fields = ["port", "state"] required = ["port", "state"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["port", "state"]