cmd

package
v1.65.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT

* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT

* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintConnectUsage

func PrintConnectUsage()

PrintConnectUsage prints help for the connect subcommand.

func PrintServerUsage added in v1.64.0

func PrintServerUsage()

PrintServerUsage prints help for the server subcommand.

func PrintWatchUsage

func PrintWatchUsage()

PrintWatchUsage prints help for the watch subcommand.

func RunConnect

func RunConnect(ctx context.Context, args []string, llmMgr manager.LLMManager, logger *zap.Logger) error

RunConnect executes the 'chatcli connect' subcommand.

func RunServer added in v1.64.0

func RunServer(args []string, llmMgr manager.LLMManager, logger *zap.Logger) error

RunServer executes the 'chatcli server' subcommand.

func RunWatch

func RunWatch(ctx context.Context, args []string, llmMgr manager.LLMManager, logger *zap.Logger) error

RunWatch executes the 'chatcli watch' subcommand.

Types

type ConnectOptions

type ConnectOptions struct {
	Address      string
	Token        string
	TLS          bool
	CertFile     string
	ClientAPIKey string // client's own LLM API key/OAuth token (forwarded to server)
	UseLocalAuth bool   // resolve LLM credentials from local auth store (~/.chatcli/auth-profiles.json)
	Provider     string // override server's default LLM provider
	Model        string // override server's default LLM model

	// StackSpot-specific
	ClientID  string // StackSpot client ID
	ClientKey string // StackSpot client key
	Realm     string // StackSpot realm/tenant
	AgentID   string // StackSpot agent ID

	// Ollama-specific
	OllamaURL string // Ollama base URL

	// one-shot mode via connect
	Prompt    string
	Raw       bool
	MaxTokens int
}

ConnectOptions holds the flags for the 'connect' subcommand.

type ServerOptions added in v1.64.0

type ServerOptions struct {
	Port        int
	Token       string
	CertFile    string
	KeyFile     string
	Provider    string
	Model       string
	MetricsPort int

	// K8s watcher integration (optional)
	WatchDeployment string
	WatchNamespace  string
	WatchInterval   time.Duration
	WatchWindow     time.Duration
	WatchMaxLogs    int
	WatchKubeconfig string
	WatchConfig     string // path to multi-target watch config YAML
}

ServerOptions holds the flags for the 'server' subcommand.

type WatchOptions

type WatchOptions struct {
	Deployment  string
	Namespace   string
	Interval    time.Duration
	Window      time.Duration
	MaxLogLines int
	Kubeconfig  string
	Provider    string
	Model       string
	Prompt      string // one-shot mode
	MaxTokens   int
	ConfigFile  string // path to multi-target watch config YAML
}

WatchOptions holds the flags for the 'watch' subcommand.

Jump to

Keyboard shortcuts

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