setup

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Input io.Reader

Input is the reader used for interactive prompts and table input. When nil (the default), input is read from /dev/tty. Set to a strings.NewReader in tests to script interactive flows.

Functions

func Command added in v1.11.0

func Command() *internal.Command

Command builds the setup command: the interactive configuration wizard.

func ConfigRunPrep added in v1.11.0

func ConfigRunPrep(deferAnnouncements bool) (string, []string, error)

ConfigRunPrep runs the shared pre-command config work for config-touching commands (query/chat/photo/video/audio/setup): config-dir resolution, theme loading, and the united config migration. Commands that render content without touching the mode configs (replay, dir-replay, the read-only chat subcommands) call internal.PrepTheme directly instead; completion, __complete, confdir and version stay fully side-effect-free. internal/cli injects it into the commands that need it; the setup command calls it directly.

func InitCmd

func InitCmd() error

InitCmd the setup to configure the different files

func LoadPhotoConfig added in v1.11.0

func LoadPhotoConfig(confDir string) (photo.Configurations, error)

LoadPhotoConfig loads the photo configuration with the old-config migration applied; injected into the photo command by internal/cli.

func ParseAndAddMcpServer

func ParseAndAddMcpServer(mcpServersDir, pastedConfig string) ([]string, error)

ParseAndAddMcpServer parses pasted MCP server configuration and adds it to the system

func ValidateMcpServerConfig

func ValidateMcpServerConfig(pastedConfig string) error

ValidateMcpServerConfig validates that the pasted config is valid

Types

type McpServerExternal

type McpServerExternal struct {
	Command string            `json:"command"`
	Args    []string          `json:"args"`
	Env     map[string]string `json:"env,omitempty"`
	EnvFile string            `json:"envfile,omitempty"`
}

McpServerExternal represents various external MCP server formats

type McpServerInput

type McpServerInput struct {
	McpServers map[string]McpServerExternal `json:"mcpServers"`
}

McpServerInput represents the external format that users might paste

Jump to

Keyboard shortcuts

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