charmbracelet/crush · error
invalid source , must be 'catwalk' or 'hyper
Error message
invalid source %q, must be 'catwalk' or 'hyper'
What it means
The `crush update-providers` command validates the --source flag against a closed set: only "catwalk" or "hyper" are accepted (each dispatching to a different config updater). Any other value is rejected with this error before any network call is made. It is a pure flag-validation error, not a fetch failure.
Solutions
- Use exactly `--source catwalk` (default provider catalog) or `--source hyper`.
- Check spelling and case — the match is exact and case-sensitive.
- Run `crush update-providers --help` to see the accepted values.
Example fix
// before crush update-providers --source Catwalk --url ./providers.json // after crush update-providers --source catwalk --url ./providers.json
Defensive patterns
Strategy: validation
Validate before calling
# shell check before invoking source="catwalk" case "$source" in catwalk|hyper) ;; *) echo "invalid --source: $source"; exit 1 ;; esac crush update-providers --source "$source" --url "$url"
Prevention
- Only pass --source catwalk or --source hyper, lowercase and unquoted-exact.
- Consult `crush update-providers --help` before scripting the command.
- Quote variables in scripts to avoid empty --source values.
When it happens
Trigger: Running `crush update-providers` with --source set to anything other than catwalk or hyper — e.g. a typo (`catwalks`), different casing (`Catwalk`), or an empty value if the flag is passed without one.
Common situations: Misspelling or miscapitalizing the source name; copy-pasting an example that used a different source name; forgetting that hyper is a separate source.
Understand the failure class
Background: "unknown output mode", "invalid value for flag", "expects true/false": fixing invalid flag value errors in CLI tools — this error's family across 24 libraries.
Related errors
- default providers are disabled and there are no custom…
- failed to configure providers
- failed to configure selected models
- failed to get config
- failed to initialize config
AI-assisted analysis of charmbracelet/crush@7944b8e522 (2026-08-29).
Data as JSON: /api/errors/2db087028dfb4cf3.
Report an issue: GitHub.
Appendix: source
Thrown at internal/cmd/update_providers.go:54
crush update-providers --source=hyper https://hyper.example.com
`,
RunE: func(cmd *cobra.Command, args []string) error {
// NOTE(@andreynering): We want to skip logging output do stdout here.
slog.SetDefault(slog.New(slog.DiscardHandler))
var pathOrURL string
if len(args) > 0 {
pathOrURL = args[0]
}
var err error
switch updateProvidersSource {
case "catwalk":
err = config.UpdateProviders(pathOrURL)
case "hyper":
err = config.UpdateHyper(pathOrURL)
default:
return fmt.Errorf("invalid source %q, must be 'catwalk' or 'hyper'", updateProvidersSource)
}
if err != nil {
return err
}
// NOTE(@andreynering): This style is more-or-less copied from Fang's
// error message, adapted for success.
headerStyle := lipgloss.NewStyle().
Foreground(charmtone.Butter).
Background(charmtone.Guac).
Bold(true).
Padding(0, 1).
Margin(1).
MarginLeft(2).
SetString("SUCCESS")
textStyle := lipgloss.NewStyle().
MarginLeft(2).View on GitHub (pinned to 7944b8e522)