multica-ai/multica · error
--title is required
Error message
--title is required
What it means
Flag guard in runProjectCreate (cmd_project.go:309): `multica project create` was invoked without a non-empty --title. Title is the only required field for creation (description and others are optional), so the CLI rejects the call locally before constructing the API client.
Source
Thrown at server/cmd/multica/cmd_project.go:309
headers := []string{"ID", "TITLE", "STATUS", "LEAD", "DESCRIPTION"}
rows := [][]string{{
strVal(project, "id"),
strVal(project, "title"),
strVal(project, "status"),
lead,
strVal(project, "description"),
}}
cli.PrintTable(os.Stdout, headers, rows)
return nil
}
return cli.PrintJSON(os.Stdout, project)
}
func runProjectCreate(cmd *cobra.Command, _ []string) error {
title, _ := cmd.Flags().GetString("title")
if title == "" {
return fmt.Errorf("--title is required")
}
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
body := map[string]any{"title": title}
if v, _ := cmd.Flags().GetString("description"); v != "" {
body["description"] = v
}
if v, _ := cmd.Flags().GetString("status"); v != "" {
if err := validateProjectStatus(v); err != nil {
return err
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass a non-empty title: `multica project create --title "Q3 Migration"`.
- Guard in scripts: `[ -n "$TITLE" ] || { echo 'title required'; exit 1; }` before the call.
- Use ${TITLE:?} so the shell itself fails fast on an unset variable.
Example fix
# before
multica project create --title "$TITLE" # $TITLE unset -> --title ""
# --title is required
# after
multica project create --title "${TITLE:?TITLE must be set}" Defensive patterns
Strategy: validation
Validate before calling
title := strings.TrimSpace(os.Getenv("PROJECT_TITLE"))
if title == "" { return fmt.Errorf("PROJECT_TITLE must be set") } Type guard
func hasTitle(s string) bool { return strings.TrimSpace(s) != "" } Prevention
- Use ${TITLE:?} shell parameter expansion to fail before the CLI runs.
- Trim whitespace when deriving titles from files or tickets.
- Assert required flags up front in wrapper scripts instead of relying on CLI guards.
When it happens
Trigger: Omitting --title entirely, or passing --title "" (empty string) — including scripts where $TITLE expands to nothing and the quotes keep the argument present but empty.
Common situations: Shell scripts with unset variables quoted as ""; pipelines that derive the title from an empty field; assuming an interactive prompt will ask for the title.
Related errors
- --%s, --%s-stdin, and --%s-file are mutually exclusive; pick
- --output is required
- --%s-file: path must not be empty
- --runtime-id must not be empty
- --name must not be empty
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/c6f81d7f7fd542b2.
Report an issue: GitHub.