Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + func APIKeyForProvider(provider string) string + func ActiveGateway(ctx context.Context) string + func ActiveModel(ctx context.Context) string + func ActiveProvider(ctx context.Context) string + func AllCanonicalModelIDs() []string + func AllCatalogProviders() []string + func AllEnvKeyStatus() string + func AllSetupGateways() []string + func ApplyEyrieCredentials(ctx context.Context) (*setup.ApplyCredentialsResult, error) + func ApplyEyrieCredentialsForProvider(ctx context.Context, providerID string) (*setup.ApplyCredentialsResult, error) + func ApplyOutputStyle(content string, style OutputStyle) string + func AutoRefreshCatalog(ctx context.Context, out io.Writer, verbose bool) error + func BashCompletion() string + func BoolPtr(b bool) *bool + func BuildContext() string + func BuildContextWithDirs(addDirs []string) string + func CachedModelCountForProvider(provider string) int + func CatalogCachePathForDisplay() string + func CatalogEmptyHint(ctx context.Context) string + func CatalogReady(ctx context.Context) bool + func CatalogStatusLine(ctx context.Context) string + func CheapestModelForProvider(provider, fallback string) string + func ClearActiveSelection(ctx context.Context) error + func CompiledCatalogV1() *catalog.CompiledCatalogV1 + func ConfigProviderList(custom []CustomProviderConfig) []string + func ConfiguredCredentialProviders() []string + func DefaultAliases() map[string]string + func DefaultIgnorePatterns() []string + func DefaultModelConfigs() map[string]*ModelConfig + func DefaultModelForProvider(provider string) string + func DefaultModelProviderFilter(ctx context.Context) string + func DeploymentRoutingEnabled(s Settings) bool + func DeploymentRoutingLabel(settings Settings) string + func DeploymentStatusReport(ctx context.Context, activeModel string) (string, error) + func DetectVersion(data map[string]interface{}) int + func DiffConfigs(old, new map[string]interface{}) string + func DiscoverCatalogAfterSetup(ctx context.Context, out io.Writer) + func EnsureCatalogAvailable(ctx context.Context) error + func EnvKeyStatus(provider string) string + func EstimateCost(pack *ModelPack, tokensPerSession int) float64 + func ExampleModelHints() (anthropic, openai string) + func FetchModelsForProvider(provider string) ([]catalog.ModelCatalogEntry, error) + func FirstRunSetupHint(ctx context.Context) string + func FishCompletion() string + func FormatActiveRules(rules []Rule) string + func FormatApplyCredentialsSummary(result *setup.ApplyCredentialsResult) string + func FormatBudgetStatus(status BudgetStatus, spent, max float64) string + func FormatCatalogHealth(h CatalogHealth) string + func FormatConfig(config *ModelConfig) string + func FormatConfigProviderError(providerID string, err error) string + func FormatCredentialCLIStatus(ctx context.Context) string + func FormatDeveloperPathReport(ctx context.Context) string + func FormatEcosystemPanel(ctx context.Context, provider, model string) string + func FormatPack(pack *ModelPack) string + func FormatTemplate(template *ConfigTemplate) string + func GatewayDisplayName(gatewayID string) string + func GatewayForModel(modelID string) string + func GenerateAgentsmd(template *ConfigTemplate, vars map[string]string) string + func GenerateHawkConfig(template *ConfigTemplate, vars map[string]string) string + func GenerateRules(template *ConfigTemplate) string + func GitContext() string + func HasConfiguredDeployment(ctx context.Context) bool + func HasConfiguredDeploymentCached(ctx context.Context) bool + func HasSelectedModel() bool + func InstallCompletions(shell string) string + func InvalidateConfigUICache() + func IsSetupGateway(providerID string) bool + func LoadAPIKeysFromStore() map[string]string + func LoadAgentDir() string + func LoadAgentsMD() string + func LoadAgentsMDFrom(start string) string + func LoadAliases() map[string]string + func LoadIgnorePatterns() []string + func LoadRoutingPolicyJSON() (string, error) + func MaskCredentialForProvider(ctx context.Context, provider string) string + func MigrateProviderConfig() error + func MigrateProviderSecrets() error + func ModelIDsForProvider(provider string) ([]string, error) + func NeedsFirstRunSetup(ctx context.Context) bool + func NormalizeProviderForEngine(provider string) string + func OutputStyleModTime() time.Time + func ParseEnvFile(path string) (map[string]string, error) + func PersistAPIKey(ctx context.Context, envKey, secret string) error + func PrepareCatalogForSession(ctx context.Context, out io.Writer, opts CatalogStartupOptions) error + func PrepareCredentialDiscovery(ctx context.Context) + func PrimaryAPIKeyEnvForDeployment(deploymentID string) string + func ProviderAPIKeyEnv(provider string) string + func ProviderConfigJSON() (string, error) + func ProviderIDForDeployment(deploymentID string) string + func ProviderOfModel(modelName string) string + func RefreshCatalogAfterCredentials(ctx context.Context, out io.Writer) error + func RefreshConfigCredSnapshot(ctx context.Context) + func RefreshGatewayCatalog(ctx context.Context, providerID string) (string, error) + func RefreshModelCatalogV1(ctx context.Context) (string, error) + func RemoveStoredCredential(ctx context.Context, target string) ([]string, error) + func ResolveAlias(input string, aliases map[string]string) string + func ResolveCanonicalModel(model string) string + func RollbackMigration(configPath, backupPath string) error + func RoutingPreviewJSON(ctx context.Context, model string) (string, error) + func SaveAliases(aliases map[string]string) error + func SaveCredential(ctx context.Context, inference CredentialInference, secret string) error + func SaveGlobal(s Settings) error + func SaveProject(s Settings) error + func SaveProjectOrGlobalDeploymentRouting(enabled bool) error + func SaveRoutingPolicyJSON(raw string) error + func ScheduleBackgroundCatalogRefresh(ctx context.Context) + func SetActiveModel(ctx context.Context, modelID string) error + func SetActiveProvider(ctx context.Context, provider string) error + func SetGlobalSetting(key, value string) error + func SettingValue(s Settings, key string) (string, bool) + func ShouldClearSelectionAfterCredentialRemove(ctx context.Context, removedProvider string) bool + func ShouldIgnore(path string, patterns []string) bool + func StartupCatalogPrefetch(ctx context.Context) + func SyncProviderConfigFromEnv() (string, error) + func SyncSelectionWithCredentials(ctx context.Context) + func TryAutoRefreshCatalog(ctx context.Context) error + func ValidateConfig(data map[string]interface{}) []string + func ZshCompletion() string + type Attribution = types.Attribution + type BudgetConfig struct + MaxCostUSD float64 + MaxTokensPerSession int + WarnAtPercent float64 + func DefaultBudgetConfig() BudgetConfig + func LoadBudget() BudgetConfig + type BudgetStatus int + const BudgetExceeded + const BudgetOK + const BudgetWarning + func CheckBudget(spent float64, config BudgetConfig) BudgetStatus + func (s BudgetStatus) String() string + type CatalogHealth struct + CachePath string + Deployments int + Error string + Exists bool + Models int + Modified time.Time + Offerings int + SizeBytes int64 + Source string + Stale bool + StaleAfter time.Time + func CatalogHealthReport(ctx context.Context) CatalogHealth + type CatalogStartupOptions struct + ForceRefresh bool + SkipAutoRefresh bool + VerboseOutput bool + type ConfigTemplate struct + Content map[string]interface{} + Description string + Files map[string]string + Framework string + Language string + Name string + Tags []string + type CredentialInference struct + DeploymentID string + DisplayName string + EnvVar string + ProviderID string + func CredentialInferenceForProvider(providerID string) (CredentialInference, error) + func InferCredentialsFromAPIKey(ctx context.Context, secret string) []CredentialInference + func InferenceFromOption(opt CredentialProviderOption) CredentialInference + func LocalCredentialInference(providerID string) (CredentialInference, error) + type CredentialProviderOption struct + DeploymentID string + DisplayName string + EnvVar string + Inferred bool + ProviderID string + Rank int + RequiresKey bool + type CredentialResolveResult struct + FormatError string + FormatOK bool + Providers []CredentialProviderOption + func ResolveCredential(ctx context.Context, secret string) CredentialResolveResult + type CustomProviderConfig struct + APIKeyEnv string + BaseURL string + Model string + Name string + type DeploymentRow struct + Configured bool + EnvVars []EnvVarStatus + ID string + Name string + ProviderID string + Status string + func ListDeploymentRows(ctx context.Context) ([]DeploymentRow, error) + type DeveloperPathReport struct + ChatReady bool + Checks []PathCheck + NextStep string + Ready bool + SecureReady bool + func EvaluateDeveloperPath(ctx context.Context) DeveloperPathReport + type Distribution struct + Branding DistroBranding + Defaults DistroDefaults + DisplayName string + Extensions []DistroExtension + Name string + Provider DistroProvider + Recipes []string + Version string + func FindDistribution() *Distribution + func LoadDistribution(path string) (*Distribution, error) + type DistroBranding struct + AgentName string + Color string + Prompt string + WelcomeMsg string + type DistroDefaults struct + AllowedTools []string + MaxTurns int + PermissionMode string + SystemPrompt string + type DistroExtension struct + Args []string + Command string + Name string + type DistroProvider struct + EnvKey string + Model string + Name string + type EnvManager struct + ActiveProfile string + Profiles map[string][]string + Vars map[string]*EnvVar + func NewEnvManager() *EnvManager + func (em *EnvManager) Diff(other *EnvManager) []string + func (em *EnvManager) Export(format string) string + func (em *EnvManager) Get(key string) string + func (em *EnvManager) GetRequired(key string) (string, error) + func (em *EnvManager) ListForDisplay() string + func (em *EnvManager) Load(sources ...string) error + func (em *EnvManager) LoadProfile(name string) error + func (em *EnvManager) MaskSecrets(text string) string + func (em *EnvManager) SaveProfile(name string, vars []string) error + func (em *EnvManager) Set(key, value string, secret bool) + func (em *EnvManager) Validate() []string + type EnvVar struct + Description string + Key string + Required bool + Secret bool + Source string + Value string + type EnvVarStatus struct + Name string + Set bool + type MCPServerConfig struct + Args []string + Command string + Headers map[string]string + Name string + Type string + URL string + type Migration struct + Description string + FromVersion int + Migrate func(data map[string]interface{}) (map[string]interface{}, error) + ToVersion int + type MigrationRegistry struct + CurrentVersion int + Migrations []Migration + func NewMigrationRegistry() *MigrationRegistry + func (r *MigrationRegistry) Backup(configPath string) (string, error) + func (r *MigrationRegistry) MigrateFile(path string) error + func (r *MigrationRegistry) NeedsMigration(data map[string]interface{}) bool + func (r *MigrationRegistry) Run(data map[string]interface{}) (map[string]interface{}, error) + type ModelConfig struct + Adapters []string + From string + License string + Messages []ModelMessage + Parameters map[string]interface{} + System string + Template string + type ModelMessage struct + Content string + Role string + type ModelOption struct + DisplayName string + ID string + func OptionsFromSetupUI(ui *setup.SetupUI, providerFilter string) []ModelOption + type ModelPack struct + Author string + DefaultProvider string + Description string + Models map[string]ModelRole + Name string + Settings map[string]interface{} + Tags []string + type ModelPackRegistry struct + ActivePack string + Packs map[string]*ModelPack + func NewModelPackRegistry() *ModelPackRegistry + func (r *ModelPackRegistry) Compare(packA, packB string) string + func (r *ModelPackRegistry) GetModel(role string) ModelRole + func (r *ModelPackRegistry) List() []*ModelPack + func (r *ModelPackRegistry) Load() error + func (r *ModelPackRegistry) Register(pack *ModelPack) + func (r *ModelPackRegistry) Save() error + func (r *ModelPackRegistry) SetActive(packName string) error + type ModelRole struct + MaxTokens int + Model string + Provider string + Purpose string + Temperature float64 + type ModelfileParser struct + func NewModelfileParser() *ModelfileParser + func (p *ModelfileParser) MergeConfigs(base, override *ModelConfig) *ModelConfig + func (p *ModelfileParser) Parse(content string) (*ModelConfig, error) + func (p *ModelfileParser) ParseFile(path string) (*ModelConfig, error) + func (p *ModelfileParser) Render(config *ModelConfig) string + func (p *ModelfileParser) ToProviderConfig(config *ModelConfig) map[string]interface{} + func (p *ModelfileParser) Validate(config *ModelConfig) []string + type OutputStyle struct + Description string + KeepInstructions bool + Name string + Template string + func LoadOutputStyles() []OutputStyle + type PathCheck struct + Blocking bool + Detail string + FixHint string + Name string + Section string + Status PathCheckStatus + type PathCheckStatus string + const PathFail + const PathPass + const PathWarn + type PromptTemplate struct + Args []string + Name string + Template string + func LoadTemplates() []PromptTemplate + func (t *PromptTemplate) Apply(args map[string]string) string + type Rule struct + Content string + Name string + Paths []string + func ActiveRules(rules []Rule, touchedPaths []string) []Rule + func LoadRules() []Rule + func LoadRulesFrom(base string) []Rule + type Settings struct + AllowedTools []string + Attribution *Attribution + AutoAllow []string + AutoCommit *bool + AutoCompactThresholdPct int + Autonomy int + CustomHeaders map[string]string + CustomProviders []CustomProviderConfig + DeploymentRouting *bool + DisallowedTools []string + Frugal bool + MCPServers []MCPServerConfig + MaxBudgetUSD float64 + Model string + ModelRoles *routing.ModelRoles + Provider string + RepoMap *bool + RepoMapMaxTokens int + Sandbox string + Theme string + func LoadGlobalSettings() Settings + func LoadSettings() Settings + func LoadSettingsWithOverride(override string) (Settings, error) + func MergeSettings(base, override Settings) Settings + func ToggleDeploymentRouting(settings Settings) (Settings, bool, error) + func (s *Settings) UnmarshalJSON(data []byte) error + type SetupState struct + HasCredentials bool + HasModel bool + Hint string + NeedsSetup bool + func EvaluateSetup(ctx context.Context) SetupState + func EvaluateSetupCached(ctx context.Context) SetupState + type TemplateRegistry struct + Templates map[string]*ConfigTemplate + func NewTemplateRegistry() *TemplateRegistry + func (r *TemplateRegistry) DetectAndGenerate(projectDir string) (map[string]string, error) + func (r *TemplateRegistry) Generate(templateName string, vars map[string]string) (map[string]string, error) + func (r *TemplateRegistry) List() []*ConfigTemplate + func (r *TemplateRegistry) Preview(templateName string, vars map[string]string) string + func (r *TemplateRegistry) Register(template *ConfigTemplate) + type ValidationError struct + Field string + Message string + Value string + func (e ValidationError) Error() string + type ValidationResult struct + Errors []ValidationError + Valid bool + func ValidateSettings(s Settings) ValidationResult + func (r ValidationResult) Error() string