cmd

package
v0.0.0-...-a28b9fa Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Copyright © 2023 Shreyan Mitra <[email protected]>

Copyright © 2023 Shreyan Mitra <[email protected]>

Copyright © 2023 Shreyan Mitra <[email protected]>

Copyright © 2023 Shreyan Mitra <[email protected]>

Copyright © 2023 Shreyan Mitra <[email protected]>

Index

Constants

This section is empty.

Variables

View Source
var GUICmd = &cobra.Command{
	Use:   "gui",
	Short: "Opens XAISuite's GUI",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Installing XAISuite...")
		install := exec.Command("zsh", "-c", "pip install XAISuite==1.0.8")
		install.Stdin = os.Stdin
		install.Stdout = os.Stdout
		install.Stderr = os.Stderr
		err_install := install.Run()
		if err_install != nil {
			log.Fatalf("Installing XAISuite failed with %s\n", err_install)
		}

		fmt.Println("Opening GUI...")
		gui := exec.Command("zsh", "-c", "python -c 'import xaisuitegui.runner'")
		gui.Stdin = os.Stdin
		gui.Stdout = os.Stdout
		gui.Stderr = os.Stderr
		err := gui.Run()
		if err != nil {
			log.Fatalf("Opening XAISuite GUI failed with %s\n", err)
		}
	},
}

GUICmd represents the GUI command

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

This section is empty.

Jump to

Keyboard shortcuts

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