cli

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Package cli implements the amplifi command-line interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveHost

func ResolveHost(ktx *kong.Context)

ResolveHost fills in --host from the default saved login for the selected command when it was not given, so commands can show and use the unit's name. Kong does not run hooks on embedded structs, so main calls this after parsing. A missing store or default is left for dial to report.

Types

type Options

type Options struct {
	LogLevel  string           `kong:"help='log level: debug, info, warn or error',default='info',enum='debug,info,warn,error'"`
	LogFormat string           `kong:"help='log format: text or json',default='text',enum='text,json'"`
	Output    string           `kong:"short='o',help='output format: text or json',default='text',enum='text,json'"`
	Version   kong.VersionFlag `kong:"help='print the version and exit'"`

	Discover   discoverCmd      `kong:"cmd,help='find AmpliFi units on the local network'"`
	Login      loginCmd         `kong:"cmd,help='log in and save the login'"`
	Logout     logoutCmd        `kong:"cmd,help='delete a saved login'"`
	Status     statusCmd        `kong:"cmd,help='show a health summary of a unit and its mesh'"`
	Watch      watchCmd         `kong:"cmd,help='print events from a unit as they happen'"`
	Device     deviceCmd        `kong:"cmd,help='unit information, properties and display settings'"`
	Mesh       meshCmd          `kong:"cmd,help='mesh points and units'"`
	Clients    clientsCmd       `kong:"cmd,help='clients on the network'"`
	Wifi       wifiCmd          `kong:"cmd,help='Wi-Fi networks, radios and channels'"`
	Net        netCmd           `kong:"cmd,help='WAN, LAN, interfaces, UPnP and QoS'"`
	Dhcp       dhcpCmd          `kong:"cmd,help='DHCP pools and static leases'"`
	Portfwd    portfwdCmd       `kong:"cmd,help='port forwarding rules'"`
	Access     accessCmd        `kong:"cmd,help='scheduled access control (parental controls)'"`
	Firmware   fwCmd            `kong:"cmd,help='firmware upgrades'"`
	Speedtest  speedtestCmd     `kong:"cmd,help='internet speed tests'"`
	Iperf      systemIperfCmd   `kong:"cmd,help='start an iperf server on the unit for 30 seconds'"`
	Site       siteCmd          `kong:"cmd,help='site configuration: time zone, DFS and other mesh-wide settings'"`
	Admin      adminCmd         `kong:"cmd,help='admin password'"`
	Support    systemSupportCmd `kong:"cmd,help='support bundles'"`
	Stats      systemStatsCmd   `kong:"cmd,help='statistics'"`
	Homekit    systemHomeKitCmd `kong:"cmd,help='HomeKit service'"`
	Teleport   teleportCmd      `kong:"cmd,help='Teleport remote access'"`
	Reboot     rebootCmd        `kong:"cmd,help='reboot a unit'"`
	Raw        rawCmd           `kong:"cmd,help='direct method, property and ubus calls'"`
	VersionCmd versionCmd       `kong:"cmd,name='version',help='show build version, commit and time'"`
}

Options are the top-level command-line options and subcommands.

func (*Options) JSON

func (o *Options) JSON() bool

JSON reports whether JSON output was selected.

func (*Options) Logger

func (o *Options) Logger() *slog.Logger

Logger builds the logger selected by the global flags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL