cli

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package cli provides command-line interface setup and configuration for the totalrecall application. It handles flag parsing, command creation, and configuration management using cobra and viper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRootCommand

func CreateRootCommand(flags *Flags) *cobra.Command

CreateRootCommand creates and configures the root cobra command

func GetOpenAIKey

func GetOpenAIKey() string

GetOpenAIKey retrieves the OpenAI API key from environment or config

func InitConfig

func InitConfig(cfgFile string)

InitConfig initializes viper configuration

Types

type Flags

type Flags struct {
	// General flags
	CfgFile      string
	OutputDir    string
	AudioFormat  string
	ImageAPI     string
	BatchFile    string
	SkipAudio    bool
	SkipImages   bool
	GenerateAnki bool
	AnkiCSV      bool
	DeckName     string
	ListModels   bool
	AllVoices    bool
	NoAutoPlay   bool
	Archive      bool

	// OpenAI flags
	OpenAIModel       string
	OpenAIVoice       string
	OpenAISpeed       float64
	OpenAIInstruction string

	// OpenAI Image flags
	OpenAIImageModel   string
	OpenAIImageSize    string
	OpenAIImageQuality string
	OpenAIImageStyle   string
}

Flags holds all command-line flag values

func NewFlags

func NewFlags() *Flags

NewFlags creates a new Flags instance with default values

Jump to

Keyboard shortcuts

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