router-for-me/CLIProxyAPI · error

home plugins: goos is required

Error message

home plugins: goos is required

What it means

Error "home plugins: goos is required" thrown in router-for-me/CLIProxyAPI.

Source

Thrown at internal/homeplugins/sync.go:133

}

func SyncPlatform(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime, platform Platform) error {
	_, errSync := SyncPlatformWithReport(ctx, cfg, pluginRuntime, platform)
	return errSync
}

func SyncWithReport(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime) (SyncReport, error) {
	return SyncPlatformWithReport(ctx, cfg, pluginRuntime, CurrentPlatform())
}

func SyncPlatformWithReport(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime, platform Platform) (SyncReport, error) {
	if cfg == nil || !cfg.Home.Enabled || !cfg.Plugins.Enabled {
		return newSyncReport(platform), nil
	}
	platform = NormalizePlatform(platform)
	report := newSyncReport(platform)
	if platform.GOOS == "" {
		errPlatform := fmt.Errorf("home plugins: goos is required")
		finishReport(&report, errPlatform)
		return report, errPlatform
	}
	if platform.GOARCH == "" {
		errPlatform := fmt.Errorf("home plugins: goarch is required")
		finishReport(&report, errPlatform)
		return report, errPlatform
	}
	report.Platform = platform
	root, errResolvePluginsDir := config.ResolvePluginsDir(cfg.Plugins.Dir)
	if errResolvePluginsDir != nil {
		errPluginsDir := fmt.Errorf("home plugins: %w", errResolvePluginsDir)
		finishReport(&report, errPluginsDir)
		return report, errPluginsDir
	}
	client := newPluginStoreClient(cfg)
	var syncErrors []error
	ids := make([]string, 0, len(cfg.Plugins.Configs))

View on GitHub (pinned to 78f0c4079e)

Solutions

  1. Set the goos value (target operating system) before syncing home plugins.
  2. Verify the runtime OS detection or provide the value explicitly.

When it happens

Trigger: Thrown at internal/homeplugins/sync.go:133 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15). Data as JSON: /api/errors/a989d2b7ca87cb35. Report an issue: GitHub.