-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroot.go
More file actions
52 lines (43 loc) Β· 1.78 KB
/
root.go
File metadata and controls
52 lines (43 loc) Β· 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
const version = "1.1.0"
const asciiArt = `
βββββββββββββββ ββββ ββββββββββ βββ
ββββββββββββββββ βββββ βββββββββββ βββ
ββββββββββββββββββββββ βββ βββ βββ
ββββββββββββββββββββββ βββ βββ βββ
ββββββββββββββ βββ βββ βββββββββββββββββββ
ββββββββββββββ βββ ββββββββββββββββββ
`
var rootCmd = &cobra.Command{
Use: "sim",
Version: version,
Short: "CLI tool to manage iOS simulators and Android emulators",
Long: `SIM-CLI is a command-line tool for managing iOS simulators and Android emulators.
It provides a simple interface to:
- List available simulators and emulators
- Start, stop, shutdown, and restart devices
- Delete simulators and emulators
- Take screenshots and record screen
- Manage device lifecycle efficiently`,
Run: func(cmd *cobra.Command, args []string) {
version, _ := cmd.Flags().GetBool("version")
if version {
fmt.Printf("SIM-CLI version %s\n", cmd.Version)
return
}
fmt.Print(asciiArt)
fmt.Print("iOS Simulator & Android Emulator Manager\n")
fmt.Printf("Version: %s\n\n", cmd.Version)
fmt.Println("Use 'sim help' to see available commands")
},
}
func Execute() error {
return rootCmd.Execute()
}
func init() {
rootCmd.Flags().BoolP("version", "v", false, "Show version information")
}