Documentation
¶
Overview ¶
Package cmd implements the CLI subcommands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseLogLevel ¶
ParseLogLevel maps the CLI log-level flag to slog.Level.
Types ¶
type CLI ¶
type CLI struct {
LogLevel LogLevel `help:"Log level (one of: ${enum})." default:"info" enum:"debug,info,warn,error" short:"l"`
Commands
}
CLI is the root Kong CLI struct.
type Commands ¶
type Commands struct {
Serve ServeCmd `cmd:"" help:"Run MCP server."`
Validate ValidateCmd `cmd:"" help:"Validate config file."`
Sources SourcesCmd `cmd:"" help:"Manage sources."`
Setup SetupCmd `cmd:"" help:"Start config-authoring MCP server assistant."`
}
Commands holds the subcommands and config, safe to embed.
type ConfigFlag ¶
type ConfigFlag struct {
Config string `help:"Path to config." default:".mcpsmithy.yaml" type:"path" short:"c"`
}
type ServeCmd ¶
type ServeCmd struct {
ConfigFlag
Transport string `help:"Transport to use (one of: ${enum})." default:"stdio" enum:"stdio,http"`
Addr string `help:"Listen address (HTTP transport only)." default:":8080"`
Watch bool `help:"Watch config file and hot-reload on change." default:"false"`
}
ServeCmd starts the MCP server.
type SetupCmd ¶
type SetupCmd struct{}
SetupCmd starts an MCP server for config-authoring sessions. It does not require an existing .mcpsmithy.yaml.
type SourcesCmd ¶
type SourcesCmd struct {
Pull SourcesPullCmd `cmd:"" help:"Fetch external sources and write them to disk."`
}
SourcesCmd is the command group for source management.
type SourcesPullCmd ¶
type SourcesPullCmd struct {
ConfigFlag
}
SourcesPullCmd fetches all sources and writes them to disk.
Click to show internal directories.
Click to hide internal directories.