Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "genie", Short: "Genie AI coding assistant", Long: `Genie is an AI coding assistant that helps with software engineering tasks.`, Version: version.GetVersion(), PersistentPreRunE: func(cmd *cobra.Command, args []string) error { // Configure logger based on flags var logger logging.Logger if quiet { logger = logging.NewQuietLogger() } else if verbose { logger = logging.NewVerboseLogger() } else { logger = logging.NewDefaultLogger() } logging.SetGlobalLogger(logger) // Initialize Genie once for all commands var err error genieInstance, err = tui.ProvideGenie() if err != nil { return fmt.Errorf("failed to initialize Genie: %w", err) } // Start Genie with working directory and persona var workingDirPtr *string if workingDir != "" { workingDirPtr = &workingDir } var personaPtr *string if persona != "" { personaPtr = &persona } initialSession, err = genieInstance.Start(workingDirPtr, personaPtr) if err != nil { return err } return nil }, RunE: func(cmd *cobra.Command, args []string) error { // Check for stdin input before starting TUI var stdinContent string if hasStdinInput() { content, err := readStdinInput() if err != nil { return fmt.Errorf("failed to read stdin: %w", err) } stdinContent = content } tuiApp, err := tui.InjectTUI(initialSession) if err != nil { return err } defer tuiApp.Stop() return tuiApp.StartWithMessage(stdinContent) }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.