Documentation
¶
Index ¶
- Constants
- func Execute() error
- func IsSilentError(err error) bool
- func NewRootCmd() *cobra.Command
- type AgentConfig
- type ConfigListItem
- type ContextConfig
- type DescribeResult
- type ExecutionEnv
- type Flags
- type InstalledModule
- type ModuleMatch
- type ModuleSource
- type RoleConfig
- type TaskConfig
- type TaskMatch
- type TaskSource
- type UpdateResult
- type ValidateCategoryResult
- type ValidateCheckResult
- type ValidateIndexResult
- type ValidateModuleResult
- type ValidateResult
- type ValidateStatsResult
Constants ¶
const (
// DefaultLibraryRepoURL is the default GitHub repository for browsing the library.
DefaultLibraryRepoURL = "https://github.com/start-cli/library"
)
Library repository constants
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() error
Execute runs the root command. This is the main entry point for the CLI.
func IsSilentError ¶
IsSilentError returns true if the error should not be printed to stderr. Used by main.go to suppress output for errors that only set the exit code.
func NewRootCmd ¶
NewRootCmd creates a new root command instance with all subcommands attached. This factory function ensures tests get isolated command instances with their own Flags.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Name string `json:"name"`
Bin string `json:"bin,omitempty"`
Command string `json:"command,omitempty"`
DefaultModel string `json:"defaultModel,omitempty"`
Description string `json:"description,omitempty"`
Models map[string]string `json:"models,omitempty"`
Tags []string `json:"tags,omitempty"`
Source string `json:"source"` // "global" or "local"
Origin string `json:"origin,omitempty"` // Registry module path when installed from registry
}
AgentConfig represents an agent configuration for editing.
type ConfigListItem ¶
type ConfigListItem struct {
Category string `json:"category"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Bin string `json:"bin,omitempty"`
Command string `json:"command,omitempty"`
DefaultModel string `json:"defaultModel,omitempty"`
File string `json:"file,omitempty"`
Prompt string `json:"prompt,omitempty"`
Role string `json:"role,omitempty"`
Required bool `json:"required,omitempty"`
Default bool `json:"default,omitempty"`
Optional bool `json:"optional,omitempty"`
Models map[string]string `json:"models,omitempty"`
Tags []string `json:"tags,omitempty"`
Source string `json:"source"`
Origin string `json:"origin,omitempty"`
}
ConfigListItem represents a single configured item for JSON output. All optional fields use omitempty so absent fields are not emitted.
type ContextConfig ¶
type ContextConfig struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
File string `json:"file,omitempty"`
Command string `json:"command,omitempty"`
Prompt string `json:"prompt,omitempty"`
Required bool `json:"required,omitempty"`
Default bool `json:"default,omitempty"`
Tags []string `json:"tags,omitempty"`
Source string `json:"source"` // "global" or "local"
Origin string `json:"origin,omitempty"` // Registry module path when installed from registry
}
ContextConfig represents a context configuration for editing.
type DescribeResult ¶
type DescribeResult struct {
ItemType string // "Agent", "Role", "Context", "Task"
Category string // "agents", "roles", "contexts", "tasks"
CueKey string // Top-level CUE key (e.g., "agents")
Name string // Item name
Value cue.Value // The CUE value for this item
AllNames []string // All available items of this type
}
DescribeResult holds the result of preparing describe output.
type ExecutionEnv ¶
type ExecutionEnv struct {
Cfg internalcue.LoadResult
WorkingDir string
Agent orchestration.Agent
Composer *orchestration.Composer
Executor *orchestration.Executor
}
ExecutionEnv holds the common execution environment for start and task commands.
type Flags ¶
type Flags struct {
Agent string
Role string
Model string
Context []string
DryRun bool
Quiet bool
Verbose bool
Debug bool
NoColor bool
Local bool
NoRole bool
}
Flags holds all CLI flag values. Each command instance gets its own Flags, enabling parallel test execution without shared state.
type InstalledModule ¶
type InstalledModule struct {
Category string `json:"category"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Models []string `json:"models,omitempty"`
InstalledVer string `json:"version,omitempty"`
LatestVer string `json:"latestVersion,omitempty"`
UpdateAvail bool `json:"updateAvailable,omitempty"`
Scope string `json:"scope"`
Origin string `json:"origin"`
ConfigFile string `json:"configFile"`
}
InstalledModule represents an installed module with version info.
type ModuleMatch ¶
type ModuleMatch struct {
Name string
Category string
Source ModuleSource
Entry registry.IndexEntry
Score int
}
ModuleMatch represents a single matched module during resolution.
type ModuleSource ¶
type ModuleSource string
ModuleSource indicates where a module was found.
const ( ModuleSourceInstalled ModuleSource = "installed" ModuleSourceRegistry ModuleSource = "registry" )
type RoleConfig ¶
type RoleConfig struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
File string `json:"file,omitempty"`
Command string `json:"command,omitempty"`
Prompt string `json:"prompt,omitempty"`
Tags []string `json:"tags,omitempty"`
Optional bool `json:"optional,omitempty"` // If true, skip gracefully when file is missing
Source string `json:"source"` // "global" or "local"
Origin string `json:"origin,omitempty"` // Registry module path when installed from registry
}
RoleConfig represents a role configuration for editing.
type TaskConfig ¶
type TaskConfig struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
File string `json:"file,omitempty"`
Command string `json:"command,omitempty"`
Prompt string `json:"prompt,omitempty"`
Role string `json:"role,omitempty"`
Tags []string `json:"tags,omitempty"`
Source string `json:"source"` // "global" or "local"
Origin string `json:"origin,omitempty"` // Registry module path when installed from registry
}
TaskConfig represents a task configuration for editing.
type TaskMatch ¶
type TaskMatch struct {
Name string // Task name (e.g., "golang/debug")
Source TaskSource // Where the task comes from
Entry registry.IndexEntry // Registry entry (only set if Source == TaskSourceRegistry)
}
TaskMatch represents a task found during resolution.
type TaskSource ¶
type TaskSource string
TaskSource indicates where a task comes from.
const ( TaskSourceInstalled TaskSource = "installed" TaskSourceRegistry TaskSource = "registry" )
type UpdateResult ¶
type UpdateResult struct {
Module InstalledModule `json:"module"`
OldVersion string `json:"oldVersion,omitempty"`
NewVersion string `json:"newVersion,omitempty"`
Updated bool `json:"updated"`
Error error `json:"-"`
ErrorMessage string `json:"error,omitempty"`
}
UpdateResult tracks the result of an update operation.
type ValidateCategoryResult ¶
type ValidateCategoryResult struct {
Name string `json:"name"`
Modules []ValidateModuleResult `json:"modules"`
}
ValidateCategoryResult holds per-category module results for JSON output.
type ValidateCheckResult ¶
type ValidateCheckResult struct {
Status string `json:"status"`
Label string `json:"label"`
Message string `json:"message,omitempty"`
}
ValidateCheckResult mirrors doctor.CheckResult for JSON output.
type ValidateIndexResult ¶
type ValidateIndexResult struct {
Checks []ValidateCheckResult `json:"checks"`
}
ValidateIndexResult holds the index validation checks for JSON output.
type ValidateModuleResult ¶
type ValidateModuleResult struct {
Name string `json:"name"`
Version string `json:"version,omitempty"`
Status string `json:"status"`
Issues []string `json:"issues,omitempty"`
}
ValidateModuleResult holds per-module validation results for JSON output.
type ValidateResult ¶
type ValidateResult struct {
Index ValidateIndexResult `json:"index"`
Categories []ValidateCategoryResult `json:"categories"`
Stats ValidateStatsResult `json:"stats"`
}
ValidateResult is the top-level JSON output for modules validate.
type ValidateStatsResult ¶
type ValidateStatsResult struct {
Checked int `json:"checked"`
Pass int `json:"pass"`
Fail int `json:"fail"`
}
ValidateStatsResult holds summary statistics for JSON output.
Source Files
¶
- completion.go
- config.go
- config_add.go
- config_edit.go
- config_export.go
- config_helpers.go
- config_info.go
- config_interactive.go
- config_list.go
- config_open.go
- config_order.go
- config_remove.go
- config_search.go
- config_settings.go
- config_types.go
- cross_resolve.go
- describe.go
- doctor.go
- get.go
- help.go
- modules.go
- modules_browse.go
- modules_index.go
- modules_install.go
- modules_list.go
- modules_search.go
- modules_update.go
- modules_validate.go
- output.go
- prompt.go
- resolve.go
- root.go
- search.go
- start.go
- task.go