multica-ai/multica · error

--type is required

Error message

--type is required

What it means

Error "--type is required" thrown in multica-ai/multica.

Source

Thrown at server/cmd/multica/cmd_project.go:577

		if !ok {
			continue
		}
		rows = append(rows, []string{
			displayID(strVal(r, "id"), fullID),
			strVal(r, "resource_type"),
			summarizeResourceRef(r["resource_ref"]),
			strVal(r, "label"),
		})
	}
	cli.PrintTable(os.Stdout, headers, rows)
	return nil
}

func runProjectResourceAdd(cmd *cobra.Command, args []string) error {
	resourceType, _ := cmd.Flags().GetString("type")
	resourceType = strings.TrimSpace(resourceType)
	if resourceType == "" {
		return fmt.Errorf("--type is required")
	}

	body := map[string]any{"resource_type": resourceType}

	// --ref takes precedence when it is JSON: any new resource type works
	// through that path without a CLI change. For github_repo only, a non-JSON
	// --ref is a checkout ref shortcut and merges with --url.
	if ref, ok, err := buildResourceRefFromRefFlag(cmd, resourceType, nil); err != nil {
		return err
	} else if ok {
		body["resource_ref"] = ref
	} else {
		switch resourceType {
		case "github_repo":
			ref, has, err := buildResourceRefFromFlags(cmd, resourceType, nil)
			if err != nil {
				return err
			}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Pass --type with the resource type (e.g. github_repo, local_directory).

When it happens

Trigger: Thrown at server/cmd/multica/cmd_project.go:577 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/9ef32e21e6ac0b19. Report an issue: GitHub.