Documentation
¶
Overview ¶
Package cmd provides the command-line interface for Ghost, including the root command configuration, subcommands (ask, chat), and shared functionality like LLM client initialization.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrConfig indicates a configuration binding or initialization failure. ErrConfig = errors.New("failed to bind config") // ErrLogging indicates a logging setup or file operation failure. ErrLogging = errors.New("failed to setup logging") // ErrLLM indicates an LLM client initialization or request processing failure. ErrLLM = errors.New("failed to process LLM request") // ErrHomeDir indicates a failure to retrieve the user's home directory path. ErrHomeDir = errors.New("failed to get home directory") )
Functions ¶
func Execute ¶
Execute creates and returns the root command for use with fang.Execute. It sets up the logger and registers the configuration initialization.
func NewAskCmd ¶
NewAskCmd creates a new ask command that sends queries to the configured LLM. It supports both direct command-line queries and piped input from stdin.
func NewChatCmd ¶ added in v1.1.0
NewChatCmd creates a new chat command that launches an interactive TUI session for multi-turn conversations with the configured LLM.
Types ¶
This section is empty.