danielpaulus / go-ios

This is an operating system independent implementation of iOS device features. You can run UI tests, launch or kill apps, install apps etc. with it.
MIT License
891 stars 172 forks source link

Refactor CLI app to Cobra #376

Open bartekpacia opened 6 months ago

bartekpacia commented 6 months ago

I propose rewriting go-ios CLI to use Cobra.

Advantages:

See also the Discord thread where it was discussed and accepted.

This issue is for tracking purposes.

bartekpacia commented 6 months ago

@danielpaulus I've got a few question:

Are these options (see spoiler) applicable to literally every command in go-ios?

spoiler ``` Options: -v --verbose Enable Debug Logging. -t --trace Enable Trace Logging (dump every message). --nojson Disable JSON output --pretty Pretty-print JSON command output -h --help Show this screen. --udid= UDID of the device. --tunnel-info-port= When go-ios is used to manage tunnels for iOS 17+ it exposes them on an HTTP-API for localhost (default port: 28100) --address= Address of the device on the interface. This parameter is optional and can be set if a tunnel created by MacOS needs to be used. > To get this value run "log stream --debug --info --predicate 'eventMessage LIKE "*Tunnel established*" OR eventMessage LIKE "*for server port*"'", > connect a device and open Xcode --rsd-port= Port of remote service discovery on the device through the tunnel > This parameter is similar to '--address' and can be obtained by the same log filter ```