Library for controlling Kasa switches, and a sample app.
Assuming your ~/go/bin is in $PATH:
~/go/bin
$PATH
go get gitea.drjosh.dev/josh/plugctl/cmd/plugctl@latest
plugctl {on,off,state} --kasa-addr=(host:port)
See cmd/plugctl/main.go for library usage.
cmd/plugctl/main.go