gastownhall/beads · error

no %s provided (%s)

Error message

no %s provided (%s)

What it means

requireTextFromSources in cmd/bd/flags.go returns this error when no text source was provided at all (provided == false) for a required text argument. The message includes the noun (e.g. 'description', 'title') and a hint explaining how to supply the text, such as via positional argument, --stdin, or --file.

Source

Thrown at cmd/bd/flags.go:329

}

// requireTextFromSources resolves body text like textFromSources and owns the
// shared empty-text policy: text from an explicit source must be non-blank
// ("<noun> cannot be empty"), and with no source at all the error lists the
// command's accepted sources via hint (e.g. "use positional args, --stdin, or
// --file").
func requireTextFromSources(noun, hint string, src textSources) (string, error) {
	text, provided, err := textFromSources(src)
	if err != nil {
		return "", err
	}
	if strings.TrimSpace(text) != "" {
		return text, nil
	}
	if provided {
		return "", fmt.Errorf("%s cannot be empty", noun)
	}
	return "", fmt.Errorf("no %s provided (%s)", noun, hint)
}

// registerPriorityFlag registers the priority flag with a specific default value.
func registerPriorityFlag(cmd *cobra.Command, defaultVal string) {
	cmd.Flags().StringP("priority", "p", defaultVal, "Priority (0-4 or P0-P4, 0=highest)")
}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Pass the text as a positional argument: bd create "title" "description".
  2. Pipe the text: echo "description" | bd create --stdin.
  3. Pass a file: bd create --file desc.txt.
  4. Quote shell variables ("$DESC") and verify they are non-empty before invocation.

Example fix

// before
bd create "my title"          # missing description
// after
bd create "my title" "description text"
Defensive patterns

Strategy: validation

Validate before calling

// shell: require a text argument
if [ $# -lt 1 ] || [ -z "$1" ]; then
  echo "usage: bd create <title> <description>" >&2; exit 1
fi

Prevention

When it happens

Trigger: Invoking a command that requires text without any of: positional text argument, --stdin flag, or --file flag, e.g. `bd create` with no description argument or input flag.

Common situations: Forgetting the positional description in scripts; calling the command interactively expecting a prompt that does not exist; wrappers stripping empty arguments so the positional arg disappears; shell variables expanding to nothing.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/6429ff55fed51fbf. Report an issue: GitHub.