multica-ai/multica · warning

--path is required

Error message

--path is required

What it means

Client-side flag validation in `multica skill files upsert`: the `--path` flag (the destination path of the file inside the skill bundle) is required and was empty. No network call occurs; nothing is modified.

Source

Thrown at server/cmd/multica/cmd_skill.go:680

			strVal(f, "id"),
			strVal(f, "path"),
			strVal(f, "created_at"),
			strVal(f, "updated_at"),
		})
	}
	cli.PrintTable(os.Stdout, headers, rows)
	return nil
}

func runSkillFilesUpsert(cmd *cobra.Command, args []string) error {
	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}

	filePath, _ := cmd.Flags().GetString("path")
	if filePath == "" {
		return fmt.Errorf("--path is required")
	}
	content, hasContent, err := resolveSkillContentFlag(cmd)
	if err != nil {
		return err
	}
	if !hasContent || content == "" {
		return fmt.Errorf("--content is required")
	}

	body := map[string]any{
		"path":    filePath,
		"content": content,
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	var result map[string]any

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Add the bundle-relative destination: `multica skill files upsert <id> --path SKILL.md --content "..."`.
  2. In scripts, fail fast on empty variables before invoking the CLI.
  3. Remember --path is where the file lives INSIDE the skill, not a local disk path.

Example fix

# before
multica skill files upsert sk-1 --content "new docs"

# after
multica skill files upsert sk-1 --path references/api.md --content "new docs"
Defensive patterns

Strategy: validation

Validate before calling

: "${BUNDLE_PATH:?set BUNDLE_PATH (file path INSIDE the skill bundle)}"
multica skill files upsert "$SKILL_ID" --path "$BUNDLE_PATH" --content "$CONTENT"

Prevention

When it happens

Trigger: Running `multica skill files upsert <skill-id> --content "..."` while forgetting --path; a script whose PATH_VAR variable is unset; passing --path "" explicitly.

Common situations: Building the command from variables where the path variable is empty in one CI branch; user assumes the CLI infers the path from the local filename.

Related errors


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