Documentation
¶
Overview ¶
Package root contains the command-line interface implementation for the MCPShell.
It defines the root command and all subcommands using Cobra and manages CLI flags, execution flow, and global application state.
Index ¶
Constants ¶
const ApplicationName = "mcpshell"
ApplicationName is the name of the application used in various places
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetVersion ¶ added in v0.1.8
func GetVersion() string
GetVersion returns the full version string with build information
func SetVersion ¶ added in v0.1.8
func SetVersion(v, c, d string)
SetVersion sets the version information from build-time variables
Types ¶
type CheckResult ¶ added in v0.1.7
type CheckResult struct {
Success bool `json:"success"`
ResponseTime float64 `json:"response_time_ms"`
Error string `json:"error,omitempty"`
Model string `json:"model"`
}
CheckResult holds the result of an LLM connectivity check
type ConfigShowModelInfo ¶ added in v0.1.7
type ConfigShowModelInfo struct {
Name string `json:"name"`
Model string `json:"model"`
Class string `json:"class"`
Default bool `json:"default"`
APIKey string `json:"api_key_masked,omitempty"`
APIURL string `json:"api_url,omitempty"`
SystemPrompts []string `json:"system_prompts,omitempty"`
}
ConfigShowModelInfo holds model info for JSON output
type ConfigShowOutput ¶ added in v0.1.7
type ConfigShowOutput struct {
ConfigurationFile string `json:"configuration_file"`
Models []ConfigShowModelInfo `json:"models"`
DefaultModel *ConfigShowModelInfo `json:"default_model,omitempty"`
Orchestrator *ConfigShowModelInfo `json:"orchestrator,omitempty"`
ToolRunner *ConfigShowModelInfo `json:"tool_runner,omitempty"`
}
ConfigShowOutput holds the JSON output structure for config show
type InfoOutput ¶ added in v0.1.7
type InfoOutput struct {
ConfigFile string `json:"config_file,omitempty"`
ToolsFile string `json:"tools_file,omitempty"`
Once bool `json:"once_mode"`
Orchestrator ModelInfo `json:"orchestrator"`
ToolRunner ModelInfo `json:"tool_runner"`
Check *CheckResult `json:"check,omitempty"`
Prompts *PromptsInfo `json:"prompts,omitempty"`
}
InfoOutput holds the complete info output structure for JSON
type ModelInfo ¶ added in v0.1.7
type ModelInfo struct {
Model string `json:"model"`
Class string `json:"class"`
Name string `json:"name,omitempty"`
APIURL string `json:"api_url,omitempty"`
APIKey string `json:"api_key_masked,omitempty"`
}
ModelInfo holds model configuration details for JSON output
type PromptsInfo ¶ added in v0.1.7
type PromptsInfo struct {
System []string `json:"system,omitempty"`
User string `json:"user,omitempty"`
}
PromptsInfo holds prompt information for JSON output