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
- Pass the text as a positional argument: bd create "title" "description".
- Pipe the text: echo "description" | bd create --stdin.
- Pass a file: bd create --file desc.txt.
- 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
- Always pass the positional text or an explicit --stdin/--file flag.
- Quote variables ("$ARG") so empty values are not silently dropped by the shell.
- Read command help to learn which noun is required (title, description).
- In wrappers, assert required args before exec'ing bd.
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
- --waits-for-gate requires --waits-for (no spawner ID specifi
- --source-db and --output are required
- got %d close reasons for %d issue IDs; provide exactly one s
- cannot specify both --reason-file and --reason/--resolution/
- --reason-file %q is empty; close reason is required
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/6429ff55fed51fbf.
Report an issue: GitHub.