multica-ai/multica · warning
--name is required
Error message
--name is required
What it means
Thrown by `multica label create` when --name is omitted or empty. The CLI requires both a name and a color before it will POST /api/labels; this guard fires first and prevents an invalid request.
Source
Thrown at server/cmd/multica/cmd_label.go:170
created = created[:10]
}
rows := [][]string{{
strVal(label, "id"),
strVal(label, "name"),
strVal(label, "color"),
created,
}}
cli.PrintTable(os.Stdout, headers, rows)
return nil
}
return cli.PrintJSON(os.Stdout, label)
}
func runLabelCreate(cmd *cobra.Command, _ []string) error {
name, _ := cmd.Flags().GetString("name")
color, _ := cmd.Flags().GetString("color")
if name == "" {
return fmt.Errorf("--name is required")
}
if color == "" {
return fmt.Errorf("--color is required (e.g. #3b82f6)")
}
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
body := map[string]any{"name": name, "color": color}
var result map[string]any
if err := client.PostJSON(ctx, "/api/labels", body, &result); err != nil {
return fmt.Errorf("create label: %w", err)
}
View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass the name explicitly: `multica label create --name bug --color #3b82f6`
- Guard scripts: fail early if the name variable is empty
- Check flag spelling — a misspelled flag leaves name empty and triggers this error
Example fix
# before multica label create "bug" --color #3b82f6 # after multica label create --name bug --color #3b82f6
Defensive patterns
Strategy: validation
Validate before calling
# bash: require name and color for create
[[ -n "${NAME:-}" && -n "${COLOR:-}" ]] || { echo "--name and --color are required" >&2; exit 2; } Prevention
- Name is a flag, not positional
- set -u catches unset variables early
- Template create commands with both flags
When it happens
Trigger: Running `multica label create --color #3b82f6` without --name, or passing an empty `--name ""`.
Common situations: Users assume the name is positional (`label create "bug"`); scripts with unset name variables.
Related errors
- --color is required (e.g. #3b82f6)
- nothing to update — provide --name and/or --color
- --kind must be schedule or webhook
- --cron is required for --kind schedule
- --timezone is only valid with --kind schedule
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/f49e3a27083667b0.
Report an issue: GitHub.